[sdiy] Raspberry Pi 2 B Synthesizer Project Progress

Scott Gravenhorst music.maker at gte.net
Tue Mar 15 20:36:49 CET 2016


ASSI <Stromeko at nexgo.de> wrote:
 >On Tuesday 15 March 2016, 11:58:52, Scott Gravenhorst wrote:
 >> More progress - the current version works with latency (MIDI note-on
 >> receipt to start of sound) of 2 milliseconds.
 >>
 >> Now that I finally understand how the buffer usage algorithm works
 >> for ALSA, I started reducing the buffer size until it stopped
 >> working.  4 periods caused error messages from ALSA where 6 periods
 >> ran smoothly.
 >>
 >> 6 periods or 48 frames at 44.1 ksps is about 1.09 milliseconds.
 >
 >You can likely wring out some more performance when you set your
 >processes up with the correct real-time scheduling strategy and
 >priority and maybe CPU
 >affinity.
 >
 >
 >Regards,
 >Achim.

Yes, I do use isolcpus and CPU affinity.  One core runs nothing but the 
MIDI controller and voice assigner thread, another core runs nothing but 
the synth thread.  When I got the Cirrus Logic / Element14 audio board, 
I needed to download a pre-patch kernel with the driver as part of the 
patch.  This came with instructions on how to set for real-time audio. 
I did try to "nice" the synth to -20, but there was no effect on 
measured latency.

Unfortunately, the chance of a loadable driver may never happen, but 
thankfully, the kernel I am using (Arch 4.1.13) is quite stable and 
lacks no feature I need so being locked to that kernel is not an issue. 
  I have seen that other folks have patched the kernel for higher 
versions (I believe 4.1.18 is available pre-patched and compiled).

-- ScottG



More information about the Synth-diy mailing list