Concerning schedtool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I gave it a royal tryout just now.  Below is sound-patch startup code, it's actually a mashup of most of my START-INITIAL script which runs at boot, and the first patch script which it calls.  When I keep the schedtool prefixes, MIDI keyhits all make it in and synths all get their signal out through the sound card output.  When I don't, about one in 20-30 keyhits (and also occasionally key-ups) get lost, and there are cutouts both at high load and very low loads.  Some may notice I have let the latency rise to 4; this too seems to be indicated for the loads I'm using, though if I were using just one light load (say, a simple Yoshimi patch), it could be ratcheted down a lot.  Oddly, it does appear that a different patch which calls just Fluidsynth, functions as a heavier load than three Yoshimis; it is true that Fluidsynth is itself using a rather big four-voiced soundfont.  I have another which right now is two Yoshimis plus the same Fluidsynth an octave lower (octave handled by mididings), that one is higher yet, but the setup and weights below are handling it well.

The relative weights are definitely guesses based on behavior. I just increase the weight of anything which misbehaves, until it makes it worse, then reverse :-)  I did find earlier tonight that I had neglected my limits.conf, so this is what I have set now, which allows those numbers below to actually work:

@audio          -       rtprio          95
@audio          -       nice           -19
@audio          -       memlock         512000

I'm not sure the nice is at all needed, but it doesn't seem to be harming anything.

J.E.B.

------

jack_control start

jack_control ds dummy
jack_control dps capture 0
jack_control dps playback 0
jack_control dps rate 48000
jack_control dps period 64
jack_control eps realtime true
jack_control eps realtime-priority 50
jack_control eps clock-source 1

# Stop any running audio elements
echo "Stop any running audio elements..."
killall -9 -w yoshimi fluidsynth zita-j2a aj-snapshot calfjackhost non-mixer rakarrack mididings lashd
killall -9 -w yoshimi fluidsynth zita-j2a aj-snapshot calfjackhost non-mixer rakarrack mididings lashd

# Remove all connections
echo "Stopping a2j..."
a2j_control stop
echo "Stopping Jackd to remove all connections..."
killall -9 -w jackdbus
killall -9 -w jackdbus
jack_control stop
echo "Starting Jackd..."
jack_control start
sleep 2

# Running a2j -- needful to use ALSA MIDI devices with
# zita-a2j, which uses the 'dummy' driver in Jack
echo "Starting a2jmidid..."
a2j_control ehw
a2j_control start

# Start zita-j2a for audio out
echo "Starting Zita..."
nohup schedtool -R -p 80 -e zita-j2a -d hw:SB -r 48000 -p 64  &

# Start all relevant audio elements
echo "Start all relevant audio elements..."
nohup schedtool -R -p 75 -e mididings -f /home/jeb/Combine.py     \
    > /home/jeb/LOGS/Combine.log &
nohup schedtool -R -p 50 -e calfjackhost --client CalfSRO     \
    eq12:SRO ! reverb:SRO ! Compressor:SRO             \
    > /home/jeb/LOGS/calfjackhost-SRO.log &
nohup schedtool -R -p 50 -e yoshimi -N YoshSRO1 -j \
    -l /home/jeb/YOSHIMI/SROpart1.xmz  > /home/jeb/LOGS/Yoshimi-SRO1.log &
nohup schedtool -R -p 50 -e yoshimi -N YoshSRO2 -j \
    -l /home/jeb/YOSHIMI/SROpart2.xmz  > /home/jeb/LOGS/Yoshimi-SRO2.log &
nohup schedtool -R -p 50 -e yoshimi -N YoshSRO3 -j \
    -l /home/jeb/YOSHIMI/SROpart3.xmz  > /home/jeb/LOGS/Yoshimi-SRO3.log &
sleep 2

# And lastly, create jackd connections using aj-snapshot
echo "And lastly, create jackd connections using aj-snapshot..."
cp /home/jeb/AJSRO.xml /home/jeb/AJRunning.xml
nohup schedtool -R -p 75 -e aj-snapshot -d AJRunning.xml &

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux