|
You are aware of the linear algebra opcodes that I recently contributed to
Csound?
They don't have this kind of range indexing, but that could be added.
I will be adding a manual page for these opcodes soon. In the meantime, you
can look at tests/test24.csd, and the source code (the header of the
Opcodes/linear_algebra.cpp documents it pretty well).
Regards,
Mike
Steven Yi wrote:
>
> Hi Dave,
>
> You could make a UDO that does something like:
>
> foo itable 1, 3, 6
>
> (though probably better to use an opcode name that doesn't start with
> i). The 3 and 6 could be a start/end index.
>
> Not quite the same syntax, but technically equivalent.
>
> steven
>
>
>
> On Fri, May 30, 2008 at 6:48 AM, David Akbari wrote:
>> Hi List,
>>
>> I'm wondering how one might go about using features similar to GNU
>> Octave (or MATLAB) in Csound such as table indexing using the colon
>> notation... For example,
>>
>> If we had the table
>> itable ftgen 1, 0, 8, 2, 10, 13, 11, 14, 12, 16, 20, 9
>>
>> How could we index a _range_ of values? Is the only current way to use
>> Istvan's *_loop opcodes?
>>
>> Ideally, it would be nice in the above example to say something like
>>
>> foo = itable(1,3:6)
>>
>> where foo would in this case store values 3 through 6 in row 1 as a
>> new table. Is there a way to encapsulate this type of syntax into a
>> UDO?
>>
>>
>>
>> Thank you for your time and consideration,
>>
>> David Akbari
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
--
View this message in context: http://www.nabble.com/Indexing-vectors-and-colon-notation--tp17559321p17567559.html
Sent from the Csound - General mailing list archive at Nabble.com.
|