Csound Csound-dev Csound-tekno Search About

[Csnd] table indexing

Date2018-12-23 15:42
FromAndrea Strappa
Subject[Csnd] table indexing
Attachmentstest_midi_natural_harmonics_scale_array.csd  test_midi_natural_harmonics_scale_table.csd  
Hi list,
I wrote an alternative intonation system, performed by indexing with pchmidinn decimal part.
With array it works. With table some index fails the right reading.
Does not work table opcode or am I wrong something?
I attach two examples.
Greetings
Andrea S.



Avast logo

Questa e-mail è stata controllata per individuare virus con Avast antivirus.
www.avast.com



Date2018-12-23 16:33
Fromjpff
SubjectRe: [Csnd] table indexing
Quick read of the code suggests that table opcode requires a power-of-two 
length table.  Will check further.... you should use te tab opcode 
instead.

==John ff


On Sun, 23 Dec 2018, Andrea Strappa wrote:

> Hi list,
> I wrote an alternative intonation system, performed by indexing with pchmidinn
> decimal part.
> With array it works. With table some index fails the right reading.
> Does not work table opcode or am I wrong something?
> I attach two examples.
> Greetings
> Andrea S.
> 
>

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

Date2018-12-23 16:37
Fromjoachim heintz
SubjectRe: [Csnd] table indexing
i thought this limitation has been removed since long?


On 23/12/18 17:33, jpff wrote:
> Quick read of the code suggests that table opcode requires a
> power-of-two length table.  Will check further.... you should use te tab
> opcode instead.
>
> ==John ff
>
>
> On Sun, 23 Dec 2018, Andrea Strappa wrote:
>
>> Hi list,
>> I wrote an alternative intonation system, performed by indexing with
>> pchmidinn
>> decimal part.
>> With array it works. With table some index fails the right reading.
>> Does not work table opcode or am I wrong something?
>> I attach two examples.
>> Greetings
>> Andrea S.
>>
>>
>
> 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

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

Date2018-12-23 16:58
FromJohn ff
SubjectRe: [Csnd] table indexing
The code uses the length mask so is poweroftwo

⁣Sent from TypeApp ​

On Dec 23, 2018, 16:38, at 16:38, joachim heintz  wrote:
>i thought this limitation has been removed since long?
>
>
>On 23/12/18 17:33, jpff wrote:
>> Quick read of the code suggests that table opcode requires a
>> power-of-two length table.  Will check further.... you should use te
>tab
>> opcode instead.
>>
>> ==John ff
>>
>>
>> On Sun, 23 Dec 2018, Andrea Strappa wrote:
>>
>>> Hi list,
>>> I wrote an alternative intonation system, performed by indexing with
>>> pchmidinn
>>> decimal part.
>>> With array it works. With table some index fails the right reading.
>>> Does not work table opcode or am I wrong something?
>>> I attach two examples.
>>> Greetings
>>> Andrea S.
>>>
>>>
>>
>> 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
>
>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

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

Date2018-12-23 19:14
Fromjoachim heintz
SubjectRe: [Csnd] table indexing
i made a test and found no problems in using a non-pow-of-two table size.
what am i missing here?

giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

instr Test
  indx = 0
  while indx < 13 do
   iVal table indx, giTable
   print iVal
   indx += 1
  od
endin
schedule "Test", 0, 0

outputs:
instr 1:  iVal = 1.000
instr 1:  iVal = 2.000
instr 1:  iVal = 3.000
instr 1:  iVal = 4.000
instr 1:  iVal = 5.000
instr 1:  iVal = 6.000
instr 1:  iVal = 7.000
instr 1:  iVal = 8.000
instr 1:  iVal = 9.000
instr 1:  iVal = 10.000
instr 1:  iVal = 11.000
instr 1:  iVal = 12.000
instr 1:  iVal = 13.000





