Windows: Tightness Of Midi-output

Sometimes when I’ve used the MIDI-part in Renoise and have controlled some of my hardware synthesizers from Renoise, I’ve often had this feeling that there’s something not sounding tight enough. I’m pretty sensitive to stuff like that, but at the time I wasn’t sure if it was caused by internal delays in my synthesizers, if it was because of long MIDI-cables, any delays caused by MIDI-thru-connections or a combination of those mentioned.

Today I tried to find out. I connected a one meter MIDI-cable directly from one of the outputs of my Emagic Unitor8 MIDI-interface directly to my Yamaha DX7II (which is pretty tight MIDI-wise in the way I use it in this test) and made some tests and comparisions.

The equipment: My Unitor8 is the first revision which is connected to the computer via the COM-port (the second revision has an USB-port as well). My computer is an Intel Pentium 4 2.4 GHz, 512 MB RAM, ASUS P4PE motherboard, with Windows XP Professional, pretty clean (not a lot of junk running in the background). My soundcard is an M-Audio Delta-44, not sure if this matters at all in this case though. :slight_smile:

I made an identical bassline in both Renoise (1.5 demo) and Cubase SX2, both running at 160 BPM. In Renoise the bassline is basically one note per row which is cut off using the “F3”-command (which is half the time-length since the speed is at “06”). In Cubase the bassline consists of 1/16th notes with a length of 1/32th note. So, basically they’re as identical as it gets.

An important note about Cubase SX2 is that there’s quite a difference on the “tightness” of the MIDI-output depending on which MIDI-drivers you use, as there are
duplications of these, accessable from Cubase. First there are the Windows MIDI-drivers which produce very tight MIDI-data. Then there’s the “emulated” ones, as they’re called inside Cubase. These are the DirectMusic ones, and are not as reliable in terms of producing tight MIDI-data.

Anyway, I played the bassline through in Cubase (first via the Windows MIDI-drivers, then via the DirectMusic-drivers) and then the same bassline in Renoise. The bassline was played through twice at each program/driver (while sampling them in Soundforge), and I’ve then taken the sample of the second bassline and synchronized it exactly to the start to the first bassline - so the first bassline-pattern is what you hear in left channel, the second bassline-pattern is in the right. I did this to better get a better perception of what is going on and how much difference there are between two patterns from the same program/driver which in the best case should sound exactly the same.

renoise_midi.rar 3.7 MB

Here are the wavefiles in a compressed RAR-file. The files included are cubase_windows_midi.wav, cubase_directmusic.wav and renoise.wav. As you will hear, there’s quite a difference in the exactness of the basslines. If you try to pitch the sample down you will hear it even more clearly. The “Cubase Windows MIDI” one is very tight, giving it a sort of flangeing effect if you combine the channels together in mono. “Cubase DirectMusic” is more unstable, some of the notes poke more out to the left and the right. “Renoise” is the worst of the three, sounding kinda drunk and unstable (which is probably what I’ve reacted to in the first place).

I tried to measure how much lag or delay there was at most between the left and the right channel, and came up with these “worst cases”:

Cubase Windows MIDI - 4 ms delay
Cubase DirectMusic - 9 ms delay
Renoise - 12 ms delay

These are the worst cases I could find, but keep in mind that it’s possible that the first notes of the bassline wasn’t exact either, so the synchronization of the two basslines might be a little “off” throughout the whole sample. On the other hand, the tighter the overall MIDI-driver is, the lesser the “offset” is.

Anyway, this is just my way of spreading the light of something funky going on with Renoise and MIDI. I wonder if there is anything that could be done about it to make the MIDI in Renoise tighter (preferably as tight as Cubase using Windows MIDI-drivers)? I’m guessing that Renoise makes use of MIDI on the PC-version of Renoise via DirectMusic (since the worstcases are somewhat similar), is there a possibility to be able to use the Windows MIDI-drivers in Renoise instead?

And last: I just want to say that I’ve been reporting a lot of small and different bugs in Renoise lately and I haven’t even come around to registering the program, so who am I to complain, you might ask? But I DO really think Renoise is one hell’uv’a fun and addictive music-tool, I WILL register this jewel as soon as my money arrives (in a month or so) and I really give you this feedback because I’d like to make a really great program even greater.

Would be fun with some feedback on this. :) Anyone else experienced the same phenomena (or do people mostly use Renoise without any hardware MIDI-gear)?

I had no chance to listen to the WAVs, but have you tried setting the MIDI delay in the isntrument properties?

It-Alien: Hehe, listen to the wav-files and you’ll see that the MIDI delay doesn’t have that much to do with the problem. :) It’s not an overall delay that is experienced, it’s the lackness of a timecritical-exact MIDI-output.

(But if it was an overall delay of the instrument, the MIDI delay would come in very handy, so it’s good that the function exists in Renoise.)

