28-06-2016, 08:57 PM
|
Posts: 17
Threads: 2
Joined: Feb 2016
|
EDITED TO REFLECT CORRECT INFORMATION
Hey yo, I've been working a lot with this format and some of this information is confusing/missing/incorrect. I can't post a table to the forum so it's not worth me making a new post, but I'll put the issues here and perhaps you can add them to this post.
A Word On 0xFD Commands
If you intend to change multiple track parameters mid song (for pitch bends and other effects),0xFD track (and header) commands are in timestep deltas, so they are used as you would write out a sequence of note values
Header:
0xFD, "Define Following Commands At" (1 - 2 byte variable length delta timestep), Used to change header parameters mid-sequence by defining the next song position at which following header commands will apply
Track Command Table:
0xC2, "Coarse Transposition" (1 signed byte, semitones), adjust pitch in semitones
0xD3, "Fine Transposition" (1 signed byte, 9.375 cents negative and ~9.449 cents positive), adjust pitch over 2 octave range from negative to positive
0xFD, "Define Following Commands At" (1 - 2 byte variable length delta timestep), Used to change track parameters mid-sequence by defining the next song position at which following header commands will apply
Music Format:
Duration
Duration bytes define the percentage of the note value (defined by the so called "Timestamp" (its not a Timestamp) ) through which the note will play. This is done in an interesting way whereby "Duration" defines the 255's compliment of the actual duration percentage. So if you want to define a quarter note, then have the instrument play for only one third (0.3333~) of said quarter note (so somewhat of a quarter note staccato):
Duration = (int)((1 - 0.3333) * 255)
In other words, duration is very much not a timestamp!
In fact, I STRONGLY recommend (among all of the other musical travesties that have been committed like "clash cymbal" and "general percussion") we stop calling note timestamps "timestamps." Note's have a Duration (has a format of "timeSTEP or note value," and was previously called "timestamp," but itself IS NOT A TIMESTAMP), a Velocity, and a Play Percentage (what was just discussed).
Lastly if you look at the file format, MusicXML DOES support note velocities, but for the life of me I can't figure out why they weren't included in the converter.
(This post was last modified: 29-06-2016, 07:11 PM by Christopher Brown.)
|