Csound Csound-dev Csound-tekno Search About

More (stupid?) questions about arrays

Date2015-08-21 13:54
FromAnders Genell
SubjectMore (stupid?) questions about arrays
AttachmentsNone  None  
Dear expert!
Is there a way to 'span' an array in csound?
Like the matlab expression x=1:10 that will make x contain [1 2 3 4 5 6 7 8 9 10] or
x=1:2:10 that will make x contain [1 3 5 7 9] ?
Or better yet, the equivalen of the linspace command, that will take startvalue, endvalue and number of elements as arguments. Kind of like linseg, but that creates an array.

Regards,
Anders

Date2015-08-21 14:38
Fromjpff
SubjectRe: More (stupid?) questions about arrays
Perhaps genarray opcode.  Maybe missing in manual -- try tabgeb as well


On Fri, 21 Aug 2015, Anders Genell wrote:

> Dear expert!Is there a way to 'span' an array in csound?
> Like the matlab expression x=1:10 that will make x contain [1 2 3 4 5 6 7 8 9
> 10] or
> x=1:2:10 that will make x contain [1 3 5 7 9] ?
> Or better yet, the equivalen of the linspace command, that will take
> startvalue, endvalue and number of elements as arguments. Kind of like linseg,
> but that creates an array.
> 
> Regards,
> Anders
> 
>

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-08-21 14:47
FromAnders Genell
SubjectRe: More (stupid?) questions about arrays
AttachmentsNone  None  
genarray!
Thank's John!!

Regards,
Anders

On Fri, Aug 21, 2015 at 3:38 PM, jpff <jpff@codemist.co.uk> wrote:
Perhaps genarray opcode.  Maybe missing in manual -- try tabgeb as well


On Fri, 21 Aug 2015, Anders Genell wrote:

> Dear expert!Is there a way to 'span' an array in csound?
> Like the matlab expression x=1:10 that will make x contain [1 2 3 4 5 6 7 8 9
> 10] or
> x=1:2:10 that will make x contain [1 3 5 7 9] ?
> Or better yet, the equivalen of the linspace command, that will take
> startvalue, endvalue and number of elements as arguments. Kind of like linseg,
> but that creates an array.
>
> Regards,
> Anders
>
>

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2015-08-22 10:41
FromAnders Genell
SubjectRe: More (stupid?) questions about arrays
genarray works perfectly, thank you!
It is in the manual, but maybe it could be included in the page about array opcode said as well: http://csound.github.io/docs/manual/arrayOpcodes.html
Also, in that page there is an example off maparray with a comment about what mathematical functions are valid, but those functions are not listed in the maparray manual page, and the wording in the array opcodes page suggests there are more functions than the ones listed, although that is of course my interpretation. 

Regards,
Anders



> 21 aug 2015 kl. 15:38 skrev jpff :
> 
> Perhaps genarray opcode.  Maybe missing in manual -- try tabgeb as well
> 
> 
>> On Fri, 21 Aug 2015, Anders Genell wrote:
>> 
>> Dear expert!Is there a way to 'span' an array in csound?
>> Like the matlab expression x=1:10 that will make x contain [1 2 3 4 5 6 7 8 9
>> 10] or
>> x=1:2:10 that will make x contain [1 3 5 7 9] ?
>> Or better yet, the equivalen of the linspace command, that will take
>> startvalue, endvalue and number of elements as arguments. Kind of like linseg,
>> but that creates an array.
>> 
>> Regards,
>> Anders
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here