Csound Csound-dev Csound-tekno Search About

[Csnd] storing into a table

Date2009-12-11 22:43
FromJason Timm
Subject[Csnd] storing into a table
hi clisters,

Is there a way to iterate randomly thru a table(got this part) and then store that sequence into another table. Sorry if my terms are mixed -too many partial languages in here.

I'm assuming, I guess, that a function table is the only kind of array in csound. It's the storing part that's giving me issues.

I'm also mildly proficient in python if that helps.

Thanks for reading,
_J



Date2009-12-11 23:24
FromJacob Joaquin
Subject[Csnd] Re: storing into a table
Attachmentsrandom_table_sequence.csd  
I've attached the file random_table_sequence.csd to this email.  It
uses the opcodes tab_i and tabw_i to read and write from tables, and
does everything in a loop.

Sorry to rush this out without a proper explanation.  If you have
questions, ask, and I'll get back to you.

Best,
Jake
-- 
The Csound Blog - http://csound.noisepages.com/


On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
> hi clisters,
> Is there a way to iterate randomly thru a table(got this part) and then
> store that sequence into another table. Sorry if my terms are mixed -too
> many partial languages in here.
> I'm assuming, I guess, that a function table is the only kind of array in
> csound. It's the storing part that's giving me issues.
> I'm also mildly proficient in python if that helps.
> Thanks for reading,
> _J
>
>

Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-12 16:18
FromRory Walsh
Subject[Csnd] Re: Re: storing into a table
Here something else quite simple to do what you're after:

gir ftgen 1, 0, 1024, 10, 1
gir ftgen 2, 0, 8, -2, 110, 220, 330, 440, 550, 660, 770, 880

instr 1
k1 randh 8, 4
k2 tab abs(k1), 2
printk2 k2
a3 oscil 10000, k2, 1
out a3
endin

i1 0 100

Rory.


2009/12/11 Jacob Joaquin :
> I've attached the file random_table_sequence.csd to this email.  It
> uses the opcodes tab_i and tabw_i to read and write from tables, and
> does everything in a loop.
>
> Sorry to rush this out without a proper explanation.  If you have
> questions, ask, and I'll get back to you.
>
> Best,
> Jake
> --
> The Csound Blog - http://csound.noisepages.com/
>
>
> On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
>> hi clisters,
>> Is there a way to iterate randomly thru a table(got this part) and then
>> store that sequence into another table. Sorry if my terms are mixed -too
>> many partial languages in here.
>> I'm assuming, I guess, that a function table is the only kind of array in
>> csound. It's the storing part that's giving me issues.
>> I'm also mildly proficient in python if that helps.
>> Thanks for reading,
>> _J
>>
>>
>
> 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"

Date2009-12-12 16:58
FromJason Timm
Subject[Csnd] Re: storing into a table
Thanks dudes,

exacly what I needed.

Here's a question, when I run a random function, I get a random set
from the table, but the same random set in the same order each time. I
tried 'seed 0' with no luck.

_J

On Saturday, December 12, 2009, Rory Walsh  wrote:
> Here something else quite simple to do what you're after:
>
> gir ftgen 1, 0, 1024, 10, 1
> gir ftgen 2, 0, 8, -2, 110, 220, 330, 440, 550, 660, 770, 880
>
> instr 1
> k1 randh 8, 4
> k2 tab abs(k1), 2
> printk2 k2
> a3 oscil 10000, k2, 1
> out a3
> endin
>
> i1 0 100
>
> Rory.
>
>
> 2009/12/11 Jacob Joaquin :
>> I've attached the file random_table_sequence.csd to this email.  It
>> uses the opcodes tab_i and tabw_i to read and write from tables, and
>> does everything in a loop.
>>
>> Sorry to rush this out without a proper explanation.  If you have
>> questions, ask, and I'll get back to you.
>>
>> Best,
>> Jake
>> --
>> The Csound Blog - http://csound.noisepages.com/
>>
>>
>> On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
>>> hi clisters,
>>> Is there a way to iterate randomly thru a table(got this part) and then
>>> store that sequence into another table. Sorry if my terms are mixed -too
>>> many partial languages in here.
>>> I'm assuming, I guess, that a function table is the only kind of array in
>>> csound. It's the storing part that's giving me issues.
>>> I'm also mildly proficient in python if that helps.
>>> Thanks for reading,
>>> _J
>>>
>>>
>>
>> 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"


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-12 17:06
FromRory Walsh
Subject[Csnd] Re: Re: storing into a table
Set seed to a number greater than one and it will seed from the system
time on the PC which is always changing.

Rory.


2009/12/12 Jason Timm :
> Thanks dudes,
>
> exacly what I needed.
>
> Here's a question, when I run a random function, I get a random set
> from the table, but the same random set in the same order each time. I
> tried 'seed 0' with no luck.
>
> _J
>
> On Saturday, December 12, 2009, Rory Walsh  wrote:
>> Here something else quite simple to do what you're after:
>>
>> gir ftgen 1, 0, 1024, 10, 1
>> gir ftgen 2, 0, 8, -2, 110, 220, 330, 440, 550, 660, 770, 880
>>
>> instr 1
>> k1 randh 8, 4
>> k2 tab abs(k1), 2
>> printk2 k2
>> a3 oscil 10000, k2, 1
>> out a3
>> endin
>>
>> i1 0 100
>>
>> Rory.
>>
>>
>> 2009/12/11 Jacob Joaquin :
>>> I've attached the file random_table_sequence.csd to this email.  It
>>> uses the opcodes tab_i and tabw_i to read and write from tables, and
>>> does everything in a loop.
>>>
>>> Sorry to rush this out without a proper explanation.  If you have
>>> questions, ask, and I'll get back to you.
>>>
>>> Best,
>>> Jake
>>> --
>>> The Csound Blog - http://csound.noisepages.com/
>>>
>>>
>>> On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
>>>> hi clisters,
>>>> Is there a way to iterate randomly thru a table(got this part) and then
>>>> store that sequence into another table. Sorry if my terms are mixed -too
>>>> many partial languages in here.
>>>> I'm assuming, I guess, that a function table is the only kind of array in
>>>> csound. It's the storing part that's giving me issues.
>>>> I'm also mildly proficient in python if that helps.
>>>> Thanks for reading,
>>>> _J
>>>>
>>>>
>>>
>>> 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"
>
>
> 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"

Date2009-12-12 17:23
FromJason Timm
Subject[Csnd] Re: storing into a table
Huh, that's weird. The manual suggests ival=0 derives from the system clock.

On Saturday, December 12, 2009, Rory Walsh  wrote:
> Set seed to a number greater than one and it will seed from the system
> time on the PC which is always changing.
>
> Rory.
>
>
> 2009/12/12 Jason Timm :
>> Thanks dudes,
>>
>> exacly what I needed.
>>
>> Here's a question, when I run a random function, I get a random set
>> from the table, but the same random set in the same order each time. I
>> tried 'seed 0' with no luck.
>>
>> _J
>>
>> On Saturday, December 12, 2009, Rory Walsh  wrote:
>>> Here something else quite simple to do what you're after:
>>>
>>> gir ftgen 1, 0, 1024, 10, 1
>>> gir ftgen 2, 0, 8, -2, 110, 220, 330, 440, 550, 660, 770, 880
>>>
>>> instr 1
>>> k1 randh 8, 4
>>> k2 tab abs(k1), 2
>>> printk2 k2
>>> a3 oscil 10000, k2, 1
>>> out a3
>>> endin
>>>
>>> i1 0 100
>>>
>>> Rory.
>>>
>>>
>>> 2009/12/11 Jacob Joaquin :
>>>> I've attached the file random_table_sequence.csd to this email.  It
>>>> uses the opcodes tab_i and tabw_i to read and write from tables, and
>>>> does everything in a loop.
>>>>
>>>> Sorry to rush this out without a proper explanation.  If you have
>>>> questions, ask, and I'll get back to you.
>>>>
>>>> Best,
>>>> Jake
>>>> --
>>>> The Csound Blog - http://csound.noisepages.com/
>>>>
>>>>
>>>> On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
>>>>> hi clisters,
>>>>> Is there a way to iterate randomly thru a table(got this part) and then
>>>>> store that sequence into another table. Sorry if my terms are mixed -too
>>>>> many partial languages in here.
>>>>> I'm assuming, I guess, that a function table is the only kind of array in
>>>>> csound. It's the storing part that's giving me issues.
>>>>> I'm also mildly proficient in python if that helps.
>>>>> Thanks for reading,
>>>>> _J
>>>>>
>>>>>
>>>>
>>>> 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"
>>
>>
>> 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"


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-12 17:35
FromRory Walsh
Subject[Csnd] Re: Re: storing into a table
Weird indeed as my manual states:

"A value greater than 1 will seed from system time, this is the best
option to generate a different random sequence for each run."

???

Rory.



