Csound Csound-dev Csound-tekno Search About

[Cs-dev] table problem(?)

Date2014-05-10 13:09
FromRory Walsh
Subject[Cs-dev] table problem(?)
Anyone know why the last three points on this table are 0?

f1 0 128 -5 .1 25 .3 25 3 25  2 25 .5 25 1

I get the same results with GEN07 and I do with GEN05, but the problem
is less noticable with much larger tables. The following code
illustrates the problem.



-+rtaudio=jack -odac -b4096
;n -d


sr    = 44100
ksmps    = 32
nchnls    = 2
0dbfs    = 1

instr 1
iCnt init 0
iLen = ftlen(1)
until iCnt>iLen do
 i1 tab_i iCnt, 1
 iCnt+=1
 printf_i "Index:%d Value:%f\n", 1, iCnt, i1
enduntil

endin



#define Size  #4096#
f1 0 $Size 7 .1 [$Size*.2] .3 [$Size*.2] 3 [$Size*.2]  2 [$Size*.2] .5
[$Size*.2] 1
i1 0 1000



------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-05-10 15:41
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] table problem(?)
AttachmentsNone  

Date2014-05-10 16:03
FromRory Walsh
SubjectRe: [Cs-dev] table problem(?)
Indeed. That was a simplified version of the one that was creating the
problem. So should the same thing apply when the distance between the
points is 25.6?



On 10 May 2014 15:41,   wrote:
> According to the manual
>
> "n1, n2, etc. -- length of segment (no. of storage locations), in
> even-numbered pfields. Cannot be negative, but a zero is meaningful
> for specifying discontinuous waveforms. The sum n1 + n2 + .... will
> normally equal size for fully specified functions. If the sum is
> smaller, the function locations not included will be set to zero; if
> the sum is greater, only the first size locations will be stored. "
>
> in your case 25+25+25+25+25 = 125 so three zeros at the end
>
> =John ff
>
>
> Quoting Rory Walsh :
>
>> Anyone know why the last three points on this table are 0?
>>
>> f1 0 128 -5 .1 25 .3 25 3 25  2 25 .5 25 1
>>
>> I get the same results with GEN07 and I do with GEN05, but the problem
>> is less noticable with much larger tables. The following code
>> illustrates the problem.
>>
>> 
>> 
>> -+rtaudio=jack -odac -b4096
>> ;n -d
>> 
>> 
>> sr    = 44100
>> ksmps    = 32
>> nchnls    = 2
>> 0dbfs    = 1
>>
>> instr 1
>> iCnt init 0
>> iLen = ftlen(1)
>> until iCnt>iLen do
>>  i1 tab_i iCnt, 1
>>  iCnt+=1
>>  printf_i "Index:%d Value:%f\n", 1, iCnt, i1
>> enduntil
>>
>> endin
>>
>> 
>> 
>> #define Size  #4096#
>> f1 0 $Size 7 .1 [$Size*.2] .3 [$Size*.2] 3 [$Size*.2]  2 [$Size*.2] .5
>> [$Size*.2] 1
>> i1 0 1000
>> 
>> 
>>
>> ------------------------------------------------------------------------------
>> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
>> • 3 signs your SCM is hindering your productivity
>> • Requirements for releasing software faster
>> • Expert tips and advice for migrating your SCM now
>> http://p.sf.net/sfu/perforce
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-05-10 16:36
FromRory Walsh
SubjectRe: [Cs-dev] table problem(?)
Answering my own question..I assume so, given that the the ordinate
points must be integer. Next time I should read the manual first. I
would have thought however that if n1+n2+etc was less than the table
size, then the last few points would be set to the last given y value.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-05-10 16:36
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] table problem(?)
AttachmentsNone  

Date2014-05-10 16:38
FromRory Walsh
SubjectRe: [Cs-dev] table problem(?)
Sorry, our mails got crossed there. I understand what you mean, and
now get that they must be integer values. Thanks.

On 10 May 2014 17:36,   wrote:
> Sorry do not follow - but the n1,n2... must be  integer, and it works
> rounding towards zero I think
>
> Quoting Rory Walsh :
>
>> Indeed. That was a simplified version of the one that was creating the
>> problem. So should the same thing apply when the distance between the
>> points is 25.6?
>>
>>
>>
>> On 10 May 2014 15:41,   wrote:
>>> According to the manual
>>>
>>> "n1, n2, etc. -- length of segment (no. of storage locations), in
>>> even-numbered pfields. Cannot be negative, but a zero is meaningful
>>> for specifying discontinuous waveforms. The sum n1 + n2 + .... will
>>> normally equal size for fully specified functions. If the sum is
>>> smaller, the function locations not included will be set to zero; if
>>> the sum is greater, only the first size locations will be stored. "
>>>
>>> in your case 25+25+25+25+25 = 125 so three zeros at the end
>>>
>>> =John ff
>>>
>>>
>>> Quoting Rory Walsh :
>>>
>>>> Anyone know why the last three points on this table are 0?
>>>>
>>>> f1 0 128 -5 .1 25 .3 25 3 25  2 25 .5 25 1
>>>>
>>>> I get the same results with GEN07 and I do with GEN05, but the problem
>>>> is less noticable with much larger tables. The following code
>>>> illustrates the problem.
>>>>
>>>> 
>>>> 
>>>> -+rtaudio=jack -odac -b4096
>>>> ;n -d
>>>> 
>>>> 
>>>> sr    = 44100
>>>> ksmps    = 32
>>>> nchnls    = 2
>>>> 0dbfs    = 1
>>>>
>>>> instr 1
>>>> iCnt init 0
>>>> iLen = ftlen(1)
>>>> until iCnt>iLen do
>>>>  i1 tab_i iCnt, 1
>>>>  iCnt+=1
>>>>  printf_i "Index:%d Value:%f\n", 1, iCnt, i1
>>>> enduntil
>>>>
>>>> endin
>>>>
>>>> 
>>>> 
>>>> #define Size  #4096#
>>>> f1 0 $Size 7 .1 [$Size*.2] .3 [$Size*.2] 3 [$Size*.2]  2 [$Size*.2] .5
>>>> [$Size*.2] 1
>>>> i1 0 1000
>>>> 
>>>> 
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Is your legacy SCM system holding you back? Join Perforce May 7 to
>>>> find out:
>>>> • 3 signs your SCM is hindering your productivity
>>>> • Requirements for releasing software faster
>>>> • Expert tips and advice for migrating your SCM now
>>>> http://p.sf.net/sfu/perforce
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
>>> • 3 signs your SCM is hindering your productivity
>>> • Requirements for releasing software faster
>>> • Expert tips and advice for migrating your SCM now
>>> http://p.sf.net/sfu/perforce
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
>> • 3 signs your SCM is hindering your productivity
>> • Requirements for releasing software faster
>> • Expert tips and advice for migrating your SCM now
>> http://p.sf.net/sfu/perforce
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net