[Csnd-dev] number of opcodes?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd-dev] number of opcodes?

luis jure
Hello, list, I'm a bit confused about the number of opcodes in Csound.

When I run csound -z, I get this message:

time resolution is 1000.000 ns
0dBFS level = 32768.0
--Csound version 6.12 beta (double samples) Aug 20 2018
[commit: 9c72b2bc95742425f8cde3ea4382e763653ba670]
libsndfile-1.0.28
2152 opcodes

ATSadd           ATSaddnz         ATSbufread       ATScross
ATSinfo          ATSinterpread    ATSpartialtap    ATSread
ATSreadnz        ATSsinnoi        FLbox            FLbutBank
FLbutton         FLcloseButton    FLcolor          FLcolor2
...

and a long list of opcodes. But if I count them, there are 1520 opcodes,
not 2152. What's the meaning of this number, and how are the opcodes
counted?


Best,

lj



--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

Steven Yi
Hi Luis,

My guess is the number shown includes deprecated opcodes. Is the number correct when using -z2 or -z3?

Steven

On Thu, Aug 23, 2018, 23:21 luis jure <[hidden email]> wrote:
Hello, list, I'm a bit confused about the number of opcodes in Csound.

When I run csound -z, I get this message:

time resolution is 1000.000 ns
0dBFS level = 32768.0
--Csound version 6.12 beta (double samples) Aug 20 2018
[commit: 9c72b2bc95742425f8cde3ea4382e763653ba670]
libsndfile-1.0.28
2152 opcodes

ATSadd           ATSaddnz         ATSbufread       ATScross
ATSinfo          ATSinterpread    ATSpartialtap    ATSread
ATSreadnz        ATSsinnoi        FLbox            FLbutBank
FLbutton         FLcloseButton    FLcolor          FLcolor2
...

and a long list of opcodes. But if I count them, there are 1520 opcodes,
not 2152. What's the meaning of this number, and how are the opcodes
counted?


Best,

lj



--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

jpff
I suspect the difference is to do with polymorphism.  For example is OSClisten one or two opcodes.

Sent from TypeApp
On 24 Aug 2018, at 05:44, Steven Yi <[hidden email]> wrote:
Hi Luis,

My guess is the number shown includes deprecated opcodes. Is the number correct when using -z2 or -z3?

Steven

On Thu, Aug 23, 2018, 23:21 luis jure < [hidden email]> wrote:
Hello, list, I'm a bit confused about the number of opcodes in Csound.

When I run csound -z, I get this message:

time resolution is 1000.000 ns
0dBFS level = 32768.0
--Csound version 6.12 beta (double samples) Aug 20 2018
[commit: 9c72b2bc95742425f8cde3ea4382e763653ba670]
libsndfile-1.0.28
2152 opcodes

ATSadd           ATSaddnz         ATSbufread       ATScross
ATSinfo          ATSinterpread    ATSpartialtap    ATSread
ATSreadnz        ATSsinnoi        FLbox            FLbutBank
FLbutton         FLcloseButton    FLcolor          FLcolor2
...

and a long list of opcodes. But if I count them, there are 1520 opcodes,
not 2152. What's the meaning of this number, and how are the opcodes
counted?


Best,

lj



--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

luis jure
el 2018-08-24 a las 14:50 John ff escribió:

> I suspect the difference is to do with polymorphism. 

Yes, that's it. With -z1 (where all the forms of an opcode are listed
explicitly) the numbers coincide.

The problem is -z (-z0), that lists each opcode only once, but declares
the same (much bigger) number as -z1.

I think that it would be preferable that all -zX declared the number of
opcodes actually displayed in the list.


--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

jpff
I tend to agree.  Will look at the code


On Fri, 24 Aug 2018, luis jure wrote:

> el 2018-08-24 a las 14:50 John ff escribió:
>
>> I suspect the difference is to do with polymorphism. 
>
> Yes, that's it. With -z1 (where all the forms of an opcode are listed
> explicitly) the numbers coincide.
>
> The problem is -z (-z0), that lists each opcode only once, but declares
> the same (much bigger) number as -z1.
>
> I think that it would be preferable that all -zX declared the number of
> opcodes actually displayed in the list.
>
>
> --
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

jpff
In reply to this post by luis jure
..much easier if the opcode count is at the end of the list 0- saves
double scanning.  Seems to work

-z0
....
zaw                 zawm                zdf_1pole
zdf_1pole_mode
zdf_2pole           zdf_2pole_mode      zdf_ladder          zfilter2
zir                 ziw                 ziwm                zkcl
zkmod               zkr                 zkw                 zkwm
1528 opcodes


-z1
....
zkcl        (null)      kk
zkmod       k           kk
zkr         k           k
zkw         (null)      kk
zkwm        (null)      kkp

2160 opcodes


-z2
....
zawm                zdf_1pole           zdf_1pole_mode      zdf_2pole
zdf_2pole_mode      zdf_ladder          zfilter2            zir
ziw                 ziwm                zkcl                zkmod
zkr                 zkw                 zkwm
1599 opcodes



-z3
....
zkmod       k           kk
zkr         k           k
zkw         (null)      kk
zkwm        (null)      kkp

2255 opcodes
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

luis jure
el 2018-08-24 a las 22:08 jpff escribió:

> Seems to work

That is perfect. Did you commit?



--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

jpff
Not yet.  Waiting for views and the other major change in #include

Sent from TypeApp
On 24 Aug 2018, at 22:59, luis jure <[hidden email]> wrote:
el 2018-08-24 a las 22:08 jpff escribió:

Seems to work

That is perfect. Did you commit?



--
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] number of opcodes?

luis jure
el 2018-08-24 a las 23:49 John ff escribió:

> Not yet.  Waiting for views and the other major change in #include

I see it's updated now, thanks for the improvement.


--