Module: Music::Transcription

Defined in:
lib/music-transcription/errors.rb,
lib/music-transcription/version.rb,
lib/music-transcription/model/link.rb,
lib/music-transcription/model/note.rb,
lib/music-transcription/model/part.rb,
lib/music-transcription/model/meter.rb,
lib/music-transcription/model/pitch.rb,
lib/music-transcription/model/tempo.rb,
lib/music-transcription/model/change.rb,
lib/music-transcription/model/meters.rb,
lib/music-transcription/model/pitches.rb,
lib/music-transcription/model/program.rb,
lib/music-transcription/model/dynamics.rb,
lib/music-transcription/model/note_score.rb,
lib/music-transcription/parsing/note_node.rb,
lib/music-transcription/parsing/parseable.rb,
lib/music-transcription/parsing/link_nodes.rb,
lib/music-transcription/parsing/pitch_node.rb,
lib/music-transcription/model/articulations.rb,
lib/music-transcription/model/measure_score.rb,
lib/music-transcription/packing/part_packing.rb,
lib/music-transcription/parsing/link_parsing.rb,
lib/music-transcription/parsing/note_parsing.rb,
lib/music-transcription/packing/score_packing.rb,
lib/music-transcription/parsing/meter_parsing.rb,
lib/music-transcription/parsing/pitch_parsing.rb,
lib/music-transcription/parsing/tempo_parsing.rb,
lib/music-transcription/packing/change_packing.rb,
lib/music-transcription/parsing/duration_nodes.rb,
lib/music-transcription/packing/program_packing.rb,
lib/music-transcription/parsing/segment_parsing.rb,
lib/music-transcription/parsing/duration_parsing.rb,
lib/music-transcription/packing/note_score_packing.rb,
lib/music-transcription/conversion/measure_note_map.rb,
lib/music-transcription/conversion/tempo_conversion.rb,
lib/music-transcription/parsing/convenience_methods.rb,
lib/music-transcription/parsing/articulation_parsing.rb,
lib/music-transcription/packing/measure_score_packing.rb,
lib/music-transcription/conversion/measure_score_conversion.rb,
lib/music-transcription/parsing/numbers/positive_float_parsing.rb,
lib/music-transcription/parsing/numbers/positive_integer_parsing.rb,
lib/music-transcription/parsing/numbers/nonnegative_float_parsing.rb,
lib/music-transcription/parsing/numbers/positive_rational_parsing.rb,
lib/music-transcription/parsing/numbers/nonnegative_integer_parsing.rb,
lib/music-transcription/parsing/numbers/nonnegative_rational_parsing.rb

Defined Under Namespace

Modules: Articulations, Conversion, Dynamics, Meters, Parseable, Parsing, Pitches Classes: Change, Duration, Link, MeasureScore, Meter, NegativeError, NonIncreasingError, NonIntegerError, NonPositiveError, NonRationalError, NonZeroError, NotValidError, Note, NoteScore, Part, Pitch, Program, Segment, Tempo

Constant Summary collapse

VERSION =

music-transcription version

"0.21.0"

Class Method Summary collapse

Class Method Details

.pack_score(score) ⇒ Object



5
6
7
8
9
# File 'lib/music-transcription/packing/score_packing.rb', line 5

def pack_score score
  packing = score.pack
  packing["type"] = score.class.to_s
  return packing
end

.unpack_score(packing) ⇒ Object



11
12
13
14
# File 'lib/music-transcription/packing/score_packing.rb', line 11

def unpack_score packing
  type = Kernel.const_get(packing["type"])
  type.unpack(packing)
end