Did you know ... | Search Documentation: |
Pack musicxml -- prolog/musicxml.pl |
This module provides tools for handling MusicXML files. Some of the types used are defined as follows:
chord ---> chord(pitch_class, pitch_class, list(interval)). pitch ---> rest; pitch(pitch_class, octave). octave == integer. pitch_class == alterable(nominal). interval == alterable(degree). alterable(A) ---> a(A, integer). nominal ---> 'A'; 'B'; 'C'; 'D'; 'E'; 'F'; 'G'. degree ---> 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14.
An 'alterable' in this context is something that can have a number of sharps
or flats associated with it, including pitch classes and scale degrees. The
event
type is a pair of a time spec and a payload type. The time spec can
be a number (a time point), a span (a pair of start and end time), or a tagged
union of points and spans. Tied objects (notes) are specified by a pair of
bools indicating if the object is tied to the previous and next objects
respectively.
event(T, X) == pair(T, X). ties == pair(bool, bool) span == pair(number, number) time_spec ---> point(number); span(span). score_token ---> end; bar; change(chord); slice(list(tied(Pitch))). tied(A) == pair(ties, A).
stream(StreamHandle)
as recognised by load_xml/3.score_prop ---> parts(list(pid)) ; title(atom) ; software(atom) ; date(atom).
part_prop ---> divisions(nat) % time is counted in this fraction of a crochet. ; fifths(integer) % number of sharps (+ve) or flats (-ve) in key sig ; n_measures(nat). % number of measures in part