Midi Sequencing Questions and Answers
Here are some questions I asked Benjamin Tubb (who is an expert on Roland synthesizers and the technicalities of midi sequencing) and his answers:
Q: I use Cakewalk 3.0. Is there any way of replacing all the various values of controller 64 by either a zero or a 127 value perhaps using an event filter? I assume I'd have to specify a range such as 0 to 63 where it would be "off" and 64 to 127 where it would be "on"??
A: Yes. Use the Select/By Filter option for the Edit/Cut function.
Q: How would I remove any successive duplicated controller, pitch bend or aftertouch events where only the FIRST occurance is significant. That relates to my previous question.
A: CAL would have to be used for that. See my attached CAL file.
Q: What is the optimal Tempo/PPQN Values for Recording
A: The realime recording of MIDI event data is directly affected by three factors: MIDI's transmission speed, Tempo and PPQN delays
Q:How is realtime recording related to these factors? What effect does speed and resolution, ie 120 or 384 (PPQN) ticks per beat have?
A: The intent is to allow the realtime recording of MIDI data to use the FULL "quantized" bandwith available given a specific PPQN. The Tempo used is NOT related to the song's Tempo. It would be a "freewheel" recording. However, it can be made to "Edit/Fit/Fit to Improvisation" within Cakewalk AFTER being recorded within the PPQN used for easier bar/TimeSig recognition in the "View/New/Staff" window.
The following relationships are made with such limitation constraints in mind, offer optimal sysex, running status, and typical 3-byte Note On/Off recording of live performances, with the recommendation that only the PPQNs factored by 2 and 3 (such as 96, 192, 384, and 768) only be used to minimize quantisation errors of human performance nuances.
Q: I don't understand what you mean by "quantization errors". I don't quantize the midi data. I just make a few changes to note positions, tempo, velocity values etc.
A: Any sequencer resolution has quantisation error of its PPQN clock tick delay rate. It is not the same as, although similar too, duration quantisation, but occurs at the lowest MIDI bandwith data rate level which the sequencer used, not for transmission, which is absolute, but for recording and playback.
I do not recommend using PPQNs of 120, 240, 480 or 960 because of the "inhuman" feel which the factor of 5 introduces to such quanitisized recordings.
Q:Why would these resolutions (do you mean resolutions or tempos) not be satisfactory and would (I think Cakewalk goes up to a maximum speed of 240) produce an inhuman feel?
A: Human swing feels are based on factors of 3. Whereas straight feels are based on factors of 2. In my opinion ALL other rhythms are "felt" as multiples of the factors of 2 and 3 only. "One" being a common factor to anything.
Q:What is significant about the factor 5? Why would other resolutions or tempos be better?
A: Resolutions which use factors besides 2 and 3, introduce a quanitisation error at the recording level in my opinion which is not inherent in human performance.
For sysex events, and especially MIDI Sync 1-byte events, where the maximim tick delay is .3125ms, a Tempo of 250 at a PPQN of 768 is optimal.
Q: Why is this? What is the tick delay related to? What is "PPQN"?
A: The MIDI bandwith (i.e. transmission speed) is 31,250 bits per second (BPS). Therefore, because there are 10-bits in every MIDI "byte" (consisting of 1 start bit, 8 data bits, and 1 stop bit), the actual bytes which can be transmitted per second is 3,125. That converts to a delay between each byte of (1/3125) .00032 seconds or .32ms (milliseconds).
Clock ticks are related to PPQN. PPQN stands for parts per quarter notes, the parts being called "clock ticks". PPQN is a common acronymn used to indicate sequencer resolution and accuracy. Regardless of what sequencer resolution it has the absolute limit imposed by the MIDI transmission speed. Since Tempo directly affects PPQN delays, it is helpful to know what are the REAL limits of the variables of Tempo and PPQN involved with recording various types of events -- from the minimum allowed (such as MIDI Sync one-byte events) to the most common maximum used of the 3-byte "normal" MIDI events.
Q:Why is an instrumental solo on one midi channel called a two byte event such as a instrumental solos on one MIDI channel?
A: Most sequencers use Running Status, which is allowed by the MIDI spec, to optimise the timing flow of MIDI data of the same event type on the same channel which consecutively follow each other. Therefore, there can be an increase in recording and playback accuracy available in such cases.
On a midi channel, where the clock tick delay is .625ms, either a Tempo/PPQN of 125/768 or 246/384 are optimal. For typical 3-byte Note On/Off events, as in general multichannel data, where the clock tick delay is .9375ms, either a Tempo/PPQN of 83/768 or 166/384 are optimal.
Q:Please explain these factors also. Are these something you have measured yourself of some specification by Roland? I am wondering how they all affect the quality of the midi recording in practice.
A: All of the figures I given are based on basic mathematics. There is NOTHING esoteric, needing to be further specified to use them. In all cases the reference standard, MIDI's "bandwidth" transmission rate of 31250 BPS is used to deduce all of the delay timings. The following general formulas apply between Tempo (in Beats Per Minute BPM), PPQN (Parts Per Quarter Note "resolution") and DELAY (of Clock Ticks in milliseconds).
DELAY = (60000 / TEMPO) / PPQN
TEMPO = (60000 / PPQN) / DELAY
PPQN = (60000 / DELAY) / TEMPO
60000 is used because of the factors 1000 in milliseconds and 60 in converting minutes to seconds.
Q:Do you have any articles on these subjects on your web page?
A: Yes:
17. Improving Recording Timing Nuances 56. Optimal Live Recording of Timing Nuances 60. Optimal Tempo/PPQN Values for Recording
Q:Another thing I am trying to find more about is sysex messages and how to put them into a bank. I notice that for some midi sequences before the music plays I get a message saying "sending sysex messages" but I have no idea how to put them in. What I do understand is how to put them into the beginning each track to specify the bank and patch number, eg for using the orchestral expansion board, but I have to run that special midi file on Kostas Lialiambis's site that creates a GM-like performance. Do you or anyone else have any tutorials that explain more about how to put in the necessary sysex parameters?
A: Indeed, I have numerous JV/XP related files at my webpage which should help you. See below. As to Cakewalk, you should preferable create a TEMPLATE file which has the three of four sysex banks (set to "Auto") for inclusion in EVERY JV/XP MIDI file you create for setting up the synth appropriately for playback. Cakewalk unfortuately does not allow numerous sysex banks to easily be changed to a different Port however so "beware" of the "manual" labor of sometime having to change and such "Auto" or non-Auto banks for the Port for "your" synth. My files in particular use either or both Ports 5 and 6 in my setup. Such Port numbers are stored in Cakewalk's MIDI files besides its WRK files. Other sequences, allow easier editing of Port assingments of numerous sysex bank/data. I've already suggested the change to Cakewalk Tech Support several months ago.
Q:Thank you very much for your help. Could I put a link into your page as I think many would be interested in some of the technicalities you discuss.
A: You're welcome. And you certainly may include a link to my page. If you have any more "basic" MIDI or Roland JV/XP question, don't hesitate to ask.
For your final reference, here are my computed "minimum/maximum" (1,2,3 byte) optimal PPQN/Tempo recommendations for realtime recording (done at the performer's tempo in "free time"):
PPQN Tempo
120
192
240
384 -/246/164
480 -/200/133
768 250/125/83
960 200/100/66
Therefore, I recommend using the highest PPQN your sequencer supports and at the highest tempo setting for "ideal" recording/playback otherwise the 3-byte setting is most practical for all other cases. In any case the rhythmic note flexibility of human performance of typical performances is not likely to exceed 32nd note triplets in any case so, the data density (polyphony) of the parts should be another determining factor. But the more "bandwith" allowed for by the sequencer's resolution/tempo allow greater realtime controller expressiveness too during those note durations. Your hearing should be the final judge. If "reduced" to converting the PPQN to the XP-50/80 though (for live performance playback by their internal sequencers), since its resolution is set to 96 PPQN, using an external sequencer resolution of multiples of that, such as 192, 384, or 768 over the roundoffed/quantization of originally using multiples of 120 (240,480,960).
Benjamin Tubb AIM: brtubb brtubb@cybertron.com