David Adler wrote:
> This requires that qjackctl isn't running, so the
> full version for scripted pseudo-on-the-fly
> pachbay change is:
>
>
> TEST=`ps ax | grep qjackctl | grep -v grep | wc -l`
>  if [ $TEST = 0 ]
>  then
>      killall qjackctl
>  fi
> qjackctl -a /path/to/patchbaydefenition.xml

I can't speak for this example, but for my actual start-session script 
"killall" sometimes isn't okay. I added "-9 -w" and now it seems to be 
okay all the time. I kill all apps before I launch them, even if they 
aren't running, to avoid that there are unwanted processes running after 
a crash.

#!/bin/sh
# sh start-session

song_path=`pwd`
song_name="devoid_of_meaning"
song_version="06"
song_date="Jan/17/2010"
song_info="
\n############################
\n# Project: $song_name
\n# Version: $song_version
\n# $song_date Ralf Mardorf
\n############################\n"

if [ $USER = "root" ] ; then
 echo "\nOnly a user is allowed to run this script :)\n"
else
 echo $song_info

 ### CPU ferquency scaling
 echo "\nSetting up CPU frequency scaling for 64 Studio 3.0-beta3"
 cpufreq-selector -g performance
 if [ $? = 0 ] ; then echo "Done" ; fi

 ### Killall
 apps="jack_snapshot qtractor sr-2a jackd"
 echo "\nkillall -9 -w $apps"
 killall -9 -w $apps
 
 ### Restore session
 echo "\nRestoring session :)"
 sample_rate=96000
 frames_period=512
 echo "\njackd -Rdalsa -dhw:0 -r$sample_rate -p$frames_period -n2 -Xseq"
 jackd -Rdalsa -dhw:0 -r$sample_rate -p$frames_period -n2 -Xseq & sleep 2
 sr-2a & sleep 2
 qtractor "$song_path/qtr/$song_name-$song_version.qtr" & sleep 2
 jack_snapshot restore "$song_path/$song_name-$song_version.jsnap"
 echo
fi
exit 0
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to