On 23/12/18 17:58, John ff wrote:
> The code uses the length mask so is poweroftwo
>
> ⁣Sent from TypeApp ​
>
> On Dec 23, 2018, 16:38, at 16:38, joachim heintz  wrote:
>> i thought this limitation has been removed since long?
>>
>>
>> On 23/12/18 17:33, jpff wrote:
>>> Quick read of the code suggests that table opcode requires a
>>> power-of-two length table.  Will check further.... you should use te
>> tab
>>> opcode instead.
>>>
>>> ==John ff
>>>
>>>
>>> On Sun, 23 Dec 2018, Andrea Strappa wrote:
>>>
>>>> Hi list,
>>>> I wrote an alternative intonation system, performed by indexing with
>>>> pchmidinn
>>>> decimal part.
>>>> With array it works. With table some index fails the right reading.
>>>> Does not work table opcode or am I wrong something?
>>>> I attach two examples.
>>>> Greetings
>>>> Andrea S.
>>>>
>>>>
>>>
>>> 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
>>
>> 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
>
> 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
>

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

Date2018-12-23 19:32
FromJohn ff
SubjectRe: [Csnd] table indexing
Did you check the other modes?

Sent from TypeApp
On 23 Dec 2018, at 19:15, joachim heintz <jh@joachimheintz.de> wrote:
i made a test and found no problems in using a non-pow-of-two table size.
what am i missing here?

giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

instr Test
indx = 0
while indx < 13 do
iVal table indx, giTable
print iVal
indx += 1
od
endin
schedule "Test", 0, 0

outputs:
instr 1: iVal = 1.000
instr 1: iVal = 2.000
instr 1: iVal = 3.000
instr 1: iVal = 4.000
instr 1: iVal = 5.000
instr 1: iVal = 6.000
instr 1: iVal = 7.000
instr 1: iVal = 8.000
instr 1: iVal = 9.000
instr 1: iVal = 10.000
instr 1: iVal = 11.000
instr 1: iVal = 12.000
instr 1: iVal = 13.000





On 23/12/18 17:58, John ff wrote:
The code uses the length mask so is poweroftwo

⁣Sent from TypeApp ​

On Dec 23, 2018, 16:38, at 16:38, joachim heintz <jh@joachimheintz.de> wrote:
i thought this limitation has been removed since long?


On 23/12/18 17:33, jpff wrote:
Quick read of the code suggests that table opcode requires a
power-of-two length table. Will check further.... you should use te
tab
opcode instead.

==John ff


On Sun, 23 Dec 2018, Andrea Strappa wrote:

Hi list,
I wrote an alternative intonation system, performed by indexing with
pchmidinn
decimal part.
With array it works. With table some index fails the right reading.
Does not work table opcode or am I wrong something?
I attach two examples.
Greetings
Andrea S.



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

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

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


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

Date2018-12-23 19:45
Fromjoachim heintz
SubjectRe: [Csnd] table indexing
do you mean this?  it returns the same for me.

giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

instr Test
  indx = 0
  while indx < 13 do
   iVal table indx/13, giTable, 1
   print iVal
   indx += 1
  od
endin
schedule "Test", 0, 0



On 23/12/18 20:32, John ff wrote:
> Did you check the other modes?
>
> Sent from TypeApp 
> On 23 Dec 2018, at 19:15, joachim heintz  > wrote:
>
>     i made a test and found no problems in using a non-pow-of-two table size.
>     what am i missing here?
>
>     giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
>
>     instr Test
>       indx = 0
>       while indx < 13 do
>        iVal table indx, giTable
>        print iVal
>        indx += 1
>       od
>     endin
>     schedule "Test", 0, 0
>
>     outputs:
>     instr 1:  iVal = 1.000
>     instr 1:  iVal = 2.000
>     instr 1:  iVal = 3.000
>     instr 1:  iVal = 4.000
>     instr 1:  iVal = 5.000
>     instr 1:  iVal = 6.000
>     instr 1:  iVal = 7.000
>     instr 1:  iVal = 8.000
>     instr 1:  iVal = 9.000
>     instr 1:  iVal = 10.000
>     instr 1:  iVal = 11.000
>     instr 1:  iVal = 12.000
>     instr 1:  iVal = 13.000
>
>
>
>
>
>     On 23/12/18 17:58, John ff wrote:
>
>         The code uses the length mask so is poweroftwo
>
>         ⁣Sent from TypeApp ​
>
>         On Dec 23, 2018, 16:38, at 16:38, joachim heintz
>          wrote:
>
>             i thought this limitation has been removed since long?
>
>
>             On 23/12/18 17:33, jpff wrote:
>
>                 Quick read of the code suggests that table opcode requires a
>                 power-of-two length table. Will check further.... you
>                 should use te
>
>             tab
>
>                 opcode instead.
>
>                 ==John ff
>
>
>                 On Sun, 23 Dec 2018, Andrea Strappa wrote:
>
>                     Hi list,
>                     I wrote an alternative intonation system, performed
>                     by indexing with
>                     pchmidinn
>                     decimal part.
>                     With array it works. With table some index fails the
>                     right reading.
>                     Does not work table opcode or am I wrong something?
>                     I attach two examples.
>                     Greetings
>                     Andrea S.
>
>
>
>
>                 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
>
>
>             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
>
>
>         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
>
>
>
>     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
>
> 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

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

Date2018-12-23 19:55
Fromjpff
SubjectRe: [Csnd] table indexing
OK; the code must be ver complex then.  Not also thw iwrap=2 case which 
does not appear in the manual and I am not sure it works always.

On Sun, 23 Dec 2018, joachim heintz wrote:

> do you mean this?  it returns the same for me.
>
> giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
>
> instr Test
> indx = 0
> while indx < 13 do
>  iVal table indx/13, giTable, 1
>  print iVal
>  indx += 1
> od
> endin
> schedule "Test", 0, 0
>
>
>
> On 23/12/18 20:32, John ff wrote:
>> Did you check the other modes?
>> 
>> Sent from TypeApp 
>> On 23 Dec 2018, at 19:15, joachim heintz > > wrote:
>>
>>     i made a test and found no problems in using a non-pow-of-two table 
>> size.
>>     what am i missing here?
>>
>>     giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
>>
>>     instr Test
>>       indx = 0
>>       while indx < 13 do
>>        iVal table indx, giTable
>>        print iVal
>>        indx += 1
>>       od
>>     endin
>>     schedule "Test", 0, 0
>>
>>     outputs:
>>     instr 1:  iVal = 1.000
>>     instr 1:  iVal = 2.000
>>     instr 1:  iVal = 3.000
>>     instr 1:  iVal = 4.000
>>     instr 1:  iVal = 5.000
>>     instr 1:  iVal = 6.000
>>     instr 1:  iVal = 7.000
>>     instr 1:  iVal = 8.000
>>     instr 1:  iVal = 9.000
>>     instr 1:  iVal = 10.000
>>     instr 1:  iVal = 11.000
>>     instr 1:  iVal = 12.000
>>     instr 1:  iVal = 13.000
>> 
>> 
>> 
>> 
>>
>>     On 23/12/18 17:58, John ff wrote:
>>
>>         The code uses the length mask so is poweroftwo
>>
>>         ⁣Sent from TypeApp
>>         On Dec 23, 2018, 16:38, at 16:38, joachim heintz
>>          wrote:
>>
>>             i thought this limitation has been removed since long?
>> 
>>
>>             On 23/12/18 17:33, jpff wrote:
>>
>>                 Quick read of the code suggests that table opcode requires 
>> a
>>                 power-of-two length table. Will check further.... you
>>                 should use te
>>
>>             tab
>>
>>                 opcode instead.
>>
>>                 ==John ff
>> 
>>
>>                 On Sun, 23 Dec 2018, Andrea Strappa wrote:
>>
>>                     Hi list,
>>                     I wrote an alternative intonation system, performed
>>                     by indexing with
>>                     pchmidinn
>>                     decimal part.
>>                     With array it works. With table some index fails the
>>                     right reading.
>>                     Does not work table opcode or am I wrong something?
>>                     I attach two examples.
>>                     Greetings
>>                     Andrea S.
>> 
>> 
>> 
>>
>>                 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
>> 
>>
>>             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
>> 
>>
>>         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
>> 
>> 
>>
>>     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
>> 
>> 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
>
> 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
>

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