Personally I don’t use MIDI out at all with Renoise, so I can’t help you out. But judging from the studio photos that has been posted here, there should be quite a few working with synths (or maybe they’re just for showing off? :))

Anyway, to comment on your first post, long MIDI cables should not cause any delay at all… electricity is quite fast you know. And bad cables would only cause missing notes, note-offs or misinterpreted messages, not delays, since MIDI is a simple one-way protocol. But as you said, MIDI thrus can cause delays, since they use opto couplers that can slow down things some milliseconds. This may have changed on more modern equipment though and is not a problem at all with USB and other direct connections (e.g. a cable straight from the UART port to the synth).

Did you switch off the humanize feature? :P - j/k.

I got a bit worried at first since I’m building a setup with some midi hardware around Renoise, but after listening to the test you did I can say that the tightness is probably good enough for my purposes.

I do see that some might have a problem with this though.

the last time i hooked up my only piece of midi hardware, the yamaha cs1x, is dated back to times where renoise v1.2x was most recent one.
but what i can still remember is, that i’ve set up a 4/4 kickdrum + hihats and i could easily hear, that the kicks were not triggered 100% in sync with the adjusted BPM. it sounded as if the speed did vary within one pattern… like from 129-131 as the gap between each individual onbeat was somtimes larger and sometimes smaller.
it became obvious when i added a sampled kickdrum to the whole.
so i concluded that something was wrong with my cheap CS1X, but if i understood junoir right, we’re talking about the same problem and renoise is the cause for this, or am i confusing things? :blink:

I am just curious: Did you try to adress your synthies trough other software? Maybe it is not Renoise itself, that causes the delay… Maybe your 401-driver is buggy…

What was the exact BPM in Renoise?

160BPM here:

Is not the exact amount as being mentioned here:

So if you say timing in Renoise somewhat “drunk”, you may be right if you compare it’s accuracy of the bpm rate you have used in the player controls.

Try using bpm rates that are exact accurate.
These values combined with a speed of 6 will al create an exact bpm rate:

75, 90, 98, 105, 125, 126, 150, 175, 210, 225, 245, 250, 294, 315

Your midi devices may also not be able to time correctly if they can’t handle minory time-differences.

Why wouldn’t it? The MIDI devices don’t care about exact BPM. Imho this would not affect the “tightness” difference between the programs, only the tempo.

Cool with all replies! I’ll answer them all in chronological order:

Johan: "Anyway, to comment on your first post, long MIDI cables should not cause any delay at all… electricity is quite fast you know. And bad cables would only cause missing notes, note-offs or misinterpreted messages, not delays, since MIDI is a simple one-way protocol. "

Yes, this is most probably true. What I meant was when I first heard the phenomena, there were so many unsure elements so I couldn’t say for sure what was causing it. The synth I used then was connected from my MIDI-interface via a 5 meter MIDI-cable to another synthesizer and then thru’d with another cable to the synth I was using, so it was hard to say. But you’re right, these length should probably not have any affection on the data at all.

dby: No, none humanizing at all. :lol: If you like me are keen on hard tight basslines, I think you will notice it though. :) But of course, there are VST-plugs and samples that do the job just as well.

keith303: Well, it’s hard for me to say, I haven’t used Renoise prior to version 1.5, but sure - it is possible that you had the same problem. If you didn’t used a lot of voices with complex sounds at the same time (some synthesizer have problems keeping up when allocating a lot of voices all at once, but this is more true to older gear) it might have been Renoise or something related to it.

dopefish: “I am just curious: Did you try to adress your synthies trough other software? Maybe it is not Renoise itself, that causes the delay… Maybe your 401-driver is buggy…”

Hmmm, I don’t know what to respond to that. Did you read my post (yes, it was pretty lengthy, I know) or listen to the samples? Two of the three samples are made using Cubase, accessing the synthesizer both from Windows MIDI and DirectMusic. The Unitor8 is a very decent MIDI-interface as well, and as you can hear - it’s extremely solid when running from Cubase using the Windows MIDI-drivers.

Or have I misinterpreted you somehow?

vvoois: The actual BPM was 160.0145. I wonder if these 0.0145 affect the result that much. There’s 0.0090625 % difference in speed. Anyway, 1 beat of 160bpm takes up 0,375 seconds and since I’m playing 4 notes (inclusive 4 note-off’s as well) - the delay between every MIDI-message is theoretically 46,875 ms. An increase of the speed (to what Renoise states it to) should decrease the delay between every MIDI-message to 46,871 ms if my math is correct. Now I haven’t mentioned the bandwith of MIDI which is roughly 1000 average MIDI-commands per second according to this page, but let’s say that this speed-difference really affects the MIDI-stream by shuffling a whole MIDI-note-message by one average message-size to the left or the right, it would still only be 1 ms offset. The worst cases in Renoise was 12 ms between the left and the right channel, and the worst case with Cubase Windows MIDI was 4 ms (which is totally acceptable imho).

