portaudio vs rtaudio

B
brian posted Jul 25 '15, 05:15:

Any reasons why you chose portaudio + rtmidi instead of portaudio + portmidi or rtaudio + rtmidi ?
Also did you try playing something like flac from disk instead of loading all up into ram?

J
joseph posted Jul 25 '15, 16:58:

Hi brian,

I chose pyaudio (that uses portaudio) because it was very straightforward to implement writing on audio out with a callback function. Is it possible easily as well with rtaudio, with a python module? If so, I would be very interested to test it as well.

About MIDI, I used rtmidi-python because it was the first MIDI module I found for python, and it worked very well. There are some caveats, though: if you plug a USB MIDI keyboard (then it will be recognized by SamplerBox, hotplug), then unplug it, and plug it again, it won't really work...

Also did you try playing something like flac from disk instead of
loading all up into ram?

I haven't even tried, but I really don't think it would allow 100 voices of polyphony.
Usually FLAC's compression ratio is 40% or 50%, so it would allow maybe going from 10 voices of polyphony (using WAV files disk-streaming) to 20 voices of polyphony (using FLAC files disk-streaming), but not really more than that, I guess.

I would be happy to discuss about these things and share some tests if some are available.

...

  (not published)
  I want to post as guest
 

Post