Re: [Csnd-dev] new parser

joachim heintz <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <[email protected]>
it seems that the new parser is clever enough to look at the output 
type.  of course it would be welcome if someone with insights could confirm.

i compared this simple instrument:

instr 1
   aSig = oscili(0.2,400)
   kSig = oscili(10,0.5)
endin

when running with -v i get this in Csound 6 (showing that both lines use 
the a-rate version of oscili):
instr 1 allocated at 0x559ea703b550
	lclbas 0x559ea703b6e8, opds 0x559ea703b748
op (oscili.a) allocated at 0x559ea703b748
opadr = 0x7f4e813166c7
op (oscili.a) allocated at 0x559ea703fa90
opadr = 0x7f4e813166c7
op (=.down) allocated at 0x559ea7043dd8
opadr = 0x7f4e8132af96
insert(): tp->act_instance = 0x559ea703b550
psave beg at 0x559ea703b6c0
    ending at 0x559ea703b6c0
init oscili.a:
init oscili.a:
init =.down:

when running the same with csound 7 the parser distinguishes between .a 
and .k for both cases:
instr 1 allocated at 0x565430a18020
         lclbas 0x565430a181d8, opds 0x565430a18240
op (oscili.a) allocated at 0x565430a18240
oscili.a init = 0x7f72367788ba
oscili.a perf = 0x7f7236779985
op (oscili.kk) allocated at 0x565430a1c5b8
oscili.kk init = 0x7f72367788ba
oscili.kk perf = 0x7f723677981c
insert(): tp->act_instance = 0x565430a18020
psave beg at 0x565430a181b0
    ending at 0x565430a181b0
init oscili.a:
init oscili.kk:




On 17/12/2024 20:51, joachim heintz wrote:
> for functional style of code writing, we need the type specifier to 
> choose the appropriate version of an opcode, like
> aSig = oscili:a(.2,200)
> versus
> kSig = oscili:k(10,1)
> 
> is this still necessary in CS7?  or can the new parser "look" at the 
> output and see that here is a-rate necessary, but there k-rate?
> 
> cheers -
>      joachim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.