Anyway, a lot of math, but concludingly I agree with Johan. I don’t think it affected the result in any major way that I selected a BPM which was slightly off in Renoise, it only changes the overall speed. I think there’s something wastly superior than this affecting the “tightness” of Renoise’s MIDI ouput.

Well, i was actually also aiming for the point that you mentioned to use an identical situation while when using 160BPM on Cubase, this is really 160BPM and on Renoise it’s not.
So even though the differences are very, very minor, the comparance remains biased.
I use the MPU401 device of my mainboard for MIDI, but only for input.

But the delays are very noticable when i use instruments from the MIDI wave-table and combine them with internal samples, so in this case Renoise and MIDI is really undoable.

vvooiis: Okay, I see your point. :) Do notice though that I never compare the wavefiles from Renoise with any of the Cubase outputs, in which this tiny difference of speed would probably be quite noticable, atleast in more lengthy tracks. In these wavefiles I always compare the output from the programs with their own result, as a way of measuring their exactness.

Does anyone know what causes the bad timing? DirectMusic?

yo! thanks junoir for bringing up this topic!

i have experienced just the same result when trying to use my hardwaresynths with renoise, the timing is really inaccurate and this
has nothing to do with midi-cables or tracker-bpm (i have synths which connects through USB also)… sound from midi-devices doesn’t sound tight together with vst&built-in-sampler in renoise…

for example i have completely stopped using my remote x-station-synth (midi or usb) with renoise since i get lots of better timing from the v-station-vst (which is basically the same synth as x-station with some more features) i don’t think this is acceptable at all, i don’t give much for the FULL midi implementation which renoise boasts about, the timing is crappy and renoise doesn’t feature MMC…

another thing which is interesting when reporting a bug on this forum is that noone seems to believe you, everyone tries to find reasons for why a bug doesn’t exist blaming it on bad drivers (especially annoying when the problem doesn’t occur in all other audiosoftware using the same drivers) or whatever… sometimes people doesn’t even read your post before finding out some solution to it… drives me nuts :)

for the voting-poll i would suggest:

[] Full accurate MIDI-support including MMC-master & slave

Thanks for the support Yoki. ;) I’m suspecting more and more that the problem is related to DirectMusic but without any replies from the developers behind Renoise it is hard to tell. I agree with you that it sometimes feels like ppl gives you answers without reading the post through, but on the other hand there are several elements that could be the source of the problem (but aren’t in my case) so I am of course glad that they are mentioned anyhow. :)

Also, adding up to the difficultiness, these “delays” are very small values and depending on what sounds you use and how you listen to music, you might not notice it at all. Testing this does often also require hardware gear which might complicate it even further. However, I also have an old Soundblaster Live in my computer and experienced the same “delays” while playing soundfonts via the DirectMusic-drivers - the problem was that I never managed to get any sound from the card when using the Windows MIDI-drivers in Cubase, but this might very well be caused by that I haven’t installed the original drivers for the Soundblaster-card (and instead rely on the Windows XP-ones).

Anyway, would be cool with a comment from the developers. :yeah:

Then you have to wait a little… Taktik is on holiday till August 8th.

I’m not sure this has got anything to do with DirectMusic (is that a cubase-specific driver?) since I don’t use DirectMusic :) I experience this problem using latest versions of mididrivers for both M-Audio Firewire 410-soundcard and the Novation X-station soundcard/synth (both midi and usb).

I’m sure there are users who doesn’t mind about those milliseconds, but there are also users who doesn’t mind using renoise without the ASIO-drivers, and using hardware synths with renoise is like running vst:s with the onboard soundcard on my laptop in question of timing…

To the devs: is this really that hard to implement? While talking arrangers, pianorolls, subtick-timing etc.etc… Can’t someone spend an hour or two on optimizing the midiroutines and implement MMC for us who have some real synths in addition to the vst ones? (i think you could attract some professional users with this improvement, yes you could)

When it’s possible to achieve perfect midi-sync with my 16mhz atari it shouldn’t be a problem with a 1.6ghz centrino with firewire-midiinterface :P

Vote for it and express it.

I am using Midi with external synth/sampler as well. Whereas I had serious problems on my P3 700 Mhz, when having too much midi-tracks, I have none (hearable) on my new PC P4 2.8, 1 GB Ram, M-Audio 2496 (similar to juniors).
The last track I made I had 14 midi-synth-voices playing at the same (plus some vsti-devices and samples) without problems.
But I will check this next time in more detail I guess… and would support more accurancy of course.

Okay, holidays are over! So, dev-comments? :rolleyes: