[Csnd] syntax issues
Date | 2024-02-16 11:55 |
From | Enrico Francioni <00000005323c8739-dmarc-request@LISTSERV.HEANET.IE> |
Subject | [Csnd] syntax issues |
If I may I have some questions regarding the syntax of Csound. 1. What is the function of the following call with the fractional instrument number? schedule 1.001, iwhen, idur [, ip4] [, ip5] [...] ; (the explanation in the Csound Manual is as follows: fraction 0.001 tells that low one, but what does it mean?); 2. Where can I find explanations on the use of the new shortcuts in the Csound syntax? In particular - so quickly - in these specific cases? • if (release()==1) then • (active:k(1902)+2) • linen:a(1,0.02,p3,0.1) • (chnget:k("volume")) Thanks for any help… E Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2024-02-16 12:10 |
From | Rory Walsh |
Subject | Re: [Csnd] syntax issues |
Adding a fractional instrument number can give you greater access to individual instances. You can start N instances of instrument 1, all with a unique ID. schedule 1.001, iwhen, idur [, ip4] [, ip5] [...] ; schedule 1.002, iwhen, idur [, ip4] [, ip5] [...] ; schedule 1.003, iwhen, idur [, ip4] [, ip5] [...] ; schedule 1.004, iwhen, idur [, ip4] [, ip5] [...] ; schedule 1.005, iwhen, idur [, ip4] [, ip5] [...] ; It can also be used for tying notes, but I've never done this, so can't comment on how that works. I find it most useful when I have to disable certain instances of an instrument. In many cases I only want to disable a single instance of instrument N but can't do so unless I give each instance a unique ID via a fractional part. Where can I find explanations on the use of the new shortcuts in the Csound syntax? Any opcode with a single output can be called using functional syntax. "if (release()==1) then" in long form is this: k1 release if k1 == 1 then linen:a(1,0.02,p3,0.1) in long form is this: aOut linen 1, 0.02, p3, 0.1 Although Csound will try to use the correct rate of the opcode, it's good practice to explicitly state the rate using the : operator, as in linen:k(), vs linen:a() |