From d7cc2c67f406ce006f03ae583b2737d93403ef99 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Tue, 31 Oct 2006 08:58:58 +0000 Subject: Fixed the no sound issue, was again a path which was not correct. In univorc.csd there was an include for the basic-instruments file. This was removed and the soundfile-player instrument was moved to the orcestra-file. ##FIXME: ask for path for the #include --- diff --git a/csserver/basic.instruments b/csserver/basic.instruments deleted file mode 100755 index bb40c1d..0000000 --- a/csserver/basic.instruments +++ /dev/null @@ -1,120 +0,0 @@ -/* basic instruments - number ranges 101 - 200 -*/ - -instr 101 -/* test oscillators - p4 : unique instance ID - p5 : frequency in MIDI note numbers - p6 : amplitude gain (dB) - p7 : udp send gain (dB) - - channels: - osc..freq - frequency in MIDI note numbers - osc..gain - amplitude gain in dB - osc..udpgain - udp send gain in dB - osc..on - instance control (1: on, 0: off) -*/ -ion = 1 -inst = p4 -Sfreq sprintf "osc.%d.freq", inst ; freq channel -Samp sprintf "osc.%d.gain" , inst ; amp channel -Son sprintf "osc.%d.on" , inst ; instance control channel -Sudp sprintf "osc.%d.udpgain", inst ; udp gain channel -chnset ion, Son -chnset p5, Sfreq -chnset p6, Samp -chnset p7, Sudp -kfr chnget Sfreq -kamp chnget Samp -kon chnget Son -kg2 chnget Sudp -if kon == 0 then -printf "osc:%d OFF\n", 1, inst -turnoff -endif -ka tonek ampdb(kamp),10 -kau tonek ampdb(kg2),10 -;kf tonek cpsoct(kfr/12+3), 10 -a1 oscili 0dbfs, kfr, 1 - outs a1*ka,a1*ka -gaudp1 = a1*kau + gaudp1 -gaudp2 = a1*kau + gaudp2 -printf_i "osc:%d \n", 1, inst -endin - - -instr 102 -/* soundfile play control - p4 : filename - p5 : unique instance ID - p6 : output gain (0-1) - p7 : udp send gain (0-1) - p8 : offset in seconds - - channels: - sfplay..on - instance control channel (1:on 0: off) - sfplay..gain - soundfile play gain (0-1) - sfplay..udpgain - udp send gain (0-1) - sfplay..flen - holds the channel length -*/ -S1 strget p4 -inst = p5 -ich filenchnls S1 -iln filelen S1 -ioffset = p8 - -Slen sprintf "sfplay.%d.flen", p5 ; file length channel -chnset iln, Slen - -if ioffset >= iln then -turnoff -else -iln = iln - ioffset -endif - -Splay sprintf "sfplay.%d.on", inst ; instance control channel -Sname sprintf "sfplay.%d.fname", inst ; filename channel -Sgain sprintf "sfplay.%d.gain", inst ; gain channel -Sudp sprintf "sfplay.%d.udpgain", inst ; udp gain channel - -chnset S1, Sname -chnset 1, Splay -chnset p6, Sgain -chnset p7, Sudp -event_i "i",103,0,iln,inst,ich,ioffset -turnoff -endin - - -instr 103 -/* soundfile player - This is the actual soundfile player. - It never gets called directly -*/ -ich = p5 -inst= p4 -ioffset = p6 -Splay sprintf "sfplay.%d.on", inst ; instance control channel -Sname sprintf "sfplay.%d.fname", inst ; filename channel -Sgain sprintf "sfplay.%d.gain", inst ; gain channel -Sudp sprintf "sfplay.%d.udpgain", inst ; udp gain channel -kon chnget Splay -kg1 chnget Sgain -kg2 chnget Sudp -S1 chnget Sname -if kon == 0 then -printf "sfplay:%d OFF\n", 1, inst -turnoff -endif -if ich = 1 then -a1 diskin2 S1,1,ioffset,1 -a2 = a1 -else -a1,a2 diskin2 S1,1,ioffset,1 -endif - outs a1*kg1, a2*kg1 -gaudp1 = a1*kg2 + gaudp1 -gaudp2 = a2*kg2 + gaudp2 -printf_i "sfplay:%d\n", 1, inst -endin diff --git a/csserver/universe.py b/csserver/universe.py index 9d7f711..cd9c12a 100755 --- a/csserver/universe.py +++ b/csserver/universe.py @@ -91,7 +91,7 @@ if __name__=="__main__": else: port = 40002 - _DIR_CSSERVER = os.path.join(os.path.dirname(__file__)) + _DIR_CSSERVER = os.path.dirname(__file__) s = CsoundServerMult((ipaddr, port)) s.interpret() -- cgit v0.9.1