2009/12/12 Jason Timm :
> Huh, that's weird. The manual suggests ival=0 derives from the system clock.
>
> On Saturday, December 12, 2009, Rory Walsh  wrote:
>> Set seed to a number greater than one and it will seed from the system
>> time on the PC which is always changing.
>>
>> Rory.
>>
>>
>> 2009/12/12 Jason Timm :
>>> Thanks dudes,
>>>
>>> exacly what I needed.
>>>
>>> Here's a question, when I run a random function, I get a random set
>>> from the table, but the same random set in the same order each time. I
>>> tried 'seed 0' with no luck.
>>>
>>> _J
>>>
>>> On Saturday, December 12, 2009, Rory Walsh  wrote:
>>>> Here something else quite simple to do what you're after:
>>>>
>>>> gir ftgen 1, 0, 1024, 10, 1
>>>> gir ftgen 2, 0, 8, -2, 110, 220, 330, 440, 550, 660, 770, 880
>>>>
>>>> instr 1
>>>> k1 randh 8, 4
>>>> k2 tab abs(k1), 2
>>>> printk2 k2
>>>> a3 oscil 10000, k2, 1
>>>> out a3
>>>> endin
>>>>
>>>> i1 0 100
>>>>
>>>> Rory.
>>>>
>>>>
>>>> 2009/12/11 Jacob Joaquin :
>>>>> I've attached the file random_table_sequence.csd to this email.  It
>>>>> uses the opcodes tab_i and tabw_i to read and write from tables, and
>>>>> does everything in a loop.
>>>>>
>>>>> Sorry to rush this out without a proper explanation.  If you have
>>>>> questions, ask, and I'll get back to you.
>>>>>
>>>>> Best,
>>>>> Jake
>>>>> --
>>>>> The Csound Blog - http://csound.noisepages.com/
>>>>>
>>>>>
>>>>> On Fri, Dec 11, 2009 at 2:43 PM, Jason Timm  wrote:
>>>>>> hi clisters,
>>>>>> Is there a way to iterate randomly thru a table(got this part) and then
>>>>>> store that sequence into another table. Sorry if my terms are mixed -too
>>>>>> many partial languages in here.
>>>>>> I'm assuming, I guess, that a function table is the only kind of array in
>>>>>> csound. It's the storing part that's giving me issues.
>>>>>> I'm also mildly proficient in python if that helps.
>>>>>> Thanks for reading,
>>>>>> _J
>>>>>>
>>>>>>
>>>>>
>>>>> 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"
>>>
>>>
>>> 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"
>
>
> 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"

Date2009-12-12 17:45
FromJacob Joaquin
Subject[Csnd] Re: Re: Re: storing into a table
You two might be talking about two different seeds.  That is, the
opcode seed and the seed parameter with randh.  The seed opcode
doesn't work with rnd() or randh(), so using it will not work in the
two presented instruments.

Best,
Jake
-- 
The Csound Blog - http://csound.noisepages.com/


On Sat, Dec 12, 2009 at 9:35 AM, Rory Walsh  wrote:
> Weird indeed as my manual states:
>
> "A value greater than 1 will seed from system time, this is the best
> option to generate a different random sequence for each run."
>
> ???
>
> Rory.
>
>
>
> 2009/12/12 Jason Timm :
>> Huh, that's weird. The manual suggests ival=0 derives from the system clock.
>>
>> On Saturday, December 12, 2009, Rory Walsh  wrote:
>>> Set seed to a number greater than one and it will seed from the system
>>> time on the PC which is always changing.
>>>
>>> Rory.
>>>
>>>
>>> 2009/12/12 Jason Timm :
>>>> Thanks dudes,
>>>>
>>>> exacly what I needed.
>>>>
>>>> Here's a question, when I run a random function, I get a random set
>>>> from the table, but the same random set in the same order each time. I
>>>> tried 'seed 0' with no luck.


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-12 17:47
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: storing into a table
Well spotted!

2009/12/12 Jacob Joaquin :
> You two might be talking about two different seeds.  That is, the
> opcode seed and the seed parameter with randh.  The seed opcode
> doesn't work with rnd() or randh(), so using it will not work in the
> two presented instruments.
>
> Best,
> Jake
> --
> The Csound Blog - http://csound.noisepages.com/
>
>
> On Sat, Dec 12, 2009 at 9:35 AM, Rory Walsh  wrote:
>> Weird indeed as my manual states:
>>
>> "A value greater than 1 will seed from system time, this is the best
>> option to generate a different random sequence for each run."
>>
>> ???
>>
>> Rory.
>>
>>
>>
>> 2009/12/12 Jason Timm :
>>> Huh, that's weird. The manual suggests ival=0 derives from the system clock.
>>>
>>> On Saturday, December 12, 2009, Rory Walsh  wrote:
>>>> Set seed to a number greater than one and it will seed from the system
>>>> time on the PC which is always changing.
>>>>
>>>> Rory.
>>>>
>>>>
>>>> 2009/12/12 Jason Timm :
>>>>> Thanks dudes,
>>>>>
>>>>> exacly what I needed.
>>>>>
>>>>> Here's a question, when I run a random function, I get a random set
>>>>> from the table, but the same random set in the same order each time. I
>>>>> tried 'seed 0' with no luck.
>
>
> 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"