Debian Codegraph @

src/Examples/FLOSS Manual Examples/08 Other Communication/08A05_send_receive_audio.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -m 128
4 </CsOptions>
5 <CsInstruments>
6
7 sr = 44100
8 ksmps = 128
9 nchnls = 2
10 0dbfs = 1
11
12 giPortHandle OSCinit 47120
13
14 instr Send
15 kSendTrigger init 1
16 aSend poscil .2, 400
17 OSCsend kSendTrigger, "", 47120, "/exmp_5/audio", "a", aSend
18 kSendTrigger += 1
19 endin
20
21 instr Receive
22 aReceive init 0
23 kGotIt OSClisten giPortHandle, "/exmp_5/audio", "a", aReceive
24 out aReceive, aReceive
25 endin
26
27 </CsInstruments>
28 <CsScore>
29 i "Receive" 1 3
30 i "Send" 0 5
31 </CsScore>
32 </CsoundSynthesizer>
33 ;example by joachim heintz