Csound Csound-dev Csound-tekno Search About

[Csnd-dev] number of opcodes?

Date2018-08-24 04:21
Fromluis jure
Subject[Csnd-dev] number of opcodes?
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



Date2018-08-24 05:43
FromSteven Yi
SubjectRe: [Csnd-dev] number of opcodes?
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 <ljc@internet.com.uy> 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



--

Date2018-08-24 14:50
FromJohn ff
SubjectRe: [Csnd-dev] number of opcodes?
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 <stevenyi@gmail.com> 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 < ljc@internet.com.uy> 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



--

Date2018-08-24 20:05
Fromluis jure
SubjectRe: [Csnd-dev] number of opcodes?
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.


Date2018-08-24 21:56
Fromjpff
SubjectRe: [Csnd-dev] number of opcodes?
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.
>
>
> --
>

Date2018-08-24 22:08
Fromjpff
SubjectRe: [Csnd-dev] number of opcodes?
..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

Date2018-08-24 22:58
Fromluis jure
SubjectRe: [Csnd-dev] number of opcodes?
el 2018-08-24 a las 22:08 jpff escribió:

> Seems to work

That is perfect. Did you commit?



Date2018-08-24 23:49
FromJohn ff
SubjectRe: [Csnd-dev] number of opcodes?
Not yet.  Waiting for views and the other major change in #include

Sent from TypeApp
On 24 Aug 2018, at 22:59, luis jure <ljc@internet.com.uy> wrote:
el 2018-08-24 a las 22:08 jpff escribió:

Seems to work

That is perfect. Did you commit?



--

Date2018-08-26 13:43
Fromluis jure
SubjectRe: [Csnd-dev] number of opcodes?
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.