Csound Csound-dev Csound-tekno Search About

Array as arguments to ftgen

Date2017-01-31 08:12
FromEduardo Moguillansky
SubjectArray as arguments to ftgen
Is it possible to use an array as the arguments to an ftgen? Usecase:  I 
want to use GEN8 to calculate a splice curve within an udo. Is there a 
way of "unpacking" the array? Something like

icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
itab ftgenonce 0, 0, 65, -8, *icoeffs

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

Date2017-01-31 08:35
FromVictor Lazzarini
SubjectRe: Array as arguments to ftgen
Not like that. We need to add an explicit array version of ftgen. Should not be a problem though.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 31 Jan 2017, at 08:12, Eduardo Moguillansky  wrote:
> 
> Is it possible to use an array as the arguments to an ftgen? Usecase:  I want to use GEN8 to calculate a splice curve within an udo. Is there a way of "unpacking" the array? Something like
> 
> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
> itab ftgenonce 0, 0, 65, -8, *icoeffs
> 
> 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

Date2017-01-31 08:52
FromVictor Lazzarini
SubjectRe: Array as arguments to ftgen
Actually I just checked and we already have an ftgen that takes i[] arrays.

icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
itab ftgen 0, 0, 65, -8, icoeffs

should work.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 31 Jan 2017, at 08:35, Victor Lazzarini  wrote:
> 
> Not like that. We need to add an explicit array version of ftgen. Should not be a problem though.
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky  wrote:
>> 
>> Is it possible to use an array as the arguments to an ftgen? Usecase:  I want to use GEN8 to calculate a splice curve within an udo. Is there a way of "unpacking" the array? Something like
>> 
>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>> 
>> 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

Date2017-01-31 14:29
Fromjpff
SubjectRe: Array as arguments to ftgen
I tink tat is not in the manual.  I guess a new syntax line and a 
paragraph

On Tue, 31 Jan 2017, Victor Lazzarini wrote:

> Actually I just checked and we already have an ftgen that takes i[] arrays.
>
> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
> itab ftgen 0, 0, 65, -8, icoeffs
>
> should work.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 31 Jan 2017, at 08:35, Victor Lazzarini  wrote:
>>
>> Not like that. We need to add an explicit array version of ftgen. Should not be a problem though.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky  wrote:
>>>
>>> Is it possible to use an array as the arguments to an ftgen? Usecase:  I want to use GEN8 to calculate a splice curve within an udo. Is there a way of "unpacking" the array? Something like
>>>
>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>>>
>>> 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

Date2017-01-31 14:30
Fromjpff
SubjectRe: Array as arguments to ftgen
and also shud there be n optional arg to say ow many elements to use?


On Tue, 31 Jan 2017, Victor Lazzarini wrote:

> Actually I just checked and we already have an ftgen that takes i[] arrays.
>
> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
> itab ftgen 0, 0, 65, -8, icoeffs
>
> should work.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 31 Jan 2017, at 08:35, Victor Lazzarini  wrote:
>>
>> Not like that. We need to add an explicit array version of ftgen. Should not be a problem though.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky  wrote:
>>>
>>> Is it possible to use an array as the arguments to an ftgen? Usecase:  I want to use GEN8 to calculate a splice curve within an udo. Is there a way of "unpacking" the array? Something like
>>>
>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>>>
>>> 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

Date2017-01-31 14:45
FromEduardo Moguillansky
SubjectRe: Array as arguments to ftgen
I just tested this and it works perfectly (I didn't even know this even 
existed). To avoid confusion I would prefer to not include any optional 
argument and use the complete array.


On 31.01.2017 15:30, jpff wrote:
> and also shud there be n optional arg to say ow many elements to use?
>
>
> On Tue, 31 Jan 2017, Victor Lazzarini wrote:
>
>> Actually I just checked and we already have an ftgen that takes i[]
>> arrays.
>>
>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>> itab ftgen 0, 0, 65, -8, icoeffs
>>
>> should work.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>>> On 31 Jan 2017, at 08:35, Victor Lazzarini 
>>> wrote:
>>>
>>> Not like that. We need to add an explicit array version of ftgen.
>>> Should not be a problem though.
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky
>>>>  wrote:
>>>>
>>>> Is it possible to use an array as the arguments to an ftgen?
>>>> Usecase:  I want to use GEN8 to calculate a splice curve within an
>>>> udo. Is there a way of "unpacking" the array? Something like
>>>>
>>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>>>>
>>>> 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

Date2017-01-31 14:52
Fromjpff
SubjectRe: Array as arguments to ftgen
Documeted now in git

On Tue, 31 Jan 2017, Eduardo Moguillansky wrote:

> I just tested this and it works perfectly (I didn't even know this even 
> existed). To avoid confusion I would prefer to not include any optional 
> argument and use the complete array.
>
>
> On 31.01.2017 15:30, jpff wrote:
>> and also shud there be n optional arg to say ow many elements to use?
>> 
>> 
>> On Tue, 31 Jan 2017, Victor Lazzarini wrote:
>> 
>>> Actually I just checked and we already have an ftgen that takes i[]
>>> arrays.
>>> 
>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>> itab ftgen 0, 0, 65, -8, icoeffs
>>> 
>>> should work.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 31 Jan 2017, at 08:35, Victor Lazzarini 
>>>> wrote:
>>>> 
>>>> Not like that. We need to add an explicit array version of ftgen.
>>>> Should not be a problem though.
>>>> 
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky
>>>>>  wrote:
>>>>> 
>>>>> Is it possible to use an array as the arguments to an ftgen?
>>>>> Usecase:  I want to use GEN8 to calculate a splice curve within an
>>>>> udo. Is there a way of "unpacking" the array? Something like
>>>>> 
>>>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>>>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>>>>> 
>>>>> 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

Date2017-01-31 15:05
FromVictor Lazzarini
SubjectRe: Array as arguments to ftgen
don’t know. I would think it would be best to leave it to the user to place the arguments in the array and
the array length determine how many args are to be used. Did you write this? What was your original thinking wrt this question?
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 31 Jan 2017, at 14:30, jpff  wrote:
> 
> and also shud there be n optional arg to say ow many elements to use?
> 
> 
> On Tue, 31 Jan 2017, Victor Lazzarini wrote:
> 
>> Actually I just checked and we already have an ftgen that takes i[] arrays.
>> 
>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>> itab ftgen 0, 0, 65, -8, icoeffs
>> 
>> should work.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 31 Jan 2017, at 08:35, Victor Lazzarini  wrote:
>>> 
>>> Not like that. We need to add an explicit array version of ftgen. Should not be a problem though.
>>> 
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>> 
>>>> On 31 Jan 2017, at 08:12, Eduardo Moguillansky  wrote:
>>>> 
>>>> Is it possible to use an array as the arguments to an ftgen? Usecase:  I want to use GEN8 to calculate a splice curve within an udo. Is there a way of "unpacking" the array? Something like
>>>> 
>>>> icoeffs[] array -1, 32, 1, 2, 0, 14, 0, 17, 0
>>>> itab ftgenonce 0, 0, 65, -8, *icoeffs
>>>> 
>>>> 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