Simple question about makenote object
I'm working on a project, part of which needs to generate MIDI notes of varying length (quarter notes, eighth notes, sixteenth notes etc).
I'm using a [metro] object to generate ticks that drive a [transport] object, and feeding the units from the transport into a [counter] to make things happen at various points within the beat.
I can trigger events well enough, it's working fine, but I want to vary the duration parameter of the [makenote] object so that when I play a quarter note (for example) the tone sounds for the duration of a quarter note.
I can see that you can do things like [makenote 124 4n] to generate a quarter note, but the duration of this note appears to be determined by the master transport and I want it to be determined by a named transport.
My question is, how do I make the duration of the note generated by [makenote] correlate to the tempo in my named transport. To put it another way, when my named transport has a tempo of 60, the duration of the quarter note generated by [makenote] should be double the duration of a quarter note generated by [makenote] when my named transport has a tempo of 120.
Any thoughts would be welcome!
You can calculate the duration (msec) of a quarter note from the tempo, using the formula 60000/BPM.
For other note values multiply with a corresponding factor (eg. 0.5 for 8th notes).
Or you can use the translate object to provide the ms equivalent for whatever note value you specify.
IMHO, the makenote object should have a 'transport' attribute like all the other tempo-relative objects, and the lack of it is almost worthy of a bug report (or at least a frowny face). But the translate object does have a 'transport' attribute, so you can use it and get the same effect.
Good stuff, that's really helpful. Thank you!
Pinging this thread to agree with Christopher Dobrian. Although there are workarounds an @transport attribute for [makenote] would be most welcome.