hi again -
you will have to write code depending on your needs. below is a simple example. once you started, you have ten seconds for a live performance with the computer keyboard. this will be written as single score lines to a text file called "events.txt". after one second pause, this will be repeated, as this file is being read, and all events are scheduled again.
there are certainly other possibilities; i don't know how the function in the csound~ object is programmed.
cheers -
joachim
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1
instr Record
key, kdown sensekey
if kdown==1 && changed(kdown)==1 then
fprintks("events.txt","i \"Sound\" %f 1 %d\n",timeinsts(),key)
schedulek("Sound",0,1,key)
endif
endin
instr Repeat
ilinenum init 0
while ilinenum != -1 do
Sline,ilinenum readfi "events.txt"
scoreline_i(Sline)
od
endin
instr Sound
iPch = p4
aSound = mode(mpulse(1,p3),mtof(iPch),random:i(50,200))
outall(aSound)
endin
</CsInstruments>
<CsScore>
i "Record" 0 10
i "Repeat" 11 10
</CsScore>
</CsoundSynthesizer>
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here