This commit is contained in:
FoAM 2018-05-21 07:18:36 +00:00
parent dfa7bdbf6e
commit b72f1d397f
3 changed files with 16 additions and 12 deletions

View file

@ -25,9 +25,7 @@
# */5 * * * * /home/foam/ephemeral-garden/check.sh >> /home/foam/ephemeral-garden/test.log 2>&1 # */5 * * * * /home/foam/ephemeral-garden/check.sh >> /home/foam/ephemeral-garden/test.log 2>&1
* 07 * * * /home/foam/ephemeral-garden/morning.sh >> /home/foam/ephemeral-garden/test.log 2>&1 * 07 * * * /home/foam/ephemeral-garden/morning.sh >> /home/foam/ephemeral-garden/test.log 2>&1
* 22 * * * /home/foam/ephemeral-garden/evening.sh >> /home/foam/ephemeral-garden/test.log 2>&1 * 23 * * * /home/foam/ephemeral-garden/evening.sh >> /home/foam/ephemeral-garden/test.log 2>&1
# in root's crontab. check timing # in root's crontab. check timing
# 0 4 * * * /sbin/shutdown -r now # 0 4 * * * /sbin/shutdown -r +5

View file

@ -19,6 +19,13 @@ s.boot;
"...".postln; "...".postln;
Routine {
// quantise to 10 second boundaries
("now -> " ++ Date.gmtime.second).postln;
(10-Date.gmtime.second.mod(10)).wait;
"sync?...".postln;
}.play;
// time of day - see AppClock for scheduling // time of day - see AppClock for scheduling
~now=Date.gmtime; ~now=Date.gmtime;
@ -29,8 +36,7 @@ if ( ~now.year == 1970,
{"post 1970".postln;} {"post 1970".postln;}
); );
~now.hour.postln; ~now.postln;
~prefix = Platform.userHomeDir ++ "/snd/"; ~prefix = Platform.userHomeDir ++ "/snd/";
@ -40,7 +46,7 @@ if ( ~now.year == 1970,
// list of soundfiles // list of soundfiles
~sources = [ ~sources = [
"ephemera-20180516.wav" "ephemera-20180520-2ch-12.wav"
]; ];
// select random element from the list // select random element from the list
@ -81,8 +87,8 @@ if ( ~now.year == 1970,
Routine { Routine {
"~play [bg - ".post; b1.path.post; "]".postln; "~play [bg - ".post; b1.path.post; "]".postln;
{(DiskIn.ar(2, b1, loop: 0) * 0.1).dup }.play.waitForFree; {DiskIn.ar(2, b1, loop: 0)}.play.waitForFree;
// free buffer once done? // free buffer once done? check diskin completion state
"freed [bg - ".post; b1.path.post; "]".postln; "freed [bg - ".post; b1.path.post; "]".postln;
b1.free; b1.free;

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
# via -> http://sc3howto.blogspot.be/2015/04/how-to-keep-installation-running-on.html
export DISPLAY=:0 export DISPLAY=:0
#export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus #export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
#export XDG_RUNTIME_DIR=/run/user/1001 #export XDG_RUNTIME_DIR=/run/user/1001
@ -13,8 +11,10 @@ echo "ephemeral: ------------------------------------------------------------"
echo "ephemeral: `/bin/date`" echo "ephemeral: `/bin/date`"
echo "ephemeral: as user `whoami`" echo "ephemeral: as user `whoami`"
#echo "ephemeral: with env -> `env`" #echo "ephemeral: with env -> `env`"
echo "ephemeral: waiting..."
echo "ephemeral: scythe..."
killall sclang
sleep 5 sleep 5
echo "ephemeral: sclang starting..." echo "ephemeral: sclang starting..."