[Csnd] parser3 features: explicit types

Hi everyone,

I thought I should start some posts on features of parser3 which is part of Csound 7. There are several new things that Steven has made available which you might find interesting to use. Since there is not yet any documentation, I thought I should start discussing these and then we can see to making pages about it.

In this post, I'll introduce explicit typing. We can now give variables any names by specifying their types on declaration.
The syntax for this is:


where type is a,k,i, etc

For example

instr 1
dur:i = filelen("trololo.wav")
p3 = dur
left:a,right:a = diskin("trololo.wav")

Another thing to note about the example above is that multiple outputs from functions is now working. Same principles
apply to the "classic" syntax

instr 2
dur:i filelen "trololo.wav"
p3 = dur
left:a,right:a diskin "trololo.wav"
out left,right


Csound mailing list
Send bugs reports to
Discussions of bugs and features can be posted here

Hello Victor!
Feb 8 2022, Victor Lazzarini has written:

In this post, I'll introduce explicit typing.


left:a,right:a = diskin("trololo.wav")

Personally, I don't know which of these two features gives me more
pleasure to see. I think it might be the assignment for multiple
outputs. I occasionally found myself doing that without thinking. :slight_smile: I
am looking forward to parser3. I expect there will be other tricks up
its sleeve.

Best wishes,


great stuff. thanks so much, victor, for posts like this one. i can perhaps start a chapter in the floss manual based on these.


yes, I find these features very nice too. Note that it's all working already in the version we have in the develop branch. Another thing about parser3 is that it seems much easier to maintain and extend.

Thanks, we will need to start documenting these things properly.

Thanks Victor. I am very excited about the features offered by the new parser, especially structs and the new UDO syntax.
Steven's thesis (particularly chapters 2.4 and 3.3) is very interesting in that regard.

Are dictionaries/hash tables also scheduled for the next release?


I guess they are, we need to see what we can get done before we can call it ready to release.
There's a lot of tickets to go through.