Csound Csound-dev Csound-tekno Search About

[Csnd] fillarray with a given value

Date2019-02-16 18:16
FromEduardo Moguillansky
Subject[Csnd] fillarray with a given value

With a k-array it is possible to do

kK[] init 10
kK = 4

and kA holds 4 at each item

Could it be possible to extend this behaviour to audio?

aA[] init 10
a0 oscili 0.5, 1000
aA = a0

fails, complaining that '=' is not defined for these types

thanks

    eduardo


Date2019-02-16 22:11
Fromjohn
SubjectRe: [Csnd] fillarray with a given value
Written and committed, but totally untested.

On Sat, 16 Feb 2019, Eduardo Moguillansky wrote:

> 
> With a k-array it is possible to do
> 
> kK[] init 10
> kK = 4
> 
> and kA holds 4 at each item
> 
> Could it be possible to extend this behaviour to audio?
> 
> aA[] init 10
> a0 oscili 0.5, 1000
> aA = a0
> 
> fails, complaining that '=' is not defined for these types
> 
> thanks
> 
>     eduardo
> 
> 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

Date2019-02-16 23:32
FromEduardo Moguillansky
SubjectRe: [Csnd] fillarray with a given value
thanks for this! There is an error at the OENTRY struct:

{"=.Z", sizeof(FFT), 0 , 3, "a[]", "a", NULL, (SUBR) arrayass},

should it be 2? or is an init function missing?

On 16.02.19 23:11, john wrote:
> Written and committed, but totally untested.
>
> On Sat, 16 Feb 2019, Eduardo Moguillansky wrote:
>
>>
>> With a k-array it is possible to do
>>
>> kK[] init 10
>> kK = 4
>>
>> and kA holds 4 at each item
>>
>> Could it be possible to extend this behaviour to audio?
>>
>> aA[] init 10
>> a0 oscili 0.5, 1000
>> aA = a0
>>
>> fails, complaining that '=' is not defined for these types
>>
>> thanks
>>
>>     eduardo
>>
>> 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

Date2019-02-16 23:41
FromJohn ff
SubjectRe: [Csnd] fillarray with a given value
Sorry yes it has an init fuction but i removed it.  Should be 2

⁣Sent from TypeApp ​

On Feb 16, 2019, 23:34, at 23:34, Eduardo Moguillansky  wrote:
>thanks for this! There is an error at the OENTRY struct:
>
>{"=.Z", sizeof(FFT), 0 , 3, "a[]", "a", NULL, (SUBR) arrayass},
>
>should it be 2? or is an init function missing?
>
>On 16.02.19 23:11, john wrote:
>> Written and committed, but totally untested.
>>
>> On Sat, 16 Feb 2019, Eduardo Moguillansky wrote:
>>
>>>
>>> With a k-array it is possible to do
>>>
>>> kK[] init 10
>>> kK = 4
>>>
>>> and kA holds 4 at each item
>>>
>>> Could it be possible to extend this behaviour to audio?
>>>
>>> aA[] init 10
>>> a0 oscili 0.5, 1000
>>> aA = a0
>>>
>>> fails, complaining that '=' is not defined for these types
>>>
>>> thanks
>>>
>>>     eduardo
>>>
>>> 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

Date2019-02-16 23:56
FromEduardo Moguillansky
SubjectRe: [Csnd] fillarray with a given value
also, there is a mismatch between the struct used in the opcode 
(TABCOPY) and the one used in the OENTRY table (FFT).

On 17.02.19 00:41, John ff wrote:
> Sorry yes it has an init fuction but i removed it.  Should be 2
>
> ⁣Sent from TypeApp ​
>
> On Feb 16, 2019, 23:34, at 23:34, Eduardo Moguillansky  wrote:
>> thanks for this! There is an error at the OENTRY struct:
>>
>> {"=.Z", sizeof(FFT), 0 , 3, "a[]", "a", NULL, (SUBR) arrayass},
>>
>> should it be 2? or is an init function missing?
>>
>> On 16.02.19 23:11, john wrote:
>>> Written and committed, but totally untested.
>>>
>>> On Sat, 16 Feb 2019, Eduardo Moguillansky wrote:
>>>
>>>> With a k-array it is possible to do
>>>>
>>>> kK[] init 10
>>>> kK = 4
>>>>
>>>> and kA holds 4 at each item
>>>>
>>>> Could it be possible to extend this behaviour to audio?
>>>>
>>>> aA[] init 10
>>>> a0 oscili 0.5, 1000
>>>> aA = a0
>>>>
>>>> fails, complaining that '=' is not defined for these types
>>>>
>>>> thanks
>>>>
>>>>      eduardo
>>>>
>>>> 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

Date2019-02-17 12:15
FromJohn ff
SubjectRe: [Csnd] fillarray with a given value
Yes late change.  Actually will only waste memory a bit, but will fix.

⁣Sent from TypeApp ​

On Feb 16, 2019, 23:58, at 23:58, Eduardo Moguillansky  wrote:
>also, there is a mismatch between the struct used in the opcode 
>(TABCOPY) and the one used in the OENTRY table (FFT).
>
>On 17.02.19 00:41, John ff wrote:
>> Sorry yes it has an init fuction but i removed it.  Should be 2
>>
>> ⁣Sent from TypeApp ​
>>
>> On Feb 16, 2019, 23:34, at 23:34, Eduardo Moguillansky
> wrote:
>>> thanks for this! There is an error at the OENTRY struct:
>>>
>>> {"=.Z", sizeof(FFT), 0 , 3, "a[]", "a", NULL, (SUBR) arrayass},
>>>
>>> should it be 2? or is an init function missing?
>>>
>>> On 16.02.19 23:11, john wrote:
>>>> Written and committed, but totally untested.
>>>>
>>>> On Sat, 16 Feb 2019, Eduardo Moguillansky wrote:
>>>>
>>>>> With a k-array it is possible to do
>>>>>
>>>>> kK[] init 10
>>>>> kK = 4
>>>>>
>>>>> and kA holds 4 at each item
>>>>>
>>>>> Could it be possible to extend this behaviour to audio?
>>>>>
>>>>> aA[] init 10
>>>>> a0 oscili 0.5, 1000
>>>>> aA = a0
>>>>>
>>>>> fails, complaining that '=' is not defined for these types
>>>>>
>>>>> thanks
>>>>>
>>>>>      eduardo
>>>>>
>>>>> 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

Date2019-02-17 13:59
Fromjohn
SubjectRe: [Csnd] fillarray with a given value
Think it is working now after fixing typos

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