[Csnd] log of instrument calls
Date | 2020-07-27 02:12 |
From | Forrest Curo |
Subject | [Csnd] log of instrument calls |
How could I make a file listing all score lines (including rt score events via command-line -L) in a csound run? Forrest Curo San Diego |
Date | 2020-07-27 08:49 |
From | 00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE |
Subject | Re: [Csnd] log of instrument calls |
I'd try to let the instruments write the score/rt event they receive something like (not tested): Instr X S_event sprintf "i %f %f %f %f", p1, p2, p3, p4, p5 fprints "score.sco", S_event ;instrument code ;instrument code endin Ciao Stefano > Il 27/07/2020 03:12 Forrest Curo |
Date | 2020-07-27 14:22 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
Ah! So with instruments that only get called by other instruments, I could just leave those lines out. But in place of p2 in your example, you'd want to put the result of 'times': timestimes — Read absolute time in seconds. DescriptionRead absolute time, in seconds, since the start of the performance. On Mon, Jul 27, 2020 at 12:49 AM <00000008a49663bc-dmarc-request@listserv.heanet.ie> wrote: I'd try to let the instruments write the score/rt event they receive something like (not tested): |
Date | 2020-07-27 16:12 |
From | 00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE |
Subject | Re: [Csnd] log of instrument calls |
Yes, only on instruments you activate. Times opcode make more sense than p2, you are right. Hope it works
|
Date | 2020-07-27 21:02 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
And now (with a little copy & paste) I have playback! Can edit & (adding new instruments) accompany myself, whee! ie instr 1; low notes of scale (degrees 1 & 2) itim times S_event sprintf "i %f %f %f %f %f\n", p1, itim, p3, p4, p5 fprints "score.sco", S_event giscale[1] = p4; giscale[2] = p5; print giscale[1], giscale[2] endin ======= [score.sco]: i 1.000000 0.000000 0.100000 2.000000 4.000000 i 1.000000 7.970249 0.100000 1.000000 2.000000 i 1.000000 8.759728 0.100000 1.000000 3.000000 i 1.000000 9.549206 0.100000 1.000000 4.000000 i 1.000000 10.361905 0.100000 2.000000 3.000000 i 1.000000 11.128163 0.100000 2.000000 4.000000 i 1.000000 12.103401 0.100000 3.000000 4.000000 On Sun, Jul 26, 2020 at 6:12 PM Forrest Curo <treegestalt@gmail.com> wrote:
|
Date | 2020-07-27 21:31 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
Attachments | 52.mp3 |
Some scale & timbre changes were GUied into the first run, others were added real-time during playback... On Mon, Jul 27, 2020 at 1:02 PM Forrest Curo <treegestalt@gmail.com> wrote:
|
Date | 2020-07-28 13:52 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
Um! Notes will proliferate if you simply add the logfile to the score and replay! To prevent: instr 1; low notes of scale (degrees 1 & 2) ip = p1 If(ip != int(ip)) igoto dontlog ; This score line is from the logfile ip = ip + 0.5 itim times S_event sprintf "i %f %f %f %f %f\n", ip, itim, p3, p4, p5 fprints "score.sco", S_event dontlog: [rest of instrument code] On Mon, Jul 27, 2020 at 1:31 PM Forrest Curo <treegestalt@gmail.com> wrote:
|
Date | 2020-07-29 04:39 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
I keep having trouble with fractional instrument calls. Csound keeps misreading them here as an opcode (integer part) plus one argument. So. Extra instruments: instr 1 and instr 101. (etc) Instrument 'n' writes its log data as a line calling instrument 'n+ 100', which is just like instrument 'n' except for not adding a score line. Phew! On Tue, Jul 28, 2020 at 5:52 AM Forrest Curo <treegestalt@gmail.com> wrote:
|
Date | 2020-08-14 20:57 |
From | Forrest Curo |
Subject | Re: [Csnd] log of instrument calls |
Here, for anyone trying to do this, is how I got the start time and duration of a real-time instrument's notes into the score file: (You want an i-rate variable for the start time -- but duration [a k-rate variable] won't go accurately into a sprintf string without some maneuvering. Until I put in the line: "if (itom ==0) goto noprint" there'd be two score lines printed for each instance, one with a duration of 0.) ktom timeinsts if lastcycle() == 1 then rerun: itom = i(ktom) reinit rerun S_event sprintf "i %d %.2f %.2f %d %d\n", 21, itim, itom, p4, p5 if (itom ==0) goto noprint fprints "score.sco", S_event noprint: endif endin On Tue, Jul 28, 2020 at 8:39 PM Forrest Curo <treegestalt@gmail.com> wrote:
|