I have got an issue regarding the timing performance of Portmidi. It would be nice to discuss it here.
I build Portmidi with the MinGW C Compiler in Eclipse Juno at highest optimizing level -O3. The program is running on Windows 7. My application is quite simple:
Read in the midi stream from an Alesis Percpad through an Alesis io2 USB-to-MIDI Interface by polling with “pm_Poll()”.
Everytime the “pm_Poll()” result is true, write one note to the output MIDI stream opened at the Microsoft Wavetable Synth with “Pm_Write()”. Since the Percpad only sends data when it is hit I don’t have to filter or evaluate the data, thus the TRUE return from “pm_Poll()” does it all.
Now my problem is that the delay between hitting and playing the note is very significant! It’s about more than 100ms. When I play at 100bpm I have to hit about one 16th note before to get the note in time. May this depend on the Portmidi implementation or is it my hardware?
My Pm_Event buffer has got only the size of 1 for the time being but I don’t think that this is the point because I just need it to empty the MIDI buffer and not evaluate the data.
What is the Timing Performance of Portmidi at all??
Looking forward to your suggestions!
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps it's useful for newbies to know about this before you investigating a lot! Just try another synth. Now I plugged a Ketron SD2 and everthing is fine!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
I have got an issue regarding the timing performance of Portmidi. It would be nice to discuss it here.
I build Portmidi with the MinGW C Compiler in Eclipse Juno at highest optimizing level -O3. The program is running on Windows 7. My application is quite simple:
Now my problem is that the delay between hitting and playing the note is very significant! It’s about more than 100ms. When I play at 100bpm I have to hit about one 16th note before to get the note in time. May this depend on the Portmidi implementation or is it my hardware?
My Pm_Event buffer has got only the size of 1 for the time being but I don’t think that this is the point because I just need it to empty the MIDI buffer and not evaluate the data.
What is the Timing Performance of Portmidi at all??
Looking forward to your suggestions!
Regards
Ok guys, it's pretty simple!
The Problem was just using the MS Wavetable synth as Output which produces horrible latency (read here: http://haskell.cs.yale.edu/euterpea/midi-on-windows/).
Perhaps it's useful for newbies to know about this before you investigating a lot! Just try another synth. Now I plugged a Ketron SD2 and everthing is fine!