Page 1 of 1

Play a softsynth (yoshimi) with low latency over a 2nd interface

Posted: Wed Dec 30, 2020 9:07 pm
by bluebell
You have to run jackd with a big buffer size causing big latencies because your DAW project is CPU hungry?
And then you want to record MIDI or audio but your synth plugin in the DAW suffers from the same big latency - making it unplayable?

If you have a 2nd audio interface then you can start a 2nd jackd with a low buffer size an start a synth plugin, e.g. Yoshimi as I described some time ago for Guitarix. Here is my sample script that first checks if one of my Scarlets is plugged in and then uses it for jackd:

Code: Select all

#!/bin/bash

FREQ=48000
BUFFERS=2
PERIODSG=64
PRIO=80
JACK_DEFAULT_SERVER=git
export JACK_DEFAULT_SERVER

for M in 2i2 Solo 2i4
do
  F=`aplay -l | grep $M | cut -d : -f 1 | cut -d " " -f 2`
  if [ -n "$F" ]
  then
    HW="$F"
  fi
done

if [ -n "$HW" ]
then
jackd -n $JACK_DEFAULT_SERVER -R -P$PRIO -p256 -t2000 -dalsa \
  -r$FREQ -p$PERIODSG -n$BUFFERS -Xseq -dhw:$HW \
  >/tmp/jackd-${JACK_DEFAULT_SERVER}.log 2>&1 &

JACKPID=$!
jack_wait -w

sleep 0.5

yoshimi
kill -9 $JACKPID
fi
Be sure to use ALSA MIDI else it gets complicated because you have to start an ALSA-MIDI bridge. But it's possible as well.

Re: Play a softsynth (yoshimi) with low latency over a 2nd interface

Posted: Wed Dec 30, 2020 9:32 pm
by LAM
Interesting, but then you have to use an external mixer? I never tried to start 2 instances of jack server.

Re: Play a softsynth (yoshimi) with low latency over a 2nd interface

Posted: Thu Dec 31, 2020 8:27 am
by bluebell
LAM wrote: Wed Dec 30, 2020 9:32 pm Interesting, but then you have to use an external mixer? I never tried to start 2 instances of jack server.
I feed the audio output of the 2nd interface to the main interface that has a builtin mixer and is connected to a pair of active speakers. Thus the soft synth's signal is mixed with the signal coming from the DAW.