Csound Csound-dev Csound-tekno Search About

[Csnd] realtime linear predictive coding

Date2011-01-23 20:42
Fromkelly hirai
Subject[Csnd] realtime linear predictive coding
is there a opcode lpanal? i'm interested in doing some controling via 
voice. also, is there a LPDUMP utility so that i can see the filter 
parameters?

kelly


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-27 17:07
From"Art Hunkins"
SubjectRe: [Csnd] funny randomi issue
+1 for this entire enhancement.
 
Art Hunkins
----- Original Message -----
Sent: Thursday, January 27, 2011 9:49 AM
Subject: Re: [Csnd] funny randomi issue

Something like this?

kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]

iinterp0 (optional, default=0) -- first interpolation cycle mode (see below)
ifirstval (optional, default=0) -- first output value

When iinterp0 = 0 (the default), the kmin argument value is outputted for 1/kcps (resp. 1/acps) seconds at the beginning of the note, before the first random number is generated. Then the normal interpolation process takes place, first between kmin and the first random number generated, and then between successive generated random numbers, each interpolation cycle having a duration of 1/kcps (resp. 1/acps) seconds.

When iinterp0 = 1, a random number is generated at initialization and interpolation begins immediately between the kmin argument value and that random number.

When interp0 = 2, a random number is generated at initialization and interpolation begins immediately between the ifirstval argument value and that random number.


This  way, we could have immediate interpolation and initial value without modifying older versions behavior. If you agree with this, I can modify the source files (opcodes/uggab.h and opcodes/uggab.c), test the modifications and send the files to Andrés for upload

Regards

François


2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
Thanks!

Yes I second Andres. I think the addition of both, an initial state
and starting the interpolation immediately would be a big bonus.

Best,

Peiman



On 27 January 2011 10:56, Andres Cabrera <mantaraya36@gmail.com> wrote:
> It might actually be a better solution to add an optional i-time
> parameter which sets the initial state, or an option to enable
> producing a random number from the start.
>
> Cheers,
> Andres
>
> On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <fggpinot@gmail.com> wrote:
>> Absolutely! I can add this paragraph to the "Performance" section of the
>> manual entry for randomi:
>>
>> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
>> beginning of the note, before the first random number is generated. Then the
>> normal interpolation process takes place, first between kmin and the first
>> random number generated, and then between successive generated random
>> numbers, each interpolation cycle having a duration of 1/kcps (resp. 1/acps)
>> seconds.
>>
>> Is it OK?
>>
>> Francois
>>
>>
>> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>>>
>>> Thanks for the explaination Francois.
>>>
>>> So just to clarify. The minimum value is always outputed for 1/kcps
>>> seconds when the note is initialised? Is this because the opcode uses
>>> this time to generate the next random number that is subsequently used
>>> for the interpolation?
>>>
>>> I think this should be in the manual as a kcps value of 0.1 or
>>> somthing like that means a long wait (10 seconds!). I guess the trick
>>> would be something like this:
>>>
>>> kmult linseg 1000, 0.001, 1, p3, 1
>>> kmorph2 randomi 0,1, 2*kmult
>>>
>>> Best,
>>>
>>> Peiman
>>>
>>>
>>> On 27 January 2011 08:18, Francois PINOT <fggpinot@gmail.com> wrote:
>>> > Hi Peiman,
>>> >
>>> > This is normal behavior: randomi is an interpolating opcode. That means
>>> > that
>>> > it will generate new random numbers at a rate of  kcps but, during the
>>> > 1/kcps sec separating two random numbers, it will output interpolated
>>> > values. The first values in your example are always 0 because the first
>>> > interpolation is done between kmin (which is 0 in your example)  and the
>>> > first generated random value. By changing the value of kmin, you'll get
>>> > different starting values. Moreover, if you change the kcps value, the
>>> > number of fixed initial values will change accordingly.
>>> >
>>> > Hope this helps
>>> >
>>> > Francois
>>> >
>>> >
>>> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>>> >>
>>> >> Can you try this one please Victor.
>>> >>
>>> >> <CsoundSynthesizer>
>>> >>
>>> >> <CsOptions>
>>> >> -odac -d
>>> >> </CsOptions>
>>> >>
>>> >> <CsInstruments>
>>> >> sr     = 96000
>>> >> kr     = 16
>>> >> nchnls = 1
>>> >>
>>> >> seed 0
>>> >>
>>> >>
>>> >>      instr 1
>>> >> kmorph2 randomi 0,1, 2
>>> >>
>>> >> printk 0.1, kmorph2
>>> >>
>>> >>      endin
>>> >>
>>> >> </CsInstruments>
>>> >>
>>> >> <CsScore>
>>> >> i1 0 3600
>>> >> </CsScore>
>>> >>
>>> >> </CsoundSynthesizer>
>>> >>
>>> >> On 26 January 2011 22:15, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
>>> >> wrote:
>>> >> > Not stuck here. 5.13 OSX 10.5
>>> >> >
>>> >> > i1 0.00000
>>> >> > i1 0.11036
>>> >> > i1 0.22072
>>> >> > i1 0.33108
>>> >> > i1 0.44144
>>> >> > i1 0.55180
>>> >> > i1 0.66215
>>> >> > i1 0.77251
>>> >> > i1 0.88287
>>> >> > i1 0.80893
>>> >> > i1 0.73499
>>> >> > i1 0.66105
>>> >> > i1 0.58711
>>> >> > i1 0.51317
>>> >> > i1 0.43922
>>> >> > i1 0.36528
>>> >> > i1 0.29134
>>> >> > i1 0.37064
>>> >> > i1 0.44993
>>> >> > i1 0.52923
>>> >> > i1 0.60853
>>> >> > i1 0.68782
>>> >> > i1 0.76712
>>> >> > i1 0.84641
>>> >> > i1 0.92571
>>> >> > i1 0.82436
>>> >> > i1 0.72301
>>> >> > i1 0.62166
>>> >> > i1 0.52031
>>> >> > i1 0.41896
>>> >> > i1 0.31761
>>> >> > i1 0.21626
>>> >> > i1 0.11491
>>> >> > i1 0.10123
>>> >> > i1 0.08756
>>> >> > i1 0.07388
>>> >> > i1 0.06021
>>> >> > i1 0.04653
>>> >> > i1 0.03286
>>> >> > i1 0.01918
>>> >> > i1 0.00551
>>> >> > i1 0.06780
>>> >> > i1 0.13008
>>> >> > i1 0.19237
>>> >> > i1 0.25466
>>> >> > i1 0.31695
>>> >> > i1 0.37924
>>> >> > i1 0.44153
>>> >> > i1 0.50381
>>> >> > i1 0.51766
>>> >> > i1 0.53150
>>> >> > i1 0.54534
>>> >> > i1 0.55919
>>> >> > i1 0.57303
>>> >> > i1 0.58687
>>> >> > i1 0.60072
>>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>> >> >
>>> >> >> yes 5.13. I used the universal installer.
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On 26 January 2011 22:05, joachim heintz <jh@joachimheintz.de>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> do you also use 5.13?
>>> >> >>>
>>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>> >> >>>>
>>> >> >>>> I wonder if this is only happening with this opcode or if it's a
>>> >> >>>> more
>>> >> >>>> general OS X related issue to do with krate and timing.
>>> >> >>>>
>>> >> >>>> P
>>> >> >>>>
>>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>>> >> >>>> <peimankhosravi@gmail.com>
>>> >> >>>> wrote:
>>> >> >>>>>
>>> >> >>>>> Thanks Menno,
>>> >> >>>>>
>>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
>>> >> >>>>> following.
>>> >> >>>>> The value remains on zero for .5 seconds every time.
>>> >> >>>>>
>>> >> >>>>>  new alloc for instr 1:
>>> >> >>>>>  i   1 time     0.06250:     0.00000
>>> >> >>>>>  i   1 time     0.12500:     0.00000
>>> >> >>>>>  i   1 time     0.25000:     0.00000
>>> >> >>>>>  i   1 time     0.31250:     0.00000
>>> >> >>>>>  i   1 time     0.43750:     0.00000
>>> >> >>>>>  i   1 time     0.50000:     0.00000
>>> >> >>>>>  i   1 time     0.62500:     0.08407
>>> >> >>>>>  i   1 time     0.75000:     0.25222
>>> >> >>>>>  i   1 time     0.81250:     0.33630
>>> >> >>>>>  i   1 time     0.93750:     0.50445
>>> >> >>>>>  i   1 time     1.00000:     0.58852
>>> >> >>>>>  i   1 time     1.12500:     0.69159
>>> >> >>>>>  i   1 time     1.25000:     0.72958
>>> >> >>>>>  i   1 time     1.31250:     0.74858
>>> >> >>>>>  i   1 time     1.43750:     0.78657
>>> >> >>>>>  i   1 time     1.50000:     0.80556
>>> >> >>>>>  i   1 time     1.62500:     0.78747
>>> >> >>>>>  i   1 time     1.75000:     0.71329
>>> >> >>>>>
>>> >> >>>>> Best,
>>> >> >>>>>
>>> >> >>>>> Peiman
>>> >> >>>>>
>>> >> >>>>>  <CsoundSynthesizer>
>>> >> >>>>>
>>> >> >>>>> <CsOptions>
>>> >> >>>>> -odac -d
>>> >> >>>>> </CsOptions>
>>> >> >>>>>
>>> >> >>>>> <CsInstruments>
>>> >> >>>>> sr     = 96000
>>> >> >>>>> kr     = 16
>>> >> >>>>> nchnls = 1
>>> >> >>>>>
>>> >> >>>>> seed 0
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>>      instr 1
>>> >> >>>>> kmorph2 randomi 0,1, 2
>>> >> >>>>>
>>> >> >>>>> printk 0.1, kmorph2
>>> >> >>>>>
>>> >> >>>>>      endin
>>> >> >>>>>
>>> >> >>>>> </CsInstruments>
>>> >> >>>>>
>>> >> >>>>> <CsScore>
>>> >> >>>>> i1 0 3600
>>> >> >>>>> </CsScore>
>>> >> >>>>>
>>> >> >>>>> </CsoundSynthesizer>
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>> On 26 January 2011 08:35, menno <nabob_cd@yahoo.com> wrote:
>>> >> >>>>>>
>>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>> >> >>>>>> Csound5.13beta,
>>> >> >>>>>> doubles
>>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>>> >> >>>>>>
>>> >> >>>>>> new alloc for instr 1:
>>> >> >>>>>>  i1     0.00000
>>> >> >>>>>>  i1     0.00052
>>> >> >>>>>>  i1     0.00111
>>> >> >>>>>>  i1     0.00170
>>> >> >>>>>>  i1     0.00229
>>> >> >>>>>>  i1     0.00288
>>> >> >>>>>>  i1     0.00347
>>> >> >>>>>>  i1     0.00406
>>> >> >>>>>>  i1     0.00464
>>> >> >>>>>>  i1     0.00523
>>> >> >>>>>>  i1     0.00582
>>> >> >>>>>>  i1     0.00641
>>> >> >>>>>>  i1     0.00700
>>> >> >>>>>>  i1     0.00759.....
>>> >> >>>>>>
>>> >> >>>>>> greetings
>>> >> >>>>>> menno
>>> >> >>>>>> --
>>> >> >>>>>> View this message in context:
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>> >> >>>>>> Sent from the Csound - General mailing list archive at
>>> >> >>>>>> Nabble.com.
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>>> >> >>>>>>
>>> >> >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >>>>>> Discussions of bugs and features can be posted here
>>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >>>>>> "unsubscribe csound"
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>>> >> >>>>
>>> >> >>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >>>> Discussions of bugs and features can be posted here
>>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >>>> "unsubscribe
>>> >> >>>> csound"
>>> >> >>>>
>>> >> >>>>
>>> >> >>>
>>> >> >>>
>>> >> >>> Send bugs reports to the Sourceforge bug tracker
>>> >> >>>
>>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >>> Discussions of bugs and features can be posted here
>>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >>> "unsubscribe
>>> >> >>> csound"
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >> Send bugs reports to the Sourceforge bug tracker
>>> >> >>
>>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> Discussions of bugs and features can be posted here
>>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >> "unsubscribe
>>> >> >> csound"
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > Send bugs reports to the Sourceforge bug tracker
>>> >> >           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> > Discussions of bugs and features can be posted here
>>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> > "unsubscribe
>>> >> > csound"
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >> Send bugs reports to the Sourceforge bug tracker
>>> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> Discussions of bugs and features can be posted here
>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> "unsubscribe
>>> >> csound"
>>> >>
>>> >
>>> >
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2011-01-27 17:16
Frompeiman khosravi
SubjectRe: [Csnd] funny randomi issue
thanks very much. That would be awesome.

Best,

Peiman

On 27 January 2011 17:07, Art Hunkins  wrote:
> +1 for this entire enhancement.
>
> Art Hunkins
>
> ----- Original Message -----
> From: Francois PINOT
> To: csound@lists.bath.ac.uk
> Sent: Thursday, January 27, 2011 9:49 AM
> Subject: Re: [Csnd] funny randomi issue
> Something like this?
>
> kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>
> iinterp0 (optional, default=0) -- first interpolation cycle mode (see below)
> ifirstval (optional, default=0) -- first output value
>
> When iinterp0 = 0 (the default), the kmin argument value is outputted for
> 1/kcps (resp. 1/acps) seconds at the beginning of the note, before the first
> random number is generated. Then the normal interpolation process takes
> place, first between kmin and the first random number generated, and then
> between successive generated random numbers, each interpolation cycle having
> a duration of 1/kcps (resp. 1/acps) seconds.
>
> When iinterp0 = 1, a random number is generated at initialization and
> interpolation begins immediately between the kmin argument value and that
> random number.
>
> When interp0 = 2, a random number is generated at initialization and
> interpolation begins immediately between the ifirstval argument value and
> that random number.
>
>
> This  way, we could have immediate interpolation and initial value without
> modifying older versions behavior. If you agree with this, I can modify the
> source files (opcodes/uggab.h and opcodes/uggab.c), test the modifications
> and send the files to Andrés for upload
>
> Regards
>
> François
>
>
> 2011/1/27 peiman khosravi 
>>
>> Thanks!
>>
>> Yes I second Andres. I think the addition of both, an initial state
>> and starting the interpolation immediately would be a big bonus.
>>
>> Best,
>>
>> Peiman
>>
>>
>>
>> On 27 January 2011 10:56, Andres Cabrera  wrote:
>> > It might actually be a better solution to add an optional i-time
>> > parameter which sets the initial state, or an option to enable
>> > producing a random number from the start.
>> >
>> > Cheers,
>> > Andres
>> >
>> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT 
>> > wrote:
>> >> Absolutely! I can add this paragraph to the "Performance" section of
>> >> the
>> >> manual entry for randomi:
>> >>
>> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
>> >> beginning of the note, before the first random number is generated.
>> >> Then the
>> >> normal interpolation process takes place, first between kmin and the
>> >> first
>> >> random number generated, and then between successive generated random
>> >> numbers, each interpolation cycle having a duration of 1/kcps (resp.
>> >> 1/acps)
>> >> seconds.
>> >>
>> >> Is it OK?
>> >>
>> >> Francois
>> >>
>> >>
>> >> 2011/1/27 peiman khosravi 
>> >>>
>> >>> Thanks for the explaination Francois.
>> >>>
>> >>> So just to clarify. The minimum value is always outputed for 1/kcps
>> >>> seconds when the note is initialised? Is this because the opcode uses
>> >>> this time to generate the next random number that is subsequently used
>> >>> for the interpolation?
>> >>>
>> >>> I think this should be in the manual as a kcps value of 0.1 or
>> >>> somthing like that means a long wait (10 seconds!). I guess the trick
>> >>> would be something like this:
>> >>>
>> >>> kmult linseg 1000, 0.001, 1, p3, 1
>> >>> kmorph2 randomi 0,1, 2*kmult
>> >>>
>> >>> Best,
>> >>>
>> >>> Peiman
>> >>>
>> >>>
>> >>> On 27 January 2011 08:18, Francois PINOT  wrote:
>> >>> > Hi Peiman,
>> >>> >
>> >>> > This is normal behavior: randomi is an interpolating opcode. That
>> >>> > means
>> >>> > that
>> >>> > it will generate new random numbers at a rate of  kcps but, during
>> >>> > the
>> >>> > 1/kcps sec separating two random numbers, it will output
>> >>> > interpolated
>> >>> > values. The first values in your example are always 0 because the
>> >>> > first
>> >>> > interpolation is done between kmin (which is 0 in your example)  and
>> >>> > the
>> >>> > first generated random value. By changing the value of kmin, you'll
>> >>> > get
>> >>> > different starting values. Moreover, if you change the kcps value,
>> >>> > the
>> >>> > number of fixed initial values will change accordingly.
>> >>> >
>> >>> > Hope this helps
>> >>> >
>> >>> > Francois
>> >>> >
>> >>> >
>> >>> > 2011/1/27 peiman khosravi 
>> >>> >>
>> >>> >> Can you try this one please Victor.
>> >>> >>
>> >>> >> 
>> >>> >>
>> >>> >> 
>> >>> >> -odac -d
>> >>> >> 
>> >>> >>
>> >>> >> 
>> >>> >> sr     = 96000
>> >>> >> kr     = 16
>> >>> >> nchnls = 1
>> >>> >>
>> >>> >> seed 0
>> >>> >>
>> >>> >>
>> >>> >>      instr 1
>> >>> >> kmorph2 randomi 0,1, 2
>> >>> >>
>> >>> >> printk 0.1, kmorph2
>> >>> >>
>> >>> >>      endin
>> >>> >>
>> >>> >> 
>> >>> >>
>> >>> >> 
>> >>> >> i1 0 3600
>> >>> >> 
>> >>> >>
>> >>> >> 
>> >>> >>
>> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>> >>> >> 
>> >>> >> wrote:
>> >>> >> > Not stuck here. 5.13 OSX 10.5
>> >>> >> >
>> >>> >> > i1 0.00000
>> >>> >> > i1 0.11036
>> >>> >> > i1 0.22072
>> >>> >> > i1 0.33108
>> >>> >> > i1 0.44144
>> >>> >> > i1 0.55180
>> >>> >> > i1 0.66215
>> >>> >> > i1 0.77251
>> >>> >> > i1 0.88287
>> >>> >> > i1 0.80893
>> >>> >> > i1 0.73499
>> >>> >> > i1 0.66105
>> >>> >> > i1 0.58711
>> >>> >> > i1 0.51317
>> >>> >> > i1 0.43922
>> >>> >> > i1 0.36528
>> >>> >> > i1 0.29134
>> >>> >> > i1 0.37064
>> >>> >> > i1 0.44993
>> >>> >> > i1 0.52923
>> >>> >> > i1 0.60853
>> >>> >> > i1 0.68782
>> >>> >> > i1 0.76712
>> >>> >> > i1 0.84641
>> >>> >> > i1 0.92571
>> >>> >> > i1 0.82436
>> >>> >> > i1 0.72301
>> >>> >> > i1 0.62166
>> >>> >> > i1 0.52031
>> >>> >> > i1 0.41896
>> >>> >> > i1 0.31761
>> >>> >> > i1 0.21626
>> >>> >> > i1 0.11491
>> >>> >> > i1 0.10123
>> >>> >> > i1 0.08756
>> >>> >> > i1 0.07388
>> >>> >> > i1 0.06021
>> >>> >> > i1 0.04653
>> >>> >> > i1 0.03286
>> >>> >> > i1 0.01918
>> >>> >> > i1 0.00551
>> >>> >> > i1 0.06780
>> >>> >> > i1 0.13008
>> >>> >> > i1 0.19237
>> >>> >> > i1 0.25466
>> >>> >> > i1 0.31695
>> >>> >> > i1 0.37924
>> >>> >> > i1 0.44153
>> >>> >> > i1 0.50381
>> >>> >> > i1 0.51766
>> >>> >> > i1 0.53150
>> >>> >> > i1 0.54534
>> >>> >> > i1 0.55919
>> >>> >> > i1 0.57303
>> >>> >> > i1 0.58687
>> >>> >> > i1 0.60072
>> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>> >>> >> >
>> >>> >> >> yes 5.13. I used the universal installer.
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> On 26 January 2011 22:05, joachim heintz 
>> >>> >> >> wrote:
>> >>> >> >>>
>> >>> >> >>> do you also use 5.13?
>> >>> >> >>>
>> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>> >>> >> >>>>
>> >>> >> >>>> I wonder if this is only happening with this opcode or if it's
>> >>> >> >>>> a
>> >>> >> >>>> more
>> >>> >> >>>> general OS X related issue to do with krate and timing.
>> >>> >> >>>>
>> >>> >> >>>> P
>> >>> >> >>>>
>> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>> >>> >> >>>> 
>> >>> >> >>>> wrote:
>> >>> >> >>>>>
>> >>> >> >>>>> Thanks Menno,
>> >>> >> >>>>>
>> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
>> >>> >> >>>>> following.
>> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>> >>> >> >>>>>
>> >>> >> >>>>>  new alloc for instr 1:
>> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>> >>> >> >>>>>
>> >>> >> >>>>> Best,
>> >>> >> >>>>>
>> >>> >> >>>>> Peiman
>> >>> >> >>>>>
>> >>> >> >>>>>  
>> >>> >> >>>>>
>> >>> >> >>>>> 
>> >>> >> >>>>> -odac -d
>> >>> >> >>>>> 
>> >>> >> >>>>>
>> >>> >> >>>>> 
>> >>> >> >>>>> sr     = 96000
>> >>> >> >>>>> kr     = 16
>> >>> >> >>>>> nchnls = 1
>> >>> >> >>>>>
>> >>> >> >>>>> seed 0
>> >>> >> >>>>>
>> >>> >> >>>>>
>> >>> >> >>>>>      instr 1
>> >>> >> >>>>> kmorph2 randomi 0,1, 2
>> >>> >> >>>>>
>> >>> >> >>>>> printk 0.1, kmorph2
>> >>> >> >>>>>
>> >>> >> >>>>>      endin
>> >>> >> >>>>>
>> >>> >> >>>>> 
>> >>> >> >>>>>
>> >>> >> >>>>> 
>> >>> >> >>>>> i1 0 3600
>> >>> >> >>>>> 
>> >>> >> >>>>>
>> >>> >> >>>>> 
>> >>> >> >>>>>
>> >>> >> >>>>>
>> >>> >> >>>>>
>> >>> >> >>>>> On 26 January 2011 08:35, menno  wrote:
>> >>> >> >>>>>>
>> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>> >>> >> >>>>>> Csound5.13beta,
>> >>> >> >>>>>> doubles
>> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>> >>> >> >>>>>>
>> >>> >> >>>>>> new alloc for instr 1:
>> >>> >> >>>>>>  i1     0.00000
>> >>> >> >>>>>>  i1     0.00052
>> >>> >> >>>>>>  i1     0.00111
>> >>> >> >>>>>>  i1     0.00170
>> >>> >> >>>>>>  i1     0.00229
>> >>> >> >>>>>>  i1     0.00288
>> >>> >> >>>>>>  i1     0.00347
>> >>> >> >>>>>>  i1     0.00406
>> >>> >> >>>>>>  i1     0.00464
>> >>> >> >>>>>>  i1     0.00523
>> >>> >> >>>>>>  i1     0.00582
>> >>> >> >>>>>>  i1     0.00641
>> >>> >> >>>>>>  i1     0.00700
>> >>> >> >>>>>>  i1     0.00759.....
>> >>> >> >>>>>>
>> >>> >> >>>>>> greetings
>> >>> >> >>>>>> menno
>> >>> >> >>>>>> --
>> >>> >> >>>>>> View this message in context:
>> >>> >> >>>>>>
>> >>> >> >>>>>>
>> >>> >> >>>>>>
>> >>> >> >>>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>> >>> >> >>>>>> Sent from the Csound - General mailing list archive at
>> >>> >> >>>>>> Nabble.com.
>> >>> >> >>>>>>
>> >>> >> >>>>>>
>> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>> >>> >> >>>>>>
>> >>> >> >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> >>>>>> Discussions of bugs and features can be posted here
>> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> >>>>>> "unsubscribe csound"
>> >>> >> >>>>>>
>> >>> >> >>>>>>
>> >>> >> >>>>>
>> >>> >> >>>>
>> >>> >> >>>>
>> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>> >>> >> >>>>
>> >>> >> >>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> >>>> Discussions of bugs and features can be posted here
>> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> >>>> "unsubscribe
>> >>> >> >>>> csound"
>> >>> >> >>>>
>> >>> >> >>>>
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >>> >> >>>
>> >>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> >>> Discussions of bugs and features can be posted here
>> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> >>> "unsubscribe
>> >>> >> >>> csound"
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>> >>> >> >>
>> >>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> >> Discussions of bugs and features can be posted here
>> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> >> "unsubscribe
>> >>> >> >> csound"
>> >>> >> >>
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > Send bugs reports to the Sourceforge bug tracker
>> >>> >> >
>> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> > Discussions of bugs and features can be posted here
>> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> > "unsubscribe
>> >>> >> > csound"
>> >>> >> >
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >> Send bugs reports to the Sourceforge bug tracker
>> >>> >>
>> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> >> Discussions of bugs and features can be posted here
>> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> >> "unsubscribe
>> >>> >> csound"
>> >>> >>
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>> Send bugs reports to the Sourceforge bug tracker
>> >>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >>> Discussions of bugs and features can be posted here
>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >>> "unsubscribe
>> >>> csound"
>> >>>
>> >>
>> >>
>> >
>> >
>> > Send bugs reports to the Sourceforge bug tracker
>> >            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> > Discussions of bugs and features can be posted here
>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> > csound"
>> >
>> >
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-27 22:07
FromIain McCurdy
SubjectRE: [Csnd] funny randomi issue
I would argue that the opcode should have, in the first place, generated two random values and begun interpolation immediately. I can't really see the usefulness of the initial static segment. Adding optional arguments complicates the opcode but I can appreciate that this preserves backwards compatibility.

Bye,
Iain

> Date: Thu, 27 Jan 2011 17:16:31 +0000
> From: peimankhosravi@gmail.com
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] funny randomi issue
>
> thanks very much. That would be awesome.
>
> Best,
>
> Peiman
>
> On 27 January 2011 17:07, Art Hunkins <abhunkin@uncg.edu> wrote:
> > +1 for this entire enhancement.
> >
> > Art Hunkins
> >
> > ----- Original Message -----
> > From: Francois PINOT
> > To: csound@lists.bath.ac.uk
> > Sent: Thursday, January 27, 2011 9:49 AM
> > Subject: Re: [Csnd] funny randomi issue
> > Something like this?
> >
> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
> >
> > iinterp0 (optional, default=0) -- first interpolation cycle mode (see below)
> > ifirstval (optional, default=0) -- first output value
> >
> > When iinterp0 = 0 (the default), the kmin argument value is outputted for
> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before the first
> > random number is generated. Then the normal interpolation process takes
> > place, first between kmin and the first random number generated, and then
> > between successive generated random numbers, each interpolation cycle having
> > a duration of 1/kcps (resp. 1/acps) seconds.
> >
> > When iinterp0 = 1, a random number is generated at initialization and
> > interpolation begins immediately between the kmin argument value and that
> > random number.
> >
> > When interp0 = 2, a random number is generated at initialization and
> > interpolation begins immediately between the ifirstval argument value and
> > that random number.
> >
> >
> > This  way, we could have immediate interpolation and initial value without
> > modifying older versions behavior. If you agree with this, I can modify the
> > source files (opcodes/uggab.h and opcodes/uggab.c), test the modifications
> > and send the files to Andrés for upload
> >
> > Regards
> >
> > François
> >
> >
> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >>
> >> Thanks!
> >>
> >> Yes I second Andres. I think the addition of both, an initial state
> >> and starting the interpolation immediately would be a big bonus.
> >>
> >> Best,
> >>
> >> Peiman
> >>
> >>
> >>
> >> On 27 January 2011 10:56, Andres Cabrera <mantaraya36@gmail.com> wrote:
> >> > It might actually be a better solution to add an optional i-time
> >> > parameter which sets the initial state, or an option to enable
> >> > producing a random number from the start.
> >> >
> >> > Cheers,
> >> > Andres
> >> >
> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <fggpinot@gmail.com>
> >> > wrote:
> >> >> Absolutely! I can add this paragraph to the "Performance" section of
> >> >> the
> >> >> manual entry for randomi:
> >> >>
> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
> >> >> beginning of the note, before the first random number is generated.
> >> >> Then the
> >> >> normal interpolation process takes place, first between kmin and the
> >> >> first
> >> >> random number generated, and then between successive generated random
> >> >> numbers, each interpolation cycle having a duration of 1/kcps (resp.
> >> >> 1/acps)
> >> >> seconds.
> >> >>
> >> >> Is it OK?
> >> >>
> >> >> Francois
> >> >>
> >> >>
> >> >> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >> >>>
> >> >>> Thanks for the explaination Francois.
> >> >>>
> >> >>> So just to clarify. The minimum value is always outputed for 1/kcps
> >> >>> seconds when the note is initialised? Is this because the opcode uses
> >> >>> this time to generate the next random number that is subsequently used
> >> >>> for the interpolation?
> >> >>>
> >> >>> I think this should be in the manual as a kcps value of 0.1 or
> >> >>> somthing like that means a long wait (10 seconds!). I guess the trick
> >> >>> would be something like this:
> >> >>>
> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
> >> >>> kmorph2 randomi 0,1, 2*kmult
> >> >>>
> >> >>> Best,
> >> >>>
> >> >>> Peiman
> >> >>>
> >> >>>
> >> >>> On 27 January 2011 08:18, Francois PINOT <fggpinot@gmail.com> wrote:
> >> >>> > Hi Peiman,
> >> >>> >
> >> >>> > This is normal behavior: randomi is an interpolating opcode. That
> >> >>> > means
> >> >>> > that
> >> >>> > it will generate new random numbers at a rate of  kcps but, during
> >> >>> > the
> >> >>> > 1/kcps sec separating two random numbers, it will output
> >> >>> > interpolated
> >> >>> > values. The first values in your example are always 0 because the
> >> >>> > first
> >> >>> > interpolation is done between kmin (which is 0 in your example)  and
> >> >>> > the
> >> >>> > first generated random value. By changing the value of kmin, you'll
> >> >>> > get
> >> >>> > different starting values. Moreover, if you change the kcps value,
> >> >>> > the
> >> >>> > number of fixed initial values will change accordingly.
> >> >>> >
> >> >>> > Hope this helps
> >> >>> >
> >> >>> > Francois
> >> >>> >
> >> >>> >
> >> >>> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >> >>> >>
> >> >>> >> Can you try this one please Victor.
> >> >>> >>
> >> >>> >> <CsoundSynthesizer>
> >> >>> >>
> >> >>> >> <CsOptions>
> >> >>> >> -odac -d
> >> >>> >> </CsOptions>
> >> >>> >>
> >> >>> >> <CsInstruments>
> >> >>> >> sr     = 96000
> >> >>> >> kr     = 16
> >> >>> >> nchnls = 1
> >> >>> >>
> >> >>> >> seed 0
> >> >>> >>
> >> >>> >>
> >> >>> >>      instr 1
> >> >>> >> kmorph2 randomi 0,1, 2
> >> >>> >>
> >> >>> >> printk 0.1, kmorph2
> >> >>> >>
> >> >>> >>      endin
> >> >>> >>
> >> >>> >> </CsInstruments>
> >> >>> >>
> >> >>> >> <CsScore>
> >> >>> >> i1 0 3600
> >> >>> >> </CsScore>
> >> >>> >>
> >> >>> >> </CsoundSynthesizer>
> >> >>> >>
> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
> >> >>> >> <Victor.Lazzarini@nuim.ie>
> >> >>> >> wrote:
> >> >>> >> > Not stuck here. 5.13 OSX 10.5
> >> >>> >> >
> >> >>> >> > i1 0.00000
> >> >>> >> > i1 0.11036
> >> >>> >> > i1 0.22072
> >> >>> >> > i1 0.33108
> >> >>> >> > i1 0.44144
> >> >>> >> > i1 0.55180
> >> >>> >> > i1 0.66215
> >> >>> >> > i1 0.77251
> >> >>> >> > i1 0.88287
> >> >>> >> > i1 0.80893
> >> >>> >> > i1 0.73499
> >> >>> >> > i1 0.66105
> >> >>> >> > i1 0.58711
> >> >>> >> > i1 0.51317
> >> >>> >> > i1 0.43922
> >> >>> >> > i1 0.36528
> >> >>> >> > i1 0.29134
> >> >>> >> > i1 0.37064
> >> >>> >> > i1 0.44993
> >> >>> >> > i1 0.52923
> >> >>> >> > i1 0.60853
> >> >>> >> > i1 0.68782
> >> >>> >> > i1 0.76712
> >> >>> >> > i1 0.84641
> >> >>> >> > i1 0.92571
> >> >>> >> > i1 0.82436
> >> >>> >> > i1 0.72301
> >> >>> >> > i1 0.62166
> >> >>> >> > i1 0.52031
> >> >>> >> > i1 0.41896
> >> >>> >> > i1 0.31761
> >> >>> >> > i1 0.21626
> >> >>> >> > i1 0.11491
> >> >>> >> > i1 0.10123
> >> >>> >> > i1 0.08756
> >> >>> >> > i1 0.07388
> >> >>> >> > i1 0.06021
> >> >>> >> > i1 0.04653
> >> >>> >> > i1 0.03286
> >> >>> >> > i1 0.01918
> >> >>> >> > i1 0.00551
> >> >>> >> > i1 0.06780
> >> >>> >> > i1 0.13008
> >> >>> >> > i1 0.19237
> >> >>> >> > i1 0.25466
> >> >>> >> > i1 0.31695
> >> >>> >> > i1 0.37924
> >> >>> >> > i1 0.44153
> >> >>> >> > i1 0.50381
> >> >>> >> > i1 0.51766
> >> >>> >> > i1 0.53150
> >> >>> >> > i1 0.54534
> >> >>> >> > i1 0.55919
> >> >>> >> > i1 0.57303
> >> >>> >> > i1 0.58687
> >> >>> >> > i1 0.60072
> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
> >> >>> >> >
> >> >>> >> >> yes 5.13. I used the universal installer.
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >> On 26 January 2011 22:05, joachim heintz <jh@joachimheintz.de>
> >> >>> >> >> wrote:
> >> >>> >> >>>
> >> >>> >> >>> do you also use 5.13?
> >> >>> >> >>>
> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
> >> >>> >> >>>>
> >> >>> >> >>>> I wonder if this is only happening with this opcode or if it's
> >> >>> >> >>>> a
> >> >>> >> >>>> more
> >> >>> >> >>>> general OS X related issue to do with krate and timing.
> >> >>> >> >>>>
> >> >>> >> >>>> P
> >> >>> >> >>>>
> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
> >> >>> >> >>>> <peimankhosravi@gmail.com>
> >> >>> >> >>>> wrote:
> >> >>> >> >>>>>
> >> >>> >> >>>>> Thanks Menno,
> >> >>> >> >>>>>
> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
> >> >>> >> >>>>> following.
> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
> >> >>> >> >>>>>
> >> >>> >> >>>>>  new alloc for instr 1:
> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
> >> >>> >> >>>>>
> >> >>> >> >>>>> Best,
> >> >>> >> >>>>>
> >> >>> >> >>>>> Peiman
> >> >>> >> >>>>>
> >> >>> >> >>>>>  <CsoundSynthesizer>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsOptions>
> >> >>> >> >>>>> -odac -d
> >> >>> >> >>>>> </CsOptions>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsInstruments>
> >> >>> >> >>>>> sr     = 96000
> >> >>> >> >>>>> kr     = 16
> >> >>> >> >>>>> nchnls = 1
> >> >>> >> >>>>>
> >> >>> >> >>>>> seed 0
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>>      instr 1
> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
> >> >>> >> >>>>>
> >> >>> >> >>>>> printk 0.1, kmorph2
> >> >>> >> >>>>>
> >> >>> >> >>>>>      endin
> >> >>> >> >>>>>
> >> >>> >> >>>>> </CsInstruments>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsScore>
> >> >>> >> >>>>> i1 0 3600
> >> >>> >> >>>>> </CsScore>
> >> >>> >> >>>>>
> >> >>> >> >>>>> </CsoundSynthesizer>
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>> On 26 January 2011 08:35, menno <nabob_cd@yahoo.com> wrote:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
> >> >>> >> >>>>>> Csound5.13beta,
> >> >>> >> >>>>>> doubles
> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> new alloc for instr 1:
> >> >>> >> >>>>>>  i1     0.00000
> >> >>> >> >>>>>>  i1     0.00052
> >> >>> >> >>>>>>  i1     0.00111
> >> >>> >> >>>>>>  i1     0.00170
> >> >>> >> >>>>>>  i1     0.00229
> >> >>> >> >>>>>>  i1     0.00288
> >> >>> >> >>>>>>  i1     0.00347
> >> >>> >> >>>>>>  i1     0.00406
> >> >>> >> >>>>>>  i1     0.00464
> >> >>> >> >>>>>>  i1     0.00523
> >> >>> >> >>>>>>  i1     0.00582
> >> >>> >> >>>>>>  i1     0.00641
> >> >>> >> >>>>>>  i1     0.00700
> >> >>> >> >>>>>>  i1     0.00759.....
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> greetings
> >> >>> >> >>>>>> menno
> >> >>> >> >>>>>> --
> >> >>> >> >>>>>> View this message in context:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive at
> >> >>> >> >>>>>> Nabble.com.
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>>>>> "unsubscribe csound"
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>
> >> >>> >> >>>>
> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>>
> >> >>> >> >>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>>> Discussions of bugs and features can be posted here
> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>>> "unsubscribe
> >> >>> >> >>>> csound"
> >> >>> >> >>>>
> >> >>> >> >>>>
> >> >>> >> >>>
> >> >>> >> >>>
> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>
> >> >>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>> Discussions of bugs and features can be posted here
> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>> "unsubscribe
> >> >>> >> >>> csound"
> >> >>> >> >>>
> >> >>> >> >>>
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>
> >> >>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >> Discussions of bugs and features can be posted here
> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >> "unsubscribe
> >> >>> >> >> csound"
> >> >>> >> >>
> >> >>> >> >
> >> >>> >> >
> >> >>> >> >
> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >
> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> > Discussions of bugs and features can be posted here
> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> > "unsubscribe
> >> >>> >> > csound"
> >> >>> >> >
> >> >>> >> >
> >> >>> >>
> >> >>> >>
> >> >>> >> Send bugs reports to the Sourceforge bug tracker
> >> >>> >>
> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> Discussions of bugs and features can be posted here
> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> "unsubscribe
> >> >>> >> csound"
> >> >>> >>
> >> >>> >
> >> >>> >
> >> >>>
> >> >>>
> >> >>> Send bugs reports to the Sourceforge bug tracker
> >> >>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> Discussions of bugs and features can be posted here
> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> "unsubscribe
> >> >>> csound"
> >> >>>
> >> >>
> >> >>
> >> >
> >> >
> >> > Send bugs reports to the Sourceforge bug tracker
> >> >            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> > Discussions of bugs and features can be posted here
> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> >> > csound"
> >> >
> >> >
> >>
> >>
> >> Send bugs reports to the Sourceforge bug tracker
> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> Discussions of bugs and features can be posted here
> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> >> csound"
> >>
> >
> >
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2011-01-27 22:44
Fromjoachim heintz
SubjectRe: [Csnd] funny randomi issue
That's my opinion, too. And randi behaves in this way.

There is another issue with randomi/randomh: they will always start from
the minimum value, regardless the seed. for instance:


seed 0
instr 1
krand randomi 1, 10, 1
printk .5, krand
endin


i 1 0 10



Again, randi/randh behave correctly.

I'm afraid the randomi/randomh opcodes are simply not written as they
should.
Perhaps a small UDO with randi/randh inside, but the min/max syntax of
randomi/randomh would be the best solution?

	joachim



Am 27.01.2011 23:07, schrieb Iain McCurdy:
> I would argue that the opcode should have, in the first place, generated
> two random values and begun interpolation immediately. I can't really
> see the usefulness of the initial static segment. Adding optional
> arguments complicates the opcode but I can appreciate that this
> preserves backwards compatibility.
> 
> Bye,
> Iain
> 
>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>> From: peimankhosravi@gmail.com
>> To: csound@lists.bath.ac.uk
>> Subject: Re: [Csnd] funny randomi issue
>>
>> thanks very much. That would be awesome.
>>
>> Best,
>>
>> Peiman
>>
>> On 27 January 2011 17:07, Art Hunkins  wrote:
>> > +1 for this entire enhancement.
>> >
>> > Art Hunkins
>> >
>> > ----- Original Message -----
>> > From: Francois PINOT
>> > To: csound@lists.bath.ac.uk
>> > Sent: Thursday, January 27, 2011 9:49 AM
>> > Subject: Re: [Csnd] funny randomi issue
>> > Something like this?
>> >
>> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>> >
>> > iinterp0 (optional, default=0) -- first interpolation cycle mode
> (see below)
>> > ifirstval (optional, default=0) -- first output value
>> >
>> > When iinterp0 = 0 (the default), the kmin argument value is
> outputted for
>> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
> the first
>> > random number is generated. Then the normal interpolation process takes
>> > place, first between kmin and the first random number generated, and
> then
>> > between successive generated random numbers, each interpolation
> cycle having
>> > a duration of 1/kcps (resp. 1/acps) seconds.
>> >
>> > When iinterp0 = 1, a random number is generated at initialization and
>> > interpolation begins immediately between the kmin argument value and
> that
>> > random number.
>> >
>> > When interp0 = 2, a random number is generated at initialization and
>> > interpolation begins immediately between the ifirstval argument
> value and
>> > that random number.
>> >
>> >
>> > This  way, we could have immediate interpolation and initial value
> without
>> > modifying older versions behavior. If you agree with this, I can
> modify the
>> > source files (opcodes/uggab.h and opcodes/uggab.c), test the
> modifications
>> > and send the files to Andrés for upload
>> >
>> > Regards
>> >
>> > François
>> >
>> >
>> > 2011/1/27 peiman khosravi 
>> >>
>> >> Thanks!
>> >>
>> >> Yes I second Andres. I think the addition of both, an initial state
>> >> and starting the interpolation immediately would be a big bonus.
>> >>
>> >> Best,
>> >>
>> >> Peiman
>> >>
>> >>
>> >>
>> >> On 27 January 2011 10:56, Andres Cabrera  wrote:
>> >> > It might actually be a better solution to add an optional i-time
>> >> > parameter which sets the initial state, or an option to enable
>> >> > producing a random number from the start.
>> >> >
>> >> > Cheers,
>> >> > Andres
>> >> >
>> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT 
>> >> > wrote:
>> >> >> Absolutely! I can add this paragraph to the "Performance" section of
>> >> >> the
>> >> >> manual entry for randomi:
>> >> >>
>> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
>> >> >> beginning of the note, before the first random number is generated.
>> >> >> Then the
>> >> >> normal interpolation process takes place, first between kmin and the
>> >> >> first
>> >> >> random number generated, and then between successive generated
> random
>> >> >> numbers, each interpolation cycle having a duration of 1/kcps (resp.
>> >> >> 1/acps)
>> >> >> seconds.
>> >> >>
>> >> >> Is it OK?
>> >> >>
>> >> >> Francois
>> >> >>
>> >> >>
>> >> >> 2011/1/27 peiman khosravi 
>> >> >>>
>> >> >>> Thanks for the explaination Francois.
>> >> >>>
>> >> >>> So just to clarify. The minimum value is always outputed for 1/kcps
>> >> >>> seconds when the note is initialised? Is this because the
> opcode uses
>> >> >>> this time to generate the next random number that is
> subsequently used
>> >> >>> for the interpolation?
>> >> >>>
>> >> >>> I think this should be in the manual as a kcps value of 0.1 or
>> >> >>> somthing like that means a long wait (10 seconds!). I guess the
> trick
>> >> >>> would be something like this:
>> >> >>>
>> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
>> >> >>> kmorph2 randomi 0,1, 2*kmult
>> >> >>>
>> >> >>> Best,
>> >> >>>
>> >> >>> Peiman
>> >> >>>
>> >> >>>
>> >> >>> On 27 January 2011 08:18, Francois PINOT 
> wrote:
>> >> >>> > Hi Peiman,
>> >> >>> >
>> >> >>> > This is normal behavior: randomi is an interpolating opcode. That
>> >> >>> > means
>> >> >>> > that
>> >> >>> > it will generate new random numbers at a rate of  kcps but,
> during
>> >> >>> > the
>> >> >>> > 1/kcps sec separating two random numbers, it will output
>> >> >>> > interpolated
>> >> >>> > values. The first values in your example are always 0 because the
>> >> >>> > first
>> >> >>> > interpolation is done between kmin (which is 0 in your
> example)  and
>> >> >>> > the
>> >> >>> > first generated random value. By changing the value of kmin,
> you'll
>> >> >>> > get
>> >> >>> > different starting values. Moreover, if you change the kcps
> value,
>> >> >>> > the
>> >> >>> > number of fixed initial values will change accordingly.
>> >> >>> >
>> >> >>> > Hope this helps
>> >> >>> >
>> >> >>> > Francois
>> >> >>> >
>> >> >>> >
>> >> >>> > 2011/1/27 peiman khosravi 
>> >> >>> >>
>> >> >>> >> Can you try this one please Victor.
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >> -odac -d
>> >> >>> >> 
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >> sr     = 96000
>> >> >>> >> kr     = 16
>> >> >>> >> nchnls = 1
>> >> >>> >>
>> >> >>> >> seed 0
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>      instr 1
>> >> >>> >> kmorph2 randomi 0,1, 2
>> >> >>> >>
>> >> >>> >> printk 0.1, kmorph2
>> >> >>> >>
>> >> >>> >>      endin
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >> i1 0 3600
>> >> >>> >> 
>> >> >>> >>
>> >> >>> >> 
>> >> >>> >>
>> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>> >> >>> >> 
>> >> >>> >> wrote:
>> >> >>> >> > Not stuck here. 5.13 OSX 10.5
>> >> >>> >> >
>> >> >>> >> > i1 0.00000
>> >> >>> >> > i1 0.11036
>> >> >>> >> > i1 0.22072
>> >> >>> >> > i1 0.33108
>> >> >>> >> > i1 0.44144
>> >> >>> >> > i1 0.55180
>> >> >>> >> > i1 0.66215
>> >> >>> >> > i1 0.77251
>> >> >>> >> > i1 0.88287
>> >> >>> >> > i1 0.80893
>> >> >>> >> > i1 0.73499
>> >> >>> >> > i1 0.66105
>> >> >>> >> > i1 0.58711
>> >> >>> >> > i1 0.51317
>> >> >>> >> > i1 0.43922
>> >> >>> >> > i1 0.36528
>> >> >>> >> > i1 0.29134
>> >> >>> >> > i1 0.37064
>> >> >>> >> > i1 0.44993
>> >> >>> >> > i1 0.52923
>> >> >>> >> > i1 0.60853
>> >> >>> >> > i1 0.68782
>> >> >>> >> > i1 0.76712
>> >> >>> >> > i1 0.84641
>> >> >>> >> > i1 0.92571
>> >> >>> >> > i1 0.82436
>> >> >>> >> > i1 0.72301
>> >> >>> >> > i1 0.62166
>> >> >>> >> > i1 0.52031
>> >> >>> >> > i1 0.41896
>> >> >>> >> > i1 0.31761
>> >> >>> >> > i1 0.21626
>> >> >>> >> > i1 0.11491
>> >> >>> >> > i1 0.10123
>> >> >>> >> > i1 0.08756
>> >> >>> >> > i1 0.07388
>> >> >>> >> > i1 0.06021
>> >> >>> >> > i1 0.04653
>> >> >>> >> > i1 0.03286
>> >> >>> >> > i1 0.01918
>> >> >>> >> > i1 0.00551
>> >> >>> >> > i1 0.06780
>> >> >>> >> > i1 0.13008
>> >> >>> >> > i1 0.19237
>> >> >>> >> > i1 0.25466
>> >> >>> >> > i1 0.31695
>> >> >>> >> > i1 0.37924
>> >> >>> >> > i1 0.44153
>> >> >>> >> > i1 0.50381
>> >> >>> >> > i1 0.51766
>> >> >>> >> > i1 0.53150
>> >> >>> >> > i1 0.54534
>> >> >>> >> > i1 0.55919
>> >> >>> >> > i1 0.57303
>> >> >>> >> > i1 0.58687
>> >> >>> >> > i1 0.60072
>> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>> >> >>> >> >
>> >> >>> >> >> yes 5.13. I used the universal installer.
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> On 26 January 2011 22:05, joachim heintz
> 
>> >> >>> >> >> wrote:
>> >> >>> >> >>>
>> >> >>> >> >>> do you also use 5.13?
>> >> >>> >> >>>
>> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>> >> >>> >> >>>>
>> >> >>> >> >>>> I wonder if this is only happening with this opcode or
> if it's
>> >> >>> >> >>>> a
>> >> >>> >> >>>> more
>> >> >>> >> >>>> general OS X related issue to do with krate and timing.
>> >> >>> >> >>>>
>> >> >>> >> >>>> P
>> >> >>> >> >>>>
>> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>> >> >>> >> >>>> 
>> >> >>> >> >>>> wrote:
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Thanks Menno,
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
>> >> >>> >> >>>>> following.
>> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>  new alloc for instr 1:
>> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Best,
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Peiman
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>  
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>> -odac -d
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>> sr     = 96000
>> >> >>> >> >>>>> kr     = 16
>> >> >>> >> >>>>> nchnls = 1
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> seed 0
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>      instr 1
>> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> printk 0.1, kmorph2
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>      endin
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>> i1 0 3600
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> 
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> On 26 January 2011 08:35, menno 
> wrote:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>> >> >>> >> >>>>>> Csound5.13beta,
>> >> >>> >> >>>>>> doubles
>> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> new alloc for instr 1:
>> >> >>> >> >>>>>>  i1     0.00000
>> >> >>> >> >>>>>>  i1     0.00052
>> >> >>> >> >>>>>>  i1     0.00111
>> >> >>> >> >>>>>>  i1     0.00170
>> >> >>> >> >>>>>>  i1     0.00229
>> >> >>> >> >>>>>>  i1     0.00288
>> >> >>> >> >>>>>>  i1     0.00347
>> >> >>> >> >>>>>>  i1     0.00406
>> >> >>> >> >>>>>>  i1     0.00464
>> >> >>> >> >>>>>>  i1     0.00523
>> >> >>> >> >>>>>>  i1     0.00582
>> >> >>> >> >>>>>>  i1     0.00641
>> >> >>> >> >>>>>>  i1     0.00700
>> >> >>> >> >>>>>>  i1     0.00759.....
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> greetings
>> >> >>> >> >>>>>> menno
>> >> >>> >> >>>>>> --
>> >> >>> >> >>>>>> View this message in context:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive at
>> >> >>> >> >>>>>> Nabble.com.
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
>> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body
>> >> >>> >> >>>>>> "unsubscribe csound"
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>>> Discussions of bugs and features can be posted here
>> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >>>> "unsubscribe
>> >> >>> >> >>>> csound"
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>
>> >> >>> >> >>>
>> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>
>> >> >>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>> Discussions of bugs and features can be posted here
>> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >>> "unsubscribe
>> >> >>> >> >>> csound"
>> >> >>> >> >>>
>> >> >>> >> >>>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>
>> >> >>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >> Discussions of bugs and features can be posted here
>> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >> "unsubscribe
>> >> >>> >> >> csound"
>> >> >>> >> >>
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >
>> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> > Discussions of bugs and features can be posted here
>> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> > "unsubscribe
>> >> >>> >> > csound"
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >>
>> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> Discussions of bugs and features can be posted here
>> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> "unsubscribe
>> >> >>> >> csound"
>> >> >>> >>
>> >> >>> >
>> >> >>> >
>> >> >>>
>> >> >>>
>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >>>          
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> Discussions of bugs and features can be posted here
>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> "unsubscribe
>> >> >>> csound"
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >          
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> > Discussions of bugs and features can be posted here
>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe
>> >> > csound"
>> >> >
>> >> >
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe
>> >> csound"
>> >>
>> >
>> >
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-27 23:17
FromVictor Lazzarini
SubjectRe: [Csnd] funny randomi issue
Unfortunately, I don't think we can change behaviour, even if we decided it is silly. Piece or pieces out there might depend on it.

Victor
On 27 Jan 2011, at 22:07, Iain McCurdy wrote:

I would argue that the opcode should have, in the first place, generated two random values and begun interpolation immediately. I can't really see the usefulness of the initial static segment. Adding optional arguments complicates the opcode but I can appreciate that this preserves backwards compatibility.

Bye,
Iain

> Date: Thu, 27 Jan 2011 17:16:31 +0000
> From: peimankhosravi@gmail.com
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] funny randomi issue
> 
> thanks very much. That would be awesome.
> 
> Best,
> 
> Peiman
> 
> On 27 January 2011 17:07, Art Hunkins <abhunkin@uncg.edu> wrote:
> > +1 for this entire enhancement.
> >
> > Art Hunkins
> >
> > ----- Original Message -----
> > From: Francois PINOT
> > To: csound@lists.bath.ac.uk
> > Sent: Thursday, January 27, 2011 9:49 AM
> > Subject: Re: [Csnd] funny randomi issue
> > Something like this?
> >
> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
> >
> > iinterp0 (optional, default=0) -- first interpolation cycle mode (see below)
> > ifirstval (optional, default=0) -- first output value
> >
> > When iinterp0 = 0 (the default), the kmin argument value is outputted for
> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before the first
> > random number is generated. Then the normal interpolation process takes
> > place, first between kmin and the first random number generated, and then
> > between successive generated random numbers, each interpolation cycle having
> > a duration of 1/kcps (resp. 1/acps) seconds.
> >
> > When iinterp0 = 1, a random number is generated at initialization and
> > interpolation begins immediately between the kmin argument value and that
> > random number.
> >
> > When interp0 = 2, a random number is generated at initialization and
> > interpolation begins immediately between the ifirstval argument value and
> > that random number.
> >
> >
> > This  way, we could have immediate interpolation and initial value without
> > modifying older versions behavior. If you agree with this, I can modify the
> > source files (opcodes/uggab.h and opcodes/uggab.c), test the modifications
> > and send the files to Andrés for upload
> >
> > Regards
> >
> > François
> >
> >
> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >>
> >> Thanks!
> >>
> >> Yes I second Andres. I think the addition of both, an initial state
> >> and starting the interpolation immediately would be a big bonus.
> >>
> >> Best,
> >>
> >> Peiman
> >>
> >>
> >>
> >> On 27 January 2011 10:56, Andres Cabrera <mantaraya36@gmail.com> wrote:
> >> > It might actually be a better solution to add an optional i-time
> >> > parameter which sets the initial state, or an option to enable
> >> > producing a random number from the start.
> >> >
> >> > Cheers,
> >> > Andres
> >> >
> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <fggpinot@gmail.com>
> >> > wrote:
> >> >> Absolutely! I can add this paragraph to the "Performance" section of
> >> >> the
> >> >> manual entry for randomi:
> >> >>
> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
> >> >> beginning of the note, before the first random number is generated.
> >> >> Then the
> >> >> normal interpolation process takes place, first between kmin and the
> >> >> first
> >> >> random number generated, and then between successive generated random
> >> >> numbers, each interpolation cycle having a duration of 1/kcps (resp.
> >> >> 1/acps)
> >> >> seconds.
> >> >>
> >> >> Is it OK?
> >> >>
> >> >> Francois
> >> >>
> >> >>
> >> >> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >> >>>
> >> >>> Thanks for the explaination Francois.
> >> >>>
> >> >>> So just to clarify. The minimum value is always outputed for 1/kcps
> >> >>> seconds when the note is initialised? Is this because the opcode uses
> >> >>> this time to generate the next random number that is subsequently used
> >> >>> for the interpolation?
> >> >>>
> >> >>> I think this should be in the manual as a kcps value of 0.1 or
> >> >>> somthing like that means a long wait (10 seconds!). I guess the trick
> >> >>> would be something like this:
> >> >>>
> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
> >> >>> kmorph2 randomi 0,1, 2*kmult
> >> >>>
> >> >>> Best,
> >> >>>
> >> >>> Peiman
> >> >>>
> >> >>>
> >> >>> On 27 January 2011 08:18, Francois PINOT <fggpinot@gmail.com> wrote:
> >> >>> > Hi Peiman,
> >> >>> >
> >> >>> > This is normal behavior: randomi is an interpolating opcode. That
> >> >>> > means
> >> >>> > that
> >> >>> > it will generate new random numbers at a rate of  kcps but, during
> >> >>> > the
> >> >>> > 1/kcps sec separating two random numbers, it will output
> >> >>> > interpolated
> >> >>> > values. The first values in your example are always 0 because the
> >> >>> > first
> >> >>> > interpolation is done between kmin (which is 0 in your example)  and
> >> >>> > the
> >> >>> > first generated random value. By changing the value of kmin, you'll
> >> >>> > get
> >> >>> > different starting values. Moreover, if you change the kcps value,
> >> >>> > the
> >> >>> > number of fixed initial values will change accordingly.
> >> >>> >
> >> >>> > Hope this helps
> >> >>> >
> >> >>> > Francois
> >> >>> >
> >> >>> >
> >> >>> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
> >> >>> >>
> >> >>> >> Can you try this one please Victor.
> >> >>> >>
> >> >>> >> <CsoundSynthesizer>
> >> >>> >>
> >> >>> >> <CsOptions>
> >> >>> >> -odac -d
> >> >>> >> </CsOptions>
> >> >>> >>
> >> >>> >> <CsInstruments>
> >> >>> >> sr     = 96000
> >> >>> >> kr     = 16
> >> >>> >> nchnls = 1
> >> >>> >>
> >> >>> >> seed 0
> >> >>> >>
> >> >>> >>
> >> >>> >>      instr 1
> >> >>> >> kmorph2 randomi 0,1, 2
> >> >>> >>
> >> >>> >> printk 0.1, kmorph2
> >> >>> >>
> >> >>> >>      endin
> >> >>> >>
> >> >>> >> </CsInstruments>
> >> >>> >>
> >> >>> >> <CsScore>
> >> >>> >> i1 0 3600
> >> >>> >> </CsScore>
> >> >>> >>
> >> >>> >> </CsoundSynthesizer>
> >> >>> >>
> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
> >> >>> >> <Victor.Lazzarini@nuim.ie>
> >> >>> >> wrote:
> >> >>> >> > Not stuck here. 5.13 OSX 10.5
> >> >>> >> >
> >> >>> >> > i1 0.00000
> >> >>> >> > i1 0.11036
> >> >>> >> > i1 0.22072
> >> >>> >> > i1 0.33108
> >> >>> >> > i1 0.44144
> >> >>> >> > i1 0.55180
> >> >>> >> > i1 0.66215
> >> >>> >> > i1 0.77251
> >> >>> >> > i1 0.88287
> >> >>> >> > i1 0.80893
> >> >>> >> > i1 0.73499
> >> >>> >> > i1 0.66105
> >> >>> >> > i1 0.58711
> >> >>> >> > i1 0.51317
> >> >>> >> > i1 0.43922
> >> >>> >> > i1 0.36528
> >> >>> >> > i1 0.29134
> >> >>> >> > i1 0.37064
> >> >>> >> > i1 0.44993
> >> >>> >> > i1 0.52923
> >> >>> >> > i1 0.60853
> >> >>> >> > i1 0.68782
> >> >>> >> > i1 0.76712
> >> >>> >> > i1 0.84641
> >> >>> >> > i1 0.92571
> >> >>> >> > i1 0.82436
> >> >>> >> > i1 0.72301
> >> >>> >> > i1 0.62166
> >> >>> >> > i1 0.52031
> >> >>> >> > i1 0.41896
> >> >>> >> > i1 0.31761
> >> >>> >> > i1 0.21626
> >> >>> >> > i1 0.11491
> >> >>> >> > i1 0.10123
> >> >>> >> > i1 0.08756
> >> >>> >> > i1 0.07388
> >> >>> >> > i1 0.06021
> >> >>> >> > i1 0.04653
> >> >>> >> > i1 0.03286
> >> >>> >> > i1 0.01918
> >> >>> >> > i1 0.00551
> >> >>> >> > i1 0.06780
> >> >>> >> > i1 0.13008
> >> >>> >> > i1 0.19237
> >> >>> >> > i1 0.25466
> >> >>> >> > i1 0.31695
> >> >>> >> > i1 0.37924
> >> >>> >> > i1 0.44153
> >> >>> >> > i1 0.50381
> >> >>> >> > i1 0.51766
> >> >>> >> > i1 0.53150
> >> >>> >> > i1 0.54534
> >> >>> >> > i1 0.55919
> >> >>> >> > i1 0.57303
> >> >>> >> > i1 0.58687
> >> >>> >> > i1 0.60072
> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
> >> >>> >> >
> >> >>> >> >> yes 5.13. I used the universal installer.
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >> On 26 January 2011 22:05, joachim heintz <jh@joachimheintz.de>
> >> >>> >> >> wrote:
> >> >>> >> >>>
> >> >>> >> >>> do you also use 5.13?
> >> >>> >> >>>
> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
> >> >>> >> >>>>
> >> >>> >> >>>> I wonder if this is only happening with this opcode or if it's
> >> >>> >> >>>> a
> >> >>> >> >>>> more
> >> >>> >> >>>> general OS X related issue to do with krate and timing.
> >> >>> >> >>>>
> >> >>> >> >>>> P
> >> >>> >> >>>>
> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
> >> >>> >> >>>> <peimankhosravi@gmail.com>
> >> >>> >> >>>> wrote:
> >> >>> >> >>>>>
> >> >>> >> >>>>> Thanks Menno,
> >> >>> >> >>>>>
> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
> >> >>> >> >>>>> following.
> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
> >> >>> >> >>>>>
> >> >>> >> >>>>>  new alloc for instr 1:
> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
> >> >>> >> >>>>>
> >> >>> >> >>>>> Best,
> >> >>> >> >>>>>
> >> >>> >> >>>>> Peiman
> >> >>> >> >>>>>
> >> >>> >> >>>>>  <CsoundSynthesizer>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsOptions>
> >> >>> >> >>>>> -odac -d
> >> >>> >> >>>>> </CsOptions>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsInstruments>
> >> >>> >> >>>>> sr     = 96000
> >> >>> >> >>>>> kr     = 16
> >> >>> >> >>>>> nchnls = 1
> >> >>> >> >>>>>
> >> >>> >> >>>>> seed 0
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>>      instr 1
> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
> >> >>> >> >>>>>
> >> >>> >> >>>>> printk 0.1, kmorph2
> >> >>> >> >>>>>
> >> >>> >> >>>>>      endin
> >> >>> >> >>>>>
> >> >>> >> >>>>> </CsInstruments>
> >> >>> >> >>>>>
> >> >>> >> >>>>> <CsScore>
> >> >>> >> >>>>> i1 0 3600
> >> >>> >> >>>>> </CsScore>
> >> >>> >> >>>>>
> >> >>> >> >>>>> </CsoundSynthesizer>
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>> On 26 January 2011 08:35, menno <nabob_cd@yahoo.com> wrote:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
> >> >>> >> >>>>>> Csound5.13beta,
> >> >>> >> >>>>>> doubles
> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> new alloc for instr 1:
> >> >>> >> >>>>>>  i1     0.00000
> >> >>> >> >>>>>>  i1     0.00052
> >> >>> >> >>>>>>  i1     0.00111
> >> >>> >> >>>>>>  i1     0.00170
> >> >>> >> >>>>>>  i1     0.00229
> >> >>> >> >>>>>>  i1     0.00288
> >> >>> >> >>>>>>  i1     0.00347
> >> >>> >> >>>>>>  i1     0.00406
> >> >>> >> >>>>>>  i1     0.00464
> >> >>> >> >>>>>>  i1     0.00523
> >> >>> >> >>>>>>  i1     0.00582
> >> >>> >> >>>>>>  i1     0.00641
> >> >>> >> >>>>>>  i1     0.00700
> >> >>> >> >>>>>>  i1     0.00759.....
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> greetings
> >> >>> >> >>>>>> menno
> >> >>> >> >>>>>> --
> >> >>> >> >>>>>> View this message in context:
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive at
> >> >>> >> >>>>>> Nabble.com.
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>>>>
> >> >>> >> >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>>>>> "unsubscribe csound"
> >> >>> >> >>>>>>
> >> >>> >> >>>>>>
> >> >>> >> >>>>>
> >> >>> >> >>>>
> >> >>> >> >>>>
> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>>
> >> >>> >> >>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>>> Discussions of bugs and features can be posted here
> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>>> "unsubscribe
> >> >>> >> >>>> csound"
> >> >>> >> >>>>
> >> >>> >> >>>>
> >> >>> >> >>>
> >> >>> >> >>>
> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>>
> >> >>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >>> Discussions of bugs and features can be posted here
> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >>> "unsubscribe
> >> >>> >> >>> csound"
> >> >>> >> >>>
> >> >>> >> >>>
> >> >>> >> >>
> >> >>> >> >>
> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >>
> >> >>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> >> Discussions of bugs and features can be posted here
> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> >> "unsubscribe
> >> >>> >> >> csound"
> >> >>> >> >>
> >> >>> >> >
> >> >>> >> >
> >> >>> >> >
> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
> >> >>> >> >
> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> > Discussions of bugs and features can be posted here
> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> > "unsubscribe
> >> >>> >> > csound"
> >> >>> >> >
> >> >>> >> >
> >> >>> >>
> >> >>> >>
> >> >>> >> Send bugs reports to the Sourceforge bug tracker
> >> >>> >>
> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> >> Discussions of bugs and features can be posted here
> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> >> "unsubscribe
> >> >>> >> csound"
> >> >>> >>
> >> >>> >
> >> >>> >
> >> >>>
> >> >>>
> >> >>> Send bugs reports to the Sourceforge bug tracker
> >> >>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> >>> Discussions of bugs and features can be posted here
> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> >> >>> "unsubscribe
> >> >>> csound"
> >> >>>
> >> >>
> >> >>
> >> >
> >> >
> >> > Send bugs reports to the Sourceforge bug tracker
> >> >            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> > Discussions of bugs and features can be posted here
> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> >> > csound"
> >> >
> >> >
> >>
> >>
> >> Send bugs reports to the Sourceforge bug tracker
> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> Discussions of bugs and features can be posted here
> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> >> csound"
> >>
> >
> >
> 
> 
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2011-01-28 08:13
FromFrancois PINOT
SubjectRe: [Csnd] funny randomi issue
randi begins interpolation immediately, between iseed*kamp and a first generated random number. iseed being an optional argument with default value of 0.5, if it is not set, randi begins interpolation from kamp*0.5.

So my proposal was:

iinterp0=0, old behaviour for randomi
iinterp0=1, randomi behaves like randi when iseed is not set (except that the interpolation for randomi begins from kmin, while it begins from kamp*0.5 for randi)
iinterp1=2, randomi behaves like randi when iseed is set.

We could add iinterp0=3, where two random numbers would be generated as breakpoints for the first interpolation.

This way, we don't break backup compatibility, we gain a behaviour like the one of randi, plus the new possibility of two random breakpoints from the beginning of the note.

Please let me know your opinion about this.

Regards

Francois



2011/1/27 joachim heintz <jh@joachimheintz.de>
That's my opinion, too. And randi behaves in this way.

There is another issue with randomi/randomh: they will always start from
the minimum value, regardless the seed. for instance:
<CsoundSynthesizer>
<CsInstruments>
seed 0
instr 1
krand randomi 1, 10, 1
printk .5, krand
endin
</CsInstruments>
<CsScore>
i 1 0 10
</CsScore>
</CsoundSynthesizer>

Again, randi/randh behave correctly.

I'm afraid the randomi/randomh opcodes are simply not written as they
should.
Perhaps a small UDO with randi/randh inside, but the min/max syntax of
randomi/randomh would be the best solution?

       joachim



Am 27.01.2011 23:07, schrieb Iain McCurdy:
> I would argue that the opcode should have, in the first place, generated
> two random values and begun interpolation immediately. I can't really
> see the usefulness of the initial static segment. Adding optional
> arguments complicates the opcode but I can appreciate that this
> preserves backwards compatibility.
>
> Bye,
> Iain
>
>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>> From: peimankhosravi@gmail.com
>> To: csound@lists.bath.ac.uk
>> Subject: Re: [Csnd] funny randomi issue
>>
>> thanks very much. That would be awesome.
>>
>> Best,
>>
>> Peiman
>>
>> On 27 January 2011 17:07, Art Hunkins <abhunkin@uncg.edu> wrote:
>> > +1 for this entire enhancement.
>> >
>> > Art Hunkins
>> >
>> > ----- Original Message -----
>> > From: Francois PINOT
>> > To: csound@lists.bath.ac.uk
>> > Sent: Thursday, January 27, 2011 9:49 AM
>> > Subject: Re: [Csnd] funny randomi issue
>> > Something like this?
>> >
>> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>> >
>> > iinterp0 (optional, default=0) -- first interpolation cycle mode
> (see below)
>> > ifirstval (optional, default=0) -- first output value
>> >
>> > When iinterp0 = 0 (the default), the kmin argument value is
> outputted for
>> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
> the first
>> > random number is generated. Then the normal interpolation process takes
>> > place, first between kmin and the first random number generated, and
> then
>> > between successive generated random numbers, each interpolation
> cycle having
>> > a duration of 1/kcps (resp. 1/acps) seconds.
>> >
>> > When iinterp0 = 1, a random number is generated at initialization and
>> > interpolation begins immediately between the kmin argument value and
> that
>> > random number.
>> >
>> > When interp0 = 2, a random number is generated at initialization and
>> > interpolation begins immediately between the ifirstval argument
> value and
>> > that random number.
>> >
>> >
>> > This  way, we could have immediate interpolation and initial value
> without
>> > modifying older versions behavior. If you agree with this, I can
> modify the
>> > source files (opcodes/uggab.h and opcodes/uggab.c), test the
> modifications
>> > and send the files to Andrés for upload
>> >
>> > Regards
>> >
>> > François
>> >
>> >
>> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>> >>
>> >> Thanks!
>> >>
>> >> Yes I second Andres. I think the addition of both, an initial state
>> >> and starting the interpolation immediately would be a big bonus.
>> >>
>> >> Best,
>> >>
>> >> Peiman
>> >>
>> >>
>> >>
>> >> On 27 January 2011 10:56, Andres Cabrera <mantaraya36@gmail.com> wrote:
>> >> > It might actually be a better solution to add an optional i-time
>> >> > parameter which sets the initial state, or an option to enable
>> >> > producing a random number from the start.
>> >> >
>> >> > Cheers,
>> >> > Andres
>> >> >
>> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <fggpinot@gmail.com>
>> >> > wrote:
>> >> >> Absolutely! I can add this paragraph to the "Performance" section of
>> >> >> the
>> >> >> manual entry for randomi:
>> >> >>
>> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds at the
>> >> >> beginning of the note, before the first random number is generated.
>> >> >> Then the
>> >> >> normal interpolation process takes place, first between kmin and the
>> >> >> first
>> >> >> random number generated, and then between successive generated
> random
>> >> >> numbers, each interpolation cycle having a duration of 1/kcps (resp.
>> >> >> 1/acps)
>> >> >> seconds.
>> >> >>
>> >> >> Is it OK?
>> >> >>
>> >> >> Francois
>> >> >>
>> >> >>
>> >> >> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>> >> >>>
>> >> >>> Thanks for the explaination Francois.
>> >> >>>
>> >> >>> So just to clarify. The minimum value is always outputed for 1/kcps
>> >> >>> seconds when the note is initialised? Is this because the
> opcode uses
>> >> >>> this time to generate the next random number that is
> subsequently used
>> >> >>> for the interpolation?
>> >> >>>
>> >> >>> I think this should be in the manual as a kcps value of 0.1 or
>> >> >>> somthing like that means a long wait (10 seconds!). I guess the
> trick
>> >> >>> would be something like this:
>> >> >>>
>> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
>> >> >>> kmorph2 randomi 0,1, 2*kmult
>> >> >>>
>> >> >>> Best,
>> >> >>>
>> >> >>> Peiman
>> >> >>>
>> >> >>>
>> >> >>> On 27 January 2011 08:18, Francois PINOT <fggpinot@gmail.com>
> wrote:
>> >> >>> > Hi Peiman,
>> >> >>> >
>> >> >>> > This is normal behavior: randomi is an interpolating opcode. That
>> >> >>> > means
>> >> >>> > that
>> >> >>> > it will generate new random numbers at a rate of  kcps but,
> during
>> >> >>> > the
>> >> >>> > 1/kcps sec separating two random numbers, it will output
>> >> >>> > interpolated
>> >> >>> > values. The first values in your example are always 0 because the
>> >> >>> > first
>> >> >>> > interpolation is done between kmin (which is 0 in your
> example)  and
>> >> >>> > the
>> >> >>> > first generated random value. By changing the value of kmin,
> you'll
>> >> >>> > get
>> >> >>> > different starting values. Moreover, if you change the kcps
> value,
>> >> >>> > the
>> >> >>> > number of fixed initial values will change accordingly.
>> >> >>> >
>> >> >>> > Hope this helps
>> >> >>> >
>> >> >>> > Francois
>> >> >>> >
>> >> >>> >
>> >> >>> > 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>> >> >>> >>
>> >> >>> >> Can you try this one please Victor.
>> >> >>> >>
>> >> >>> >> <CsoundSynthesizer>
>> >> >>> >>
>> >> >>> >> <CsOptions>
>> >> >>> >> -odac -d
>> >> >>> >> </CsOptions>
>> >> >>> >>
>> >> >>> >> <CsInstruments>
>> >> >>> >> sr     = 96000
>> >> >>> >> kr     = 16
>> >> >>> >> nchnls = 1
>> >> >>> >>
>> >> >>> >> seed 0
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>      instr 1
>> >> >>> >> kmorph2 randomi 0,1, 2
>> >> >>> >>
>> >> >>> >> printk 0.1, kmorph2
>> >> >>> >>
>> >> >>> >>      endin
>> >> >>> >>
>> >> >>> >> </CsInstruments>
>> >> >>> >>
>> >> >>> >> <CsScore>
>> >> >>> >> i1 0 3600
>> >> >>> >> </CsScore>
>> >> >>> >>
>> >> >>> >> </CsoundSynthesizer>
>> >> >>> >>
>> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>> >> >>> >> <Victor.Lazzarini@nuim.ie>
>> >> >>> >> wrote:
>> >> >>> >> > Not stuck here. 5.13 OSX 10.5
>> >> >>> >> >
>> >> >>> >> > i1 0.00000
>> >> >>> >> > i1 0.11036
>> >> >>> >> > i1 0.22072
>> >> >>> >> > i1 0.33108
>> >> >>> >> > i1 0.44144
>> >> >>> >> > i1 0.55180
>> >> >>> >> > i1 0.66215
>> >> >>> >> > i1 0.77251
>> >> >>> >> > i1 0.88287
>> >> >>> >> > i1 0.80893
>> >> >>> >> > i1 0.73499
>> >> >>> >> > i1 0.66105
>> >> >>> >> > i1 0.58711
>> >> >>> >> > i1 0.51317
>> >> >>> >> > i1 0.43922
>> >> >>> >> > i1 0.36528
>> >> >>> >> > i1 0.29134
>> >> >>> >> > i1 0.37064
>> >> >>> >> > i1 0.44993
>> >> >>> >> > i1 0.52923
>> >> >>> >> > i1 0.60853
>> >> >>> >> > i1 0.68782
>> >> >>> >> > i1 0.76712
>> >> >>> >> > i1 0.84641
>> >> >>> >> > i1 0.92571
>> >> >>> >> > i1 0.82436
>> >> >>> >> > i1 0.72301
>> >> >>> >> > i1 0.62166
>> >> >>> >> > i1 0.52031
>> >> >>> >> > i1 0.41896
>> >> >>> >> > i1 0.31761
>> >> >>> >> > i1 0.21626
>> >> >>> >> > i1 0.11491
>> >> >>> >> > i1 0.10123
>> >> >>> >> > i1 0.08756
>> >> >>> >> > i1 0.07388
>> >> >>> >> > i1 0.06021
>> >> >>> >> > i1 0.04653
>> >> >>> >> > i1 0.03286
>> >> >>> >> > i1 0.01918
>> >> >>> >> > i1 0.00551
>> >> >>> >> > i1 0.06780
>> >> >>> >> > i1 0.13008
>> >> >>> >> > i1 0.19237
>> >> >>> >> > i1 0.25466
>> >> >>> >> > i1 0.31695
>> >> >>> >> > i1 0.37924
>> >> >>> >> > i1 0.44153
>> >> >>> >> > i1 0.50381
>> >> >>> >> > i1 0.51766
>> >> >>> >> > i1 0.53150
>> >> >>> >> > i1 0.54534
>> >> >>> >> > i1 0.55919
>> >> >>> >> > i1 0.57303
>> >> >>> >> > i1 0.58687
>> >> >>> >> > i1 0.60072
>> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>> >> >>> >> >
>> >> >>> >> >> yes 5.13. I used the universal installer.
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> On 26 January 2011 22:05, joachim heintz
> <jh@joachimheintz.de>
>> >> >>> >> >> wrote:
>> >> >>> >> >>>
>> >> >>> >> >>> do you also use 5.13?
>> >> >>> >> >>>
>> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>> >> >>> >> >>>>
>> >> >>> >> >>>> I wonder if this is only happening with this opcode or
> if it's
>> >> >>> >> >>>> a
>> >> >>> >> >>>> more
>> >> >>> >> >>>> general OS X related issue to do with krate and timing.
>> >> >>> >> >>>>
>> >> >>> >> >>>> P
>> >> >>> >> >>>>
>> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>> >> >>> >> >>>> <peimankhosravi@gmail.com>
>> >> >>> >> >>>> wrote:
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Thanks Menno,
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get the
>> >> >>> >> >>>>> following.
>> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>  new alloc for instr 1:
>> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Best,
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> Peiman
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>  <CsoundSynthesizer>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> <CsOptions>
>> >> >>> >> >>>>> -odac -d
>> >> >>> >> >>>>> </CsOptions>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> <CsInstruments>
>> >> >>> >> >>>>> sr     = 96000
>> >> >>> >> >>>>> kr     = 16
>> >> >>> >> >>>>> nchnls = 1
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> seed 0
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>      instr 1
>> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> printk 0.1, kmorph2
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>      endin
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> </CsInstruments>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> <CsScore>
>> >> >>> >> >>>>> i1 0 3600
>> >> >>> >> >>>>> </CsScore>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> </CsoundSynthesizer>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>> On 26 January 2011 08:35, menno <nabob_cd@yahoo.com>
> wrote:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>> >> >>> >> >>>>>> Csound5.13beta,
>> >> >>> >> >>>>>> doubles
>> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> new alloc for instr 1:
>> >> >>> >> >>>>>>  i1     0.00000
>> >> >>> >> >>>>>>  i1     0.00052
>> >> >>> >> >>>>>>  i1     0.00111
>> >> >>> >> >>>>>>  i1     0.00170
>> >> >>> >> >>>>>>  i1     0.00229
>> >> >>> >> >>>>>>  i1     0.00288
>> >> >>> >> >>>>>>  i1     0.00347
>> >> >>> >> >>>>>>  i1     0.00406
>> >> >>> >> >>>>>>  i1     0.00464
>> >> >>> >> >>>>>>  i1     0.00523
>> >> >>> >> >>>>>>  i1     0.00582
>> >> >>> >> >>>>>>  i1     0.00641
>> >> >>> >> >>>>>>  i1     0.00700
>> >> >>> >> >>>>>>  i1     0.00759.....
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> greetings
>> >> >>> >> >>>>>> menno
>> >> >>> >> >>>>>> --
>> >> >>> >> >>>>>> View this message in context:
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive at
>> >> >>> >> >>>>>> Nabble.com.
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
>> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body
>> >> >>> >> >>>>>> "unsubscribe csound"
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>>
>> >> >>> >> >>>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>>> Discussions of bugs and features can be posted here
>> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >>>> "unsubscribe
>> >> >>> >> >>>> csound"
>> >> >>> >> >>>>
>> >> >>> >> >>>>
>> >> >>> >> >>>
>> >> >>> >> >>>
>> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>>
>> >> >>> >> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >>> Discussions of bugs and features can be posted here
>> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >>> "unsubscribe
>> >> >>> >> >>> csound"
>> >> >>> >> >>>
>> >> >>> >> >>>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >>
>> >> >>> >> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> >> Discussions of bugs and features can be posted here
>> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> >> "unsubscribe
>> >> >>> >> >> csound"
>> >> >>> >> >>
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >>> >> >
>> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> > Discussions of bugs and features can be posted here
>> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> > "unsubscribe
>> >> >>> >> > csound"
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> Send bugs reports to the Sourceforge bug tracker
>> >> >>> >>
>> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> >> Discussions of bugs and features can be posted here
>> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> >> "unsubscribe
>> >> >>> >> csound"
>> >> >>> >>
>> >> >>> >
>> >> >>> >
>> >> >>>
>> >> >>>
>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >>>
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >>> Discussions of bugs and features can be posted here
>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >>> "unsubscribe
>> >> >>> csound"
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >
>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> > Discussions of bugs and features can be posted here
>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe
>> >> > csound"
>> >> >
>> >> >
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe
>> >> csound"
>> >>
>> >
>> >
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>>


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2011-01-28 08:27
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] funny randomi issue
Yes

> randi begins interpolation immediately, between iseed*kamp and a first
> generated random number. iseed being an optional argument with default
> value
> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>
> So my proposal was:
>
> iinterp0=0, old behaviour for randomi
> iinterp0=1, randomi behaves like randi when iseed is not set (except that
> the interpolation for randomi begins from kmin, while it begins from
> kamp*0.5 for randi)
> iinterp1=2, randomi behaves like randi when iseed is set.
>
> We could add iinterp0=3, where two random numbers would be generated as
> breakpoints for the first interpolation.
>
> This way, we don't break backup compatibility, we gain a behaviour like
> the
> one of randi, plus the new possibility of two random breakpoints from the
> beginning of the note.
>
> Please let me know your opinion about this.
>
> Regards
>
> Francois
>
>
>
> 2011/1/27 joachim heintz 
>
>> That's my opinion, too. And randi behaves in this way.
>>
>> There is another issue with randomi/randomh: they will always start from
>> the minimum value, regardless the seed. for instance:
>> 
>> 
>> seed 0
>> instr 1
>> krand randomi 1, 10, 1
>> printk .5, krand
>> endin
>> 
>> 
>> i 1 0 10
>> 
>> 
>>
>> Again, randi/randh behave correctly.
>>
>> I'm afraid the randomi/randomh opcodes are simply not written as they
>> should.
>> Perhaps a small UDO with randi/randh inside, but the min/max syntax of
>> randomi/randomh would be the best solution?
>>
>>        joachim
>>
>>
>>
>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>> > I would argue that the opcode should have, in the first place,
>> generated
>> > two random values and begun interpolation immediately. I can't really
>> > see the usefulness of the initial static segment. Adding optional
>> > arguments complicates the opcode but I can appreciate that this
>> > preserves backwards compatibility.
>> >
>> > Bye,
>> > Iain
>> >
>> >> Date: Thu, 27 Jan 2011 17:16:31 +0000
>> >> From: peimankhosravi@gmail.com
>> >> To: csound@lists.bath.ac.uk
>> >> Subject: Re: [Csnd] funny randomi issue
>> >>
>> >> thanks very much. That would be awesome.
>> >>
>> >> Best,
>> >>
>> >> Peiman
>> >>
>> >> On 27 January 2011 17:07, Art Hunkins  wrote:
>> >> > +1 for this entire enhancement.
>> >> >
>> >> > Art Hunkins
>> >> >
>> >> > ----- Original Message -----
>> >> > From: Francois PINOT
>> >> > To: csound@lists.bath.ac.uk
>> >> > Sent: Thursday, January 27, 2011 9:49 AM
>> >> > Subject: Re: [Csnd] funny randomi issue
>> >> > Something like this?
>> >> >
>> >> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>> >> >
>> >> > iinterp0 (optional, default=0) -- first interpolation cycle mode
>> > (see below)
>> >> > ifirstval (optional, default=0) -- first output value
>> >> >
>> >> > When iinterp0 = 0 (the default), the kmin argument value is
>> > outputted for
>> >> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
>> > the first
>> >> > random number is generated. Then the normal interpolation process
>> takes
>> >> > place, first between kmin and the first random number generated,
>> and
>> > then
>> >> > between successive generated random numbers, each interpolation
>> > cycle having
>> >> > a duration of 1/kcps (resp. 1/acps) seconds.
>> >> >
>> >> > When iinterp0 = 1, a random number is generated at initialization
>> and
>> >> > interpolation begins immediately between the kmin argument value
>> and
>> > that
>> >> > random number.
>> >> >
>> >> > When interp0 = 2, a random number is generated at initialization
>> and
>> >> > interpolation begins immediately between the ifirstval argument
>> > value and
>> >> > that random number.
>> >> >
>> >> >
>> >> > This  way, we could have immediate interpolation and initial value
>> > without
>> >> > modifying older versions behavior. If you agree with this, I can
>> > modify the
>> >> > source files (opcodes/uggab.h and opcodes/uggab.c), test the
>> > modifications
>> >> > and send the files to Andrés for upload
>> >> >
>> >> > Regards
>> >> >
>> >> > François
>> >> >
>> >> >
>> >> > 2011/1/27 peiman khosravi 
>> >> >>
>> >> >> Thanks!
>> >> >>
>> >> >> Yes I second Andres. I think the addition of both, an initial
>> state
>> >> >> and starting the interpolation immediately would be a big bonus.
>> >> >>
>> >> >> Best,
>> >> >>
>> >> >> Peiman
>> >> >>
>> >> >>
>> >> >>
>> >> >> On 27 January 2011 10:56, Andres Cabrera 
>> wrote:
>> >> >> > It might actually be a better solution to add an optional i-time
>> >> >> > parameter which sets the initial state, or an option to enable
>> >> >> > producing a random number from the start.
>> >> >> >
>> >> >> > Cheers,
>> >> >> > Andres
>> >> >> >
>> >> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>> fggpinot@gmail.com>
>> >> >> > wrote:
>> >> >> >> Absolutely! I can add this paragraph to the "Performance"
>> section
>> of
>> >> >> >> the
>> >> >> >> manual entry for randomi:
>> >> >> >>
>> >> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>> at
>> the
>> >> >> >> beginning of the note, before the first random number is
>> generated.
>> >> >> >> Then the
>> >> >> >> normal interpolation process takes place, first between kmin
>> and
>> the
>> >> >> >> first
>> >> >> >> random number generated, and then between successive generated
>> > random
>> >> >> >> numbers, each interpolation cycle having a duration of 1/kcps
>> (resp.
>> >> >> >> 1/acps)
>> >> >> >> seconds.
>> >> >> >>
>> >> >> >> Is it OK?
>> >> >> >>
>> >> >> >> Francois
>> >> >> >>
>> >> >> >>
>> >> >> >> 2011/1/27 peiman khosravi 
>> >> >> >>>
>> >> >> >>> Thanks for the explaination Francois.
>> >> >> >>>
>> >> >> >>> So just to clarify. The minimum value is always outputed for
>> 1/kcps
>> >> >> >>> seconds when the note is initialised? Is this because the
>> > opcode uses
>> >> >> >>> this time to generate the next random number that is
>> > subsequently used
>> >> >> >>> for the interpolation?
>> >> >> >>>
>> >> >> >>> I think this should be in the manual as a kcps value of 0.1 or
>> >> >> >>> somthing like that means a long wait (10 seconds!). I guess
>> the
>> > trick
>> >> >> >>> would be something like this:
>> >> >> >>>
>> >> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
>> >> >> >>> kmorph2 randomi 0,1, 2*kmult
>> >> >> >>>
>> >> >> >>> Best,
>> >> >> >>>
>> >> >> >>> Peiman
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> On 27 January 2011 08:18, Francois PINOT 
>> > wrote:
>> >> >> >>> > Hi Peiman,
>> >> >> >>> >
>> >> >> >>> > This is normal behavior: randomi is an interpolating opcode.
>> That
>> >> >> >>> > means
>> >> >> >>> > that
>> >> >> >>> > it will generate new random numbers at a rate of  kcps but,
>> > during
>> >> >> >>> > the
>> >> >> >>> > 1/kcps sec separating two random numbers, it will output
>> >> >> >>> > interpolated
>> >> >> >>> > values. The first values in your example are always 0
>> because
>> the
>> >> >> >>> > first
>> >> >> >>> > interpolation is done between kmin (which is 0 in your
>> > example)  and
>> >> >> >>> > the
>> >> >> >>> > first generated random value. By changing the value of kmin,
>> > you'll
>> >> >> >>> > get
>> >> >> >>> > different starting values. Moreover, if you change the kcps
>> > value,
>> >> >> >>> > the
>> >> >> >>> > number of fixed initial values will change accordingly.
>> >> >> >>> >
>> >> >> >>> > Hope this helps
>> >> >> >>> >
>> >> >> >>> > Francois
>> >> >> >>> >
>> >> >> >>> >
>> >> >> >>> > 2011/1/27 peiman khosravi 
>> >> >> >>> >>
>> >> >> >>> >> Can you try this one please Victor.
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >> -odac -d
>> >> >> >>> >> 
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >> sr     = 96000
>> >> >> >>> >> kr     = 16
>> >> >> >>> >> nchnls = 1
>> >> >> >>> >>
>> >> >> >>> >> seed 0
>> >> >> >>> >>
>> >> >> >>> >>
>> >> >> >>> >>      instr 1
>> >> >> >>> >> kmorph2 randomi 0,1, 2
>> >> >> >>> >>
>> >> >> >>> >> printk 0.1, kmorph2
>> >> >> >>> >>
>> >> >> >>> >>      endin
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >> i1 0 3600
>> >> >> >>> >> 
>> >> >> >>> >>
>> >> >> >>> >> 
>> >> >> >>> >>
>> >> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>> >> >> >>> >> 
>> >> >> >>> >> wrote:
>> >> >> >>> >> > Not stuck here. 5.13 OSX 10.5
>> >> >> >>> >> >
>> >> >> >>> >> > i1 0.00000
>> >> >> >>> >> > i1 0.11036
>> >> >> >>> >> > i1 0.22072
>> >> >> >>> >> > i1 0.33108
>> >> >> >>> >> > i1 0.44144
>> >> >> >>> >> > i1 0.55180
>> >> >> >>> >> > i1 0.66215
>> >> >> >>> >> > i1 0.77251
>> >> >> >>> >> > i1 0.88287
>> >> >> >>> >> > i1 0.80893
>> >> >> >>> >> > i1 0.73499
>> >> >> >>> >> > i1 0.66105
>> >> >> >>> >> > i1 0.58711
>> >> >> >>> >> > i1 0.51317
>> >> >> >>> >> > i1 0.43922
>> >> >> >>> >> > i1 0.36528
>> >> >> >>> >> > i1 0.29134
>> >> >> >>> >> > i1 0.37064
>> >> >> >>> >> > i1 0.44993
>> >> >> >>> >> > i1 0.52923
>> >> >> >>> >> > i1 0.60853
>> >> >> >>> >> > i1 0.68782
>> >> >> >>> >> > i1 0.76712
>> >> >> >>> >> > i1 0.84641
>> >> >> >>> >> > i1 0.92571
>> >> >> >>> >> > i1 0.82436
>> >> >> >>> >> > i1 0.72301
>> >> >> >>> >> > i1 0.62166
>> >> >> >>> >> > i1 0.52031
>> >> >> >>> >> > i1 0.41896
>> >> >> >>> >> > i1 0.31761
>> >> >> >>> >> > i1 0.21626
>> >> >> >>> >> > i1 0.11491
>> >> >> >>> >> > i1 0.10123
>> >> >> >>> >> > i1 0.08756
>> >> >> >>> >> > i1 0.07388
>> >> >> >>> >> > i1 0.06021
>> >> >> >>> >> > i1 0.04653
>> >> >> >>> >> > i1 0.03286
>> >> >> >>> >> > i1 0.01918
>> >> >> >>> >> > i1 0.00551
>> >> >> >>> >> > i1 0.06780
>> >> >> >>> >> > i1 0.13008
>> >> >> >>> >> > i1 0.19237
>> >> >> >>> >> > i1 0.25466
>> >> >> >>> >> > i1 0.31695
>> >> >> >>> >> > i1 0.37924
>> >> >> >>> >> > i1 0.44153
>> >> >> >>> >> > i1 0.50381
>> >> >> >>> >> > i1 0.51766
>> >> >> >>> >> > i1 0.53150
>> >> >> >>> >> > i1 0.54534
>> >> >> >>> >> > i1 0.55919
>> >> >> >>> >> > i1 0.57303
>> >> >> >>> >> > i1 0.58687
>> >> >> >>> >> > i1 0.60072
>> >> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>> >> >> >>> >> >
>> >> >> >>> >> >> yes 5.13. I used the universal installer.
>> >> >> >>> >> >>
>> >> >> >>> >> >>
>> >> >> >>> >> >>
>> >> >> >>> >> >> On 26 January 2011 22:05, joachim heintz
>> > 
>> >> >> >>> >> >> wrote:
>> >> >> >>> >> >>>
>> >> >> >>> >> >>> do you also use 5.13?
>> >> >> >>> >> >>>
>> >> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>> I wonder if this is only happening with this opcode or
>> > if it's
>> >> >> >>> >> >>>> a
>> >> >> >>> >> >>>> more
>> >> >> >>> >> >>>> general OS X related issue to do with krate and
>> timing.
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>> P
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>> >> >> >>> >> >>>> 
>> >> >> >>> >> >>>> wrote:
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> Thanks Menno,
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get
>> the
>> >> >> >>> >> >>>>> following.
>> >> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>  new alloc for instr 1:
>> >> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>> >> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>> >> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>> >> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>> >> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>> >> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>> >> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>> >> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>> >> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>> >> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>> >> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>> >> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>> >> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> Best,
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> Peiman
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>  
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>> -odac -d
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>> sr     = 96000
>> >> >> >>> >> >>>>> kr     = 16
>> >> >> >>> >> >>>>> nchnls = 1
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> seed 0
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>      instr 1
>> >> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> printk 0.1, kmorph2
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>      endin
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>> i1 0 3600
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> 
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>> On 26 January 2011 08:35, menno 
>> > wrote:
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>> >> >> >>> >> >>>>>> Csound5.13beta,
>> >> >> >>> >> >>>>>> doubles
>> >> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>> new alloc for instr 1:
>> >> >> >>> >> >>>>>>  i1     0.00000
>> >> >> >>> >> >>>>>>  i1     0.00052
>> >> >> >>> >> >>>>>>  i1     0.00111
>> >> >> >>> >> >>>>>>  i1     0.00170
>> >> >> >>> >> >>>>>>  i1     0.00229
>> >> >> >>> >> >>>>>>  i1     0.00288
>> >> >> >>> >> >>>>>>  i1     0.00347
>> >> >> >>> >> >>>>>>  i1     0.00406
>> >> >> >>> >> >>>>>>  i1     0.00464
>> >> >> >>> >> >>>>>>  i1     0.00523
>> >> >> >>> >> >>>>>>  i1     0.00582
>> >> >> >>> >> >>>>>>  i1     0.00641
>> >> >> >>> >> >>>>>>  i1     0.00700
>> >> >> >>> >> >>>>>>  i1     0.00759.....
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>> greetings
>> >> >> >>> >> >>>>>> menno
>> >> >> >>> >> >>>>>> --
>> >> >> >>> >> >>>>>> View this message in context:
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> >
>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>> >> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive
>> at
>> >> >> >>> >> >>>>>> Nabble.com.
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
>> >> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>> > with body
>> >> >> >>> >> >>>>>> "unsubscribe csound"
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>>
>> >> >> >>> >> >>>>>
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>>
>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> >>>> Discussions of bugs and features can be posted here
>> >> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>> body
>> >> >> >>> >> >>>> "unsubscribe
>> >> >> >>> >> >>>> csound"
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>>
>> >> >> >>> >> >>>
>> >> >> >>> >> >>>
>> >> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >> >>>
>> >> >> >>> >> >>>
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> >>> Discussions of bugs and features can be posted here
>> >> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>> body
>> >> >> >>> >> >>> "unsubscribe
>> >> >> >>> >> >>> csound"
>> >> >> >>> >> >>>
>> >> >> >>> >> >>>
>> >> >> >>> >> >>
>> >> >> >>> >> >>
>> >> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >> >>
>> >> >> >>> >> >>
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> >> Discussions of bugs and features can be posted here
>> >> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with
>> body
>> >> >> >>> >> >> "unsubscribe
>> >> >> >>> >> >> csound"
>> >> >> >>> >> >>
>> >> >> >>> >> >
>> >> >> >>> >> >
>> >> >> >>> >> >
>> >> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >> >
>> >> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> > Discussions of bugs and features can be posted here
>> >> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with
>> body
>> >> >> >>> >> > "unsubscribe
>> >> >> >>> >> > csound"
>> >> >> >>> >> >
>> >> >> >>> >> >
>> >> >> >>> >>
>> >> >> >>> >>
>> >> >> >>> >> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>> >>
>> >> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> >> Discussions of bugs and features can be posted here
>> >> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >> >>> >> "unsubscribe
>> >> >> >>> >> csound"
>> >> >> >>> >>
>> >> >> >>> >
>> >> >> >>> >
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> Send bugs reports to the Sourceforge bug tracker
>> >> >> >>>
>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> >>> Discussions of bugs and features can be posted here
>> >> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> >> >>> "unsubscribe
>> >> >> >>> csound"
>> >> >> >>>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > Send bugs reports to the Sourceforge bug tracker
>> >> >> >
>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> > Discussions of bugs and features can be posted here
>> >> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> > "unsubscribe
>> >> >> > csound"
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> Send bugs reports to the Sourceforge bug tracker
>> >> >>
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> >> Discussions of bugs and features can be posted here
>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> > "unsubscribe
>> >> >> csound"
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> > "unsubscribe csound"
>> >>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-28 09:21
FromOeyvind Brandtsegg
SubjectRe: [Csnd] funny randomi issue
+1
Oeyvind

2011/1/28  :
> Yes
>
>> randi begins interpolation immediately, between iseed*kamp and a first
>> generated random number. iseed being an optional argument with default
>> value
>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>>
>> So my proposal was:
>>
>> iinterp0=0, old behaviour for randomi
>> iinterp0=1, randomi behaves like randi when iseed is not set (except that
>> the interpolation for randomi begins from kmin, while it begins from
>> kamp*0.5 for randi)
>> iinterp1=2, randomi behaves like randi when iseed is set.
>>
>> We could add iinterp0=3, where two random numbers would be generated as
>> breakpoints for the first interpolation.
>>
>> This way, we don't break backup compatibility, we gain a behaviour like
>> the
>> one of randi, plus the new possibility of two random breakpoints from the
>> beginning of the note.
>>
>> Please let me know your opinion about this.
>>
>> Regards
>>
>> Francois
>>
>>
>>
>> 2011/1/27 joachim heintz 
>>
>>> That's my opinion, too. And randi behaves in this way.
>>>
>>> There is another issue with randomi/randomh: they will always start from
>>> the minimum value, regardless the seed. for instance:
>>> 
>>> 
>>> seed 0
>>> instr 1
>>> krand randomi 1, 10, 1
>>> printk .5, krand
>>> endin
>>> 
>>> 
>>> i 1 0 10
>>> 
>>> 
>>>
>>> Again, randi/randh behave correctly.
>>>
>>> I'm afraid the randomi/randomh opcodes are simply not written as they
>>> should.
>>> Perhaps a small UDO with randi/randh inside, but the min/max syntax of
>>> randomi/randomh would be the best solution?
>>>
>>>        joachim
>>>
>>>
>>>
>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>>> > I would argue that the opcode should have, in the first place,
>>> generated
>>> > two random values and begun interpolation immediately. I can't really
>>> > see the usefulness of the initial static segment. Adding optional
>>> > arguments complicates the opcode but I can appreciate that this
>>> > preserves backwards compatibility.
>>> >
>>> > Bye,
>>> > Iain
>>> >
>>> >> Date: Thu, 27 Jan 2011 17:16:31 +0000
>>> >> From: peimankhosravi@gmail.com
>>> >> To: csound@lists.bath.ac.uk
>>> >> Subject: Re: [Csnd] funny randomi issue
>>> >>
>>> >> thanks very much. That would be awesome.
>>> >>
>>> >> Best,
>>> >>
>>> >> Peiman
>>> >>
>>> >> On 27 January 2011 17:07, Art Hunkins  wrote:
>>> >> > +1 for this entire enhancement.
>>> >> >
>>> >> > Art Hunkins
>>> >> >
>>> >> > ----- Original Message -----
>>> >> > From: Francois PINOT
>>> >> > To: csound@lists.bath.ac.uk
>>> >> > Sent: Thursday, January 27, 2011 9:49 AM
>>> >> > Subject: Re: [Csnd] funny randomi issue
>>> >> > Something like this?
>>> >> >
>>> >> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>>> >> >
>>> >> > iinterp0 (optional, default=0) -- first interpolation cycle mode
>>> > (see below)
>>> >> > ifirstval (optional, default=0) -- first output value
>>> >> >
>>> >> > When iinterp0 = 0 (the default), the kmin argument value is
>>> > outputted for
>>> >> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
>>> > the first
>>> >> > random number is generated. Then the normal interpolation process
>>> takes
>>> >> > place, first between kmin and the first random number generated,
>>> and
>>> > then
>>> >> > between successive generated random numbers, each interpolation
>>> > cycle having
>>> >> > a duration of 1/kcps (resp. 1/acps) seconds.
>>> >> >
>>> >> > When iinterp0 = 1, a random number is generated at initialization
>>> and
>>> >> > interpolation begins immediately between the kmin argument value
>>> and
>>> > that
>>> >> > random number.
>>> >> >
>>> >> > When interp0 = 2, a random number is generated at initialization
>>> and
>>> >> > interpolation begins immediately between the ifirstval argument
>>> > value and
>>> >> > that random number.
>>> >> >
>>> >> >
>>> >> > This  way, we could have immediate interpolation and initial value
>>> > without
>>> >> > modifying older versions behavior. If you agree with this, I can
>>> > modify the
>>> >> > source files (opcodes/uggab.h and opcodes/uggab.c), test the
>>> > modifications
>>> >> > and send the files to Andrés for upload
>>> >> >
>>> >> > Regards
>>> >> >
>>> >> > François
>>> >> >
>>> >> >
>>> >> > 2011/1/27 peiman khosravi 
>>> >> >>
>>> >> >> Thanks!
>>> >> >>
>>> >> >> Yes I second Andres. I think the addition of both, an initial
>>> state
>>> >> >> and starting the interpolation immediately would be a big bonus.
>>> >> >>
>>> >> >> Best,
>>> >> >>
>>> >> >> Peiman
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On 27 January 2011 10:56, Andres Cabrera 
>>> wrote:
>>> >> >> > It might actually be a better solution to add an optional i-time
>>> >> >> > parameter which sets the initial state, or an option to enable
>>> >> >> > producing a random number from the start.
>>> >> >> >
>>> >> >> > Cheers,
>>> >> >> > Andres
>>> >> >> >
>>> >> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>>> fggpinot@gmail.com>
>>> >> >> > wrote:
>>> >> >> >> Absolutely! I can add this paragraph to the "Performance"
>>> section
>>> of
>>> >> >> >> the
>>> >> >> >> manual entry for randomi:
>>> >> >> >>
>>> >> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>>> at
>>> the
>>> >> >> >> beginning of the note, before the first random number is
>>> generated.
>>> >> >> >> Then the
>>> >> >> >> normal interpolation process takes place, first between kmin
>>> and
>>> the
>>> >> >> >> first
>>> >> >> >> random number generated, and then between successive generated
>>> > random
>>> >> >> >> numbers, each interpolation cycle having a duration of 1/kcps
>>> (resp.
>>> >> >> >> 1/acps)
>>> >> >> >> seconds.
>>> >> >> >>
>>> >> >> >> Is it OK?
>>> >> >> >>
>>> >> >> >> Francois
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> 2011/1/27 peiman khosravi 
>>> >> >> >>>
>>> >> >> >>> Thanks for the explaination Francois.
>>> >> >> >>>
>>> >> >> >>> So just to clarify. The minimum value is always outputed for
>>> 1/kcps
>>> >> >> >>> seconds when the note is initialised? Is this because the
>>> > opcode uses
>>> >> >> >>> this time to generate the next random number that is
>>> > subsequently used
>>> >> >> >>> for the interpolation?
>>> >> >> >>>
>>> >> >> >>> I think this should be in the manual as a kcps value of 0.1 or
>>> >> >> >>> somthing like that means a long wait (10 seconds!). I guess
>>> the
>>> > trick
>>> >> >> >>> would be something like this:
>>> >> >> >>>
>>> >> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
>>> >> >> >>> kmorph2 randomi 0,1, 2*kmult
>>> >> >> >>>
>>> >> >> >>> Best,
>>> >> >> >>>
>>> >> >> >>> Peiman
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>> On 27 January 2011 08:18, Francois PINOT 
>>> > wrote:
>>> >> >> >>> > Hi Peiman,
>>> >> >> >>> >
>>> >> >> >>> > This is normal behavior: randomi is an interpolating opcode.
>>> That
>>> >> >> >>> > means
>>> >> >> >>> > that
>>> >> >> >>> > it will generate new random numbers at a rate of  kcps but,
>>> > during
>>> >> >> >>> > the
>>> >> >> >>> > 1/kcps sec separating two random numbers, it will output
>>> >> >> >>> > interpolated
>>> >> >> >>> > values. The first values in your example are always 0
>>> because
>>> the
>>> >> >> >>> > first
>>> >> >> >>> > interpolation is done between kmin (which is 0 in your
>>> > example)  and
>>> >> >> >>> > the
>>> >> >> >>> > first generated random value. By changing the value of kmin,
>>> > you'll
>>> >> >> >>> > get
>>> >> >> >>> > different starting values. Moreover, if you change the kcps
>>> > value,
>>> >> >> >>> > the
>>> >> >> >>> > number of fixed initial values will change accordingly.
>>> >> >> >>> >
>>> >> >> >>> > Hope this helps
>>> >> >> >>> >
>>> >> >> >>> > Francois
>>> >> >> >>> >
>>> >> >> >>> >
>>> >> >> >>> > 2011/1/27 peiman khosravi 
>>> >> >> >>> >>
>>> >> >> >>> >> Can you try this one please Victor.
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >> -odac -d
>>> >> >> >>> >> 
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >> sr     = 96000
>>> >> >> >>> >> kr     = 16
>>> >> >> >>> >> nchnls = 1
>>> >> >> >>> >>
>>> >> >> >>> >> seed 0
>>> >> >> >>> >>
>>> >> >> >>> >>
>>> >> >> >>> >>      instr 1
>>> >> >> >>> >> kmorph2 randomi 0,1, 2
>>> >> >> >>> >>
>>> >> >> >>> >> printk 0.1, kmorph2
>>> >> >> >>> >>
>>> >> >> >>> >>      endin
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >> i1 0 3600
>>> >> >> >>> >> 
>>> >> >> >>> >>
>>> >> >> >>> >> 
>>> >> >> >>> >>
>>> >> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>>> >> >> >>> >> 
>>> >> >> >>> >> wrote:
>>> >> >> >>> >> > Not stuck here. 5.13 OSX 10.5
>>> >> >> >>> >> >
>>> >> >> >>> >> > i1 0.00000
>>> >> >> >>> >> > i1 0.11036
>>> >> >> >>> >> > i1 0.22072
>>> >> >> >>> >> > i1 0.33108
>>> >> >> >>> >> > i1 0.44144
>>> >> >> >>> >> > i1 0.55180
>>> >> >> >>> >> > i1 0.66215
>>> >> >> >>> >> > i1 0.77251
>>> >> >> >>> >> > i1 0.88287
>>> >> >> >>> >> > i1 0.80893
>>> >> >> >>> >> > i1 0.73499
>>> >> >> >>> >> > i1 0.66105
>>> >> >> >>> >> > i1 0.58711
>>> >> >> >>> >> > i1 0.51317
>>> >> >> >>> >> > i1 0.43922
>>> >> >> >>> >> > i1 0.36528
>>> >> >> >>> >> > i1 0.29134
>>> >> >> >>> >> > i1 0.37064
>>> >> >> >>> >> > i1 0.44993
>>> >> >> >>> >> > i1 0.52923
>>> >> >> >>> >> > i1 0.60853
>>> >> >> >>> >> > i1 0.68782
>>> >> >> >>> >> > i1 0.76712
>>> >> >> >>> >> > i1 0.84641
>>> >> >> >>> >> > i1 0.92571
>>> >> >> >>> >> > i1 0.82436
>>> >> >> >>> >> > i1 0.72301
>>> >> >> >>> >> > i1 0.62166
>>> >> >> >>> >> > i1 0.52031
>>> >> >> >>> >> > i1 0.41896
>>> >> >> >>> >> > i1 0.31761
>>> >> >> >>> >> > i1 0.21626
>>> >> >> >>> >> > i1 0.11491
>>> >> >> >>> >> > i1 0.10123
>>> >> >> >>> >> > i1 0.08756
>>> >> >> >>> >> > i1 0.07388
>>> >> >> >>> >> > i1 0.06021
>>> >> >> >>> >> > i1 0.04653
>>> >> >> >>> >> > i1 0.03286
>>> >> >> >>> >> > i1 0.01918
>>> >> >> >>> >> > i1 0.00551
>>> >> >> >>> >> > i1 0.06780
>>> >> >> >>> >> > i1 0.13008
>>> >> >> >>> >> > i1 0.19237
>>> >> >> >>> >> > i1 0.25466
>>> >> >> >>> >> > i1 0.31695
>>> >> >> >>> >> > i1 0.37924
>>> >> >> >>> >> > i1 0.44153
>>> >> >> >>> >> > i1 0.50381
>>> >> >> >>> >> > i1 0.51766
>>> >> >> >>> >> > i1 0.53150
>>> >> >> >>> >> > i1 0.54534
>>> >> >> >>> >> > i1 0.55919
>>> >> >> >>> >> > i1 0.57303
>>> >> >> >>> >> > i1 0.58687
>>> >> >> >>> >> > i1 0.60072
>>> >> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>> >> >> >>> >> >
>>> >> >> >>> >> >> yes 5.13. I used the universal installer.
>>> >> >> >>> >> >>
>>> >> >> >>> >> >>
>>> >> >> >>> >> >>
>>> >> >> >>> >> >> On 26 January 2011 22:05, joachim heintz
>>> > 
>>> >> >> >>> >> >> wrote:
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>> do you also use 5.13?
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>> I wonder if this is only happening with this opcode or
>>> > if it's
>>> >> >> >>> >> >>>> a
>>> >> >> >>> >> >>>> more
>>> >> >> >>> >> >>>> general OS X related issue to do with krate and
>>> timing.
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>> P
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>>> >> >> >>> >> >>>> 
>>> >> >> >>> >> >>>> wrote:
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> Thanks Menno,
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get
>>> the
>>> >> >> >>> >> >>>>> following.
>>> >> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>  new alloc for instr 1:
>>> >> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>>> >> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>>> >> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>>> >> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>>> >> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>>> >> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>>> >> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>>> >> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>>> >> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>>> >> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>>> >> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>>> >> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>>> >> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> Best,
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> Peiman
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>  
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>> -odac -d
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>> sr     = 96000
>>> >> >> >>> >> >>>>> kr     = 16
>>> >> >> >>> >> >>>>> nchnls = 1
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> seed 0
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>      instr 1
>>> >> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> printk 0.1, kmorph2
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>      endin
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>> i1 0 3600
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> 
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>> On 26 January 2011 08:35, menno 
>>> > wrote:
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>> >> >> >>> >> >>>>>> Csound5.13beta,
>>> >> >> >>> >> >>>>>> doubles
>>> >> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>> new alloc for instr 1:
>>> >> >> >>> >> >>>>>>  i1     0.00000
>>> >> >> >>> >> >>>>>>  i1     0.00052
>>> >> >> >>> >> >>>>>>  i1     0.00111
>>> >> >> >>> >> >>>>>>  i1     0.00170
>>> >> >> >>> >> >>>>>>  i1     0.00229
>>> >> >> >>> >> >>>>>>  i1     0.00288
>>> >> >> >>> >> >>>>>>  i1     0.00347
>>> >> >> >>> >> >>>>>>  i1     0.00406
>>> >> >> >>> >> >>>>>>  i1     0.00464
>>> >> >> >>> >> >>>>>>  i1     0.00523
>>> >> >> >>> >> >>>>>>  i1     0.00582
>>> >> >> >>> >> >>>>>>  i1     0.00641
>>> >> >> >>> >> >>>>>>  i1     0.00700
>>> >> >> >>> >> >>>>>>  i1     0.00759.....
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>> greetings
>>> >> >> >>> >> >>>>>> menno
>>> >> >> >>> >> >>>>>> --
>>> >> >> >>> >> >>>>>> View this message in context:
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> >
>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>> >> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive
>>> at
>>> >> >> >>> >> >>>>>> Nabble.com.
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
>>> >> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>> > with body
>>> >> >> >>> >> >>>>>> "unsubscribe csound"
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>>
>>> >> >> >>> >> >>>>>
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>>
>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> >>>> Discussions of bugs and features can be posted here
>>> >> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>> body
>>> >> >> >>> >> >>>> "unsubscribe
>>> >> >> >>> >> >>>> csound"
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>>
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>>
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> >>> Discussions of bugs and features can be posted here
>>> >> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>> body
>>> >> >> >>> >> >>> "unsubscribe
>>> >> >> >>> >> >>> csound"
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>>
>>> >> >> >>> >> >>
>>> >> >> >>> >> >>
>>> >> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >> >>
>>> >> >> >>> >> >>
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> >> Discussions of bugs and features can be posted here
>>> >> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>> body
>>> >> >> >>> >> >> "unsubscribe
>>> >> >> >>> >> >> csound"
>>> >> >> >>> >> >>
>>> >> >> >>> >> >
>>> >> >> >>> >> >
>>> >> >> >>> >> >
>>> >> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >> >
>>> >> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> > Discussions of bugs and features can be posted here
>>> >> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with
>>> body
>>> >> >> >>> >> > "unsubscribe
>>> >> >> >>> >> > csound"
>>> >> >> >>> >> >
>>> >> >> >>> >> >
>>> >> >> >>> >>
>>> >> >> >>> >>
>>> >> >> >>> >> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>> >>
>>> >> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> >> Discussions of bugs and features can be posted here
>>> >> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >> >>> >> "unsubscribe
>>> >> >> >>> >> csound"
>>> >> >> >>> >>
>>> >> >> >>> >
>>> >> >> >>> >
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>> Send bugs reports to the Sourceforge bug tracker
>>> >> >> >>>
>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> >>> Discussions of bugs and features can be posted here
>>> >> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> >> >> >>> "unsubscribe
>>> >> >> >>> csound"
>>> >> >> >>>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> > Send bugs reports to the Sourceforge bug tracker
>>> >> >> >
>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> > Discussions of bugs and features can be posted here
>>> >> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> > "unsubscribe
>>> >> >> > csound"
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> Send bugs reports to the Sourceforge bug tracker
>>> >> >>
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> >> Discussions of bugs and features can be posted here
>>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> > "unsubscribe
>>> >> >> csound"
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >> Send bugs reports to the Sourceforge bug tracker
>>> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> >> Discussions of bugs and features can be posted here
>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> > "unsubscribe csound"
>>> >>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-28 11:51
Frompeiman khosravi
SubjectRe: [Csnd] funny randomi issue
Great.

P

On 28 January 2011 09:21, Oeyvind Brandtsegg  wrote:
> +1
> Oeyvind
>
> 2011/1/28  :
>> Yes
>>
>>> randi begins interpolation immediately, between iseed*kamp and a first
>>> generated random number. iseed being an optional argument with default
>>> value
>>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>>>
>>> So my proposal was:
>>>
>>> iinterp0=0, old behaviour for randomi
>>> iinterp0=1, randomi behaves like randi when iseed is not set (except that
>>> the interpolation for randomi begins from kmin, while it begins from
>>> kamp*0.5 for randi)
>>> iinterp1=2, randomi behaves like randi when iseed is set.
>>>
>>> We could add iinterp0=3, where two random numbers would be generated as
>>> breakpoints for the first interpolation.
>>>
>>> This way, we don't break backup compatibility, we gain a behaviour like
>>> the
>>> one of randi, plus the new possibility of two random breakpoints from the
>>> beginning of the note.
>>>
>>> Please let me know your opinion about this.
>>>
>>> Regards
>>>
>>> Francois
>>>
>>>
>>>
>>> 2011/1/27 joachim heintz 
>>>
>>>> That's my opinion, too. And randi behaves in this way.
>>>>
>>>> There is another issue with randomi/randomh: they will always start from
>>>> the minimum value, regardless the seed. for instance:
>>>> 
>>>> 
>>>> seed 0
>>>> instr 1
>>>> krand randomi 1, 10, 1
>>>> printk .5, krand
>>>> endin
>>>> 
>>>> 
>>>> i 1 0 10
>>>> 
>>>> 
>>>>
>>>> Again, randi/randh behave correctly.
>>>>
>>>> I'm afraid the randomi/randomh opcodes are simply not written as they
>>>> should.
>>>> Perhaps a small UDO with randi/randh inside, but the min/max syntax of
>>>> randomi/randomh would be the best solution?
>>>>
>>>>        joachim
>>>>
>>>>
>>>>
>>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>>>> > I would argue that the opcode should have, in the first place,
>>>> generated
>>>> > two random values and begun interpolation immediately. I can't really
>>>> > see the usefulness of the initial static segment. Adding optional
>>>> > arguments complicates the opcode but I can appreciate that this
>>>> > preserves backwards compatibility.
>>>> >
>>>> > Bye,
>>>> > Iain
>>>> >
>>>> >> Date: Thu, 27 Jan 2011 17:16:31 +0000
>>>> >> From: peimankhosravi@gmail.com
>>>> >> To: csound@lists.bath.ac.uk
>>>> >> Subject: Re: [Csnd] funny randomi issue
>>>> >>
>>>> >> thanks very much. That would be awesome.
>>>> >>
>>>> >> Best,
>>>> >>
>>>> >> Peiman
>>>> >>
>>>> >> On 27 January 2011 17:07, Art Hunkins  wrote:
>>>> >> > +1 for this entire enhancement.
>>>> >> >
>>>> >> > Art Hunkins
>>>> >> >
>>>> >> > ----- Original Message -----
>>>> >> > From: Francois PINOT
>>>> >> > To: csound@lists.bath.ac.uk
>>>> >> > Sent: Thursday, January 27, 2011 9:49 AM
>>>> >> > Subject: Re: [Csnd] funny randomi issue
>>>> >> > Something like this?
>>>> >> >
>>>> >> > kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>>>> >> >
>>>> >> > iinterp0 (optional, default=0) -- first interpolation cycle mode
>>>> > (see below)
>>>> >> > ifirstval (optional, default=0) -- first output value
>>>> >> >
>>>> >> > When iinterp0 = 0 (the default), the kmin argument value is
>>>> > outputted for
>>>> >> > 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
>>>> > the first
>>>> >> > random number is generated. Then the normal interpolation process
>>>> takes
>>>> >> > place, first between kmin and the first random number generated,
>>>> and
>>>> > then
>>>> >> > between successive generated random numbers, each interpolation
>>>> > cycle having
>>>> >> > a duration of 1/kcps (resp. 1/acps) seconds.
>>>> >> >
>>>> >> > When iinterp0 = 1, a random number is generated at initialization
>>>> and
>>>> >> > interpolation begins immediately between the kmin argument value
>>>> and
>>>> > that
>>>> >> > random number.
>>>> >> >
>>>> >> > When interp0 = 2, a random number is generated at initialization
>>>> and
>>>> >> > interpolation begins immediately between the ifirstval argument
>>>> > value and
>>>> >> > that random number.
>>>> >> >
>>>> >> >
>>>> >> > This  way, we could have immediate interpolation and initial value
>>>> > without
>>>> >> > modifying older versions behavior. If you agree with this, I can
>>>> > modify the
>>>> >> > source files (opcodes/uggab.h and opcodes/uggab.c), test the
>>>> > modifications
>>>> >> > and send the files to Andrés for upload
>>>> >> >
>>>> >> > Regards
>>>> >> >
>>>> >> > François
>>>> >> >
>>>> >> >
>>>> >> > 2011/1/27 peiman khosravi 
>>>> >> >>
>>>> >> >> Thanks!
>>>> >> >>
>>>> >> >> Yes I second Andres. I think the addition of both, an initial
>>>> state
>>>> >> >> and starting the interpolation immediately would be a big bonus.
>>>> >> >>
>>>> >> >> Best,
>>>> >> >>
>>>> >> >> Peiman
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> On 27 January 2011 10:56, Andres Cabrera 
>>>> wrote:
>>>> >> >> > It might actually be a better solution to add an optional i-time
>>>> >> >> > parameter which sets the initial state, or an option to enable
>>>> >> >> > producing a random number from the start.
>>>> >> >> >
>>>> >> >> > Cheers,
>>>> >> >> > Andres
>>>> >> >> >
>>>> >> >> > On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>>>> fggpinot@gmail.com>
>>>> >> >> > wrote:
>>>> >> >> >> Absolutely! I can add this paragraph to the "Performance"
>>>> section
>>>> of
>>>> >> >> >> the
>>>> >> >> >> manual entry for randomi:
>>>> >> >> >>
>>>> >> >> >> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>>>> at
>>>> the
>>>> >> >> >> beginning of the note, before the first random number is
>>>> generated.
>>>> >> >> >> Then the
>>>> >> >> >> normal interpolation process takes place, first between kmin
>>>> and
>>>> the
>>>> >> >> >> first
>>>> >> >> >> random number generated, and then between successive generated
>>>> > random
>>>> >> >> >> numbers, each interpolation cycle having a duration of 1/kcps
>>>> (resp.
>>>> >> >> >> 1/acps)
>>>> >> >> >> seconds.
>>>> >> >> >>
>>>> >> >> >> Is it OK?
>>>> >> >> >>
>>>> >> >> >> Francois
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> 2011/1/27 peiman khosravi 
>>>> >> >> >>>
>>>> >> >> >>> Thanks for the explaination Francois.
>>>> >> >> >>>
>>>> >> >> >>> So just to clarify. The minimum value is always outputed for
>>>> 1/kcps
>>>> >> >> >>> seconds when the note is initialised? Is this because the
>>>> > opcode uses
>>>> >> >> >>> this time to generate the next random number that is
>>>> > subsequently used
>>>> >> >> >>> for the interpolation?
>>>> >> >> >>>
>>>> >> >> >>> I think this should be in the manual as a kcps value of 0.1 or
>>>> >> >> >>> somthing like that means a long wait (10 seconds!). I guess
>>>> the
>>>> > trick
>>>> >> >> >>> would be something like this:
>>>> >> >> >>>
>>>> >> >> >>> kmult linseg 1000, 0.001, 1, p3, 1
>>>> >> >> >>> kmorph2 randomi 0,1, 2*kmult
>>>> >> >> >>>
>>>> >> >> >>> Best,
>>>> >> >> >>>
>>>> >> >> >>> Peiman
>>>> >> >> >>>
>>>> >> >> >>>
>>>> >> >> >>> On 27 January 2011 08:18, Francois PINOT 
>>>> > wrote:
>>>> >> >> >>> > Hi Peiman,
>>>> >> >> >>> >
>>>> >> >> >>> > This is normal behavior: randomi is an interpolating opcode.
>>>> That
>>>> >> >> >>> > means
>>>> >> >> >>> > that
>>>> >> >> >>> > it will generate new random numbers at a rate of  kcps but,
>>>> > during
>>>> >> >> >>> > the
>>>> >> >> >>> > 1/kcps sec separating two random numbers, it will output
>>>> >> >> >>> > interpolated
>>>> >> >> >>> > values. The first values in your example are always 0
>>>> because
>>>> the
>>>> >> >> >>> > first
>>>> >> >> >>> > interpolation is done between kmin (which is 0 in your
>>>> > example)  and
>>>> >> >> >>> > the
>>>> >> >> >>> > first generated random value. By changing the value of kmin,
>>>> > you'll
>>>> >> >> >>> > get
>>>> >> >> >>> > different starting values. Moreover, if you change the kcps
>>>> > value,
>>>> >> >> >>> > the
>>>> >> >> >>> > number of fixed initial values will change accordingly.
>>>> >> >> >>> >
>>>> >> >> >>> > Hope this helps
>>>> >> >> >>> >
>>>> >> >> >>> > Francois
>>>> >> >> >>> >
>>>> >> >> >>> >
>>>> >> >> >>> > 2011/1/27 peiman khosravi 
>>>> >> >> >>> >>
>>>> >> >> >>> >> Can you try this one please Victor.
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >> -odac -d
>>>> >> >> >>> >> 
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >> sr     = 96000
>>>> >> >> >>> >> kr     = 16
>>>> >> >> >>> >> nchnls = 1
>>>> >> >> >>> >>
>>>> >> >> >>> >> seed 0
>>>> >> >> >>> >>
>>>> >> >> >>> >>
>>>> >> >> >>> >>      instr 1
>>>> >> >> >>> >> kmorph2 randomi 0,1, 2
>>>> >> >> >>> >>
>>>> >> >> >>> >> printk 0.1, kmorph2
>>>> >> >> >>> >>
>>>> >> >> >>> >>      endin
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >> i1 0 3600
>>>> >> >> >>> >> 
>>>> >> >> >>> >>
>>>> >> >> >>> >> 
>>>> >> >> >>> >>
>>>> >> >> >>> >> On 26 January 2011 22:15, Victor Lazzarini
>>>> >> >> >>> >> 
>>>> >> >> >>> >> wrote:
>>>> >> >> >>> >> > Not stuck here. 5.13 OSX 10.5
>>>> >> >> >>> >> >
>>>> >> >> >>> >> > i1 0.00000
>>>> >> >> >>> >> > i1 0.11036
>>>> >> >> >>> >> > i1 0.22072
>>>> >> >> >>> >> > i1 0.33108
>>>> >> >> >>> >> > i1 0.44144
>>>> >> >> >>> >> > i1 0.55180
>>>> >> >> >>> >> > i1 0.66215
>>>> >> >> >>> >> > i1 0.77251
>>>> >> >> >>> >> > i1 0.88287
>>>> >> >> >>> >> > i1 0.80893
>>>> >> >> >>> >> > i1 0.73499
>>>> >> >> >>> >> > i1 0.66105
>>>> >> >> >>> >> > i1 0.58711
>>>> >> >> >>> >> > i1 0.51317
>>>> >> >> >>> >> > i1 0.43922
>>>> >> >> >>> >> > i1 0.36528
>>>> >> >> >>> >> > i1 0.29134
>>>> >> >> >>> >> > i1 0.37064
>>>> >> >> >>> >> > i1 0.44993
>>>> >> >> >>> >> > i1 0.52923
>>>> >> >> >>> >> > i1 0.60853
>>>> >> >> >>> >> > i1 0.68782
>>>> >> >> >>> >> > i1 0.76712
>>>> >> >> >>> >> > i1 0.84641
>>>> >> >> >>> >> > i1 0.92571
>>>> >> >> >>> >> > i1 0.82436
>>>> >> >> >>> >> > i1 0.72301
>>>> >> >> >>> >> > i1 0.62166
>>>> >> >> >>> >> > i1 0.52031
>>>> >> >> >>> >> > i1 0.41896
>>>> >> >> >>> >> > i1 0.31761
>>>> >> >> >>> >> > i1 0.21626
>>>> >> >> >>> >> > i1 0.11491
>>>> >> >> >>> >> > i1 0.10123
>>>> >> >> >>> >> > i1 0.08756
>>>> >> >> >>> >> > i1 0.07388
>>>> >> >> >>> >> > i1 0.06021
>>>> >> >> >>> >> > i1 0.04653
>>>> >> >> >>> >> > i1 0.03286
>>>> >> >> >>> >> > i1 0.01918
>>>> >> >> >>> >> > i1 0.00551
>>>> >> >> >>> >> > i1 0.06780
>>>> >> >> >>> >> > i1 0.13008
>>>> >> >> >>> >> > i1 0.19237
>>>> >> >> >>> >> > i1 0.25466
>>>> >> >> >>> >> > i1 0.31695
>>>> >> >> >>> >> > i1 0.37924
>>>> >> >> >>> >> > i1 0.44153
>>>> >> >> >>> >> > i1 0.50381
>>>> >> >> >>> >> > i1 0.51766
>>>> >> >> >>> >> > i1 0.53150
>>>> >> >> >>> >> > i1 0.54534
>>>> >> >> >>> >> > i1 0.55919
>>>> >> >> >>> >> > i1 0.57303
>>>> >> >> >>> >> > i1 0.58687
>>>> >> >> >>> >> > i1 0.60072
>>>> >> >> >>> >> > On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>>> >> >> >>> >> >
>>>> >> >> >>> >> >> yes 5.13. I used the universal installer.
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >> On 26 January 2011 22:05, joachim heintz
>>>> > 
>>>> >> >> >>> >> >> wrote:
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>> do you also use 5.13?
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>> I wonder if this is only happening with this opcode or
>>>> > if it's
>>>> >> >> >>> >> >>>> a
>>>> >> >> >>> >> >>>> more
>>>> >> >> >>> >> >>>> general OS X related issue to do with krate and
>>>> timing.
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>> P
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>> On 26 January 2011 09:21, peiman khosravi
>>>> >> >> >>> >> >>>> 
>>>> >> >> >>> >> >>>> wrote:
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> Thanks Menno,
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> I am on OS X 10.6. Using this other csd bellow I get
>>>> the
>>>> >> >> >>> >> >>>>> following.
>>>> >> >> >>> >> >>>>> The value remains on zero for .5 seconds every time.
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>  new alloc for instr 1:
>>>> >> >> >>> >> >>>>>  i   1 time     0.06250:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.12500:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.25000:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.31250:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.43750:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.50000:     0.00000
>>>> >> >> >>> >> >>>>>  i   1 time     0.62500:     0.08407
>>>> >> >> >>> >> >>>>>  i   1 time     0.75000:     0.25222
>>>> >> >> >>> >> >>>>>  i   1 time     0.81250:     0.33630
>>>> >> >> >>> >> >>>>>  i   1 time     0.93750:     0.50445
>>>> >> >> >>> >> >>>>>  i   1 time     1.00000:     0.58852
>>>> >> >> >>> >> >>>>>  i   1 time     1.12500:     0.69159
>>>> >> >> >>> >> >>>>>  i   1 time     1.25000:     0.72958
>>>> >> >> >>> >> >>>>>  i   1 time     1.31250:     0.74858
>>>> >> >> >>> >> >>>>>  i   1 time     1.43750:     0.78657
>>>> >> >> >>> >> >>>>>  i   1 time     1.50000:     0.80556
>>>> >> >> >>> >> >>>>>  i   1 time     1.62500:     0.78747
>>>> >> >> >>> >> >>>>>  i   1 time     1.75000:     0.71329
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> Best,
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> Peiman
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>  
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>> -odac -d
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>> sr     = 96000
>>>> >> >> >>> >> >>>>> kr     = 16
>>>> >> >> >>> >> >>>>> nchnls = 1
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> seed 0
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>      instr 1
>>>> >> >> >>> >> >>>>> kmorph2 randomi 0,1, 2
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> printk 0.1, kmorph2
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>      endin
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>> i1 0 3600
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> 
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>> On 26 January 2011 08:35, menno 
>>>> > wrote:
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>>> >> >> >>> >> >>>>>> Csound5.13beta,
>>>> >> >> >>> >> >>>>>> doubles
>>>> >> >> >>> >> >>>>>> ,Ubuntu, 48kHz, Jack:
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>> new alloc for instr 1:
>>>> >> >> >>> >> >>>>>>  i1     0.00000
>>>> >> >> >>> >> >>>>>>  i1     0.00052
>>>> >> >> >>> >> >>>>>>  i1     0.00111
>>>> >> >> >>> >> >>>>>>  i1     0.00170
>>>> >> >> >>> >> >>>>>>  i1     0.00229
>>>> >> >> >>> >> >>>>>>  i1     0.00288
>>>> >> >> >>> >> >>>>>>  i1     0.00347
>>>> >> >> >>> >> >>>>>>  i1     0.00406
>>>> >> >> >>> >> >>>>>>  i1     0.00464
>>>> >> >> >>> >> >>>>>>  i1     0.00523
>>>> >> >> >>> >> >>>>>>  i1     0.00582
>>>> >> >> >>> >> >>>>>>  i1     0.00641
>>>> >> >> >>> >> >>>>>>  i1     0.00700
>>>> >> >> >>> >> >>>>>>  i1     0.00759.....
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>> greetings
>>>> >> >> >>> >> >>>>>> menno
>>>> >> >> >>> >> >>>>>> --
>>>> >> >> >>> >> >>>>>> View this message in context:
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> >
>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>>> >> >> >>> >> >>>>>> Sent from the Csound - General mailing list archive
>>>> at
>>>> >> >> >>> >> >>>>>> Nabble.com.
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> >>>>>> Discussions of bugs and features can be posted here
>>>> >> >> >>> >> >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>>> > with body
>>>> >> >> >>> >> >>>>>> "unsubscribe csound"
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>>
>>>> >> >> >>> >> >>>>>
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>>
>>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> >>>> Discussions of bugs and features can be posted here
>>>> >> >> >>> >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>> >> >> >>> >> >>>> "unsubscribe
>>>> >> >> >>> >> >>>> csound"
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>>
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> >>> Discussions of bugs and features can be posted here
>>>> >> >> >>> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>> >> >> >>> >> >>> "unsubscribe
>>>> >> >> >>> >> >>> csound"
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>>
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> >> Discussions of bugs and features can be posted here
>>>> >> >> >>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>> >> >> >>> >> >> "unsubscribe
>>>> >> >> >>> >> >> csound"
>>>> >> >> >>> >> >>
>>>> >> >> >>> >> >
>>>> >> >> >>> >> >
>>>> >> >> >>> >> >
>>>> >> >> >>> >> > Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >> >
>>>> >> >> >>> >> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> > Discussions of bugs and features can be posted here
>>>> >> >> >>> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>> >> >> >>> >> > "unsubscribe
>>>> >> >> >>> >> > csound"
>>>> >> >> >>> >> >
>>>> >> >> >>> >> >
>>>> >> >> >>> >>
>>>> >> >> >>> >>
>>>> >> >> >>> >> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>> >>
>>>> >> >> >>> >>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> >> Discussions of bugs and features can be posted here
>>>> >> >> >>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> >> >> >>> >> "unsubscribe
>>>> >> >> >>> >> csound"
>>>> >> >> >>> >>
>>>> >> >> >>> >
>>>> >> >> >>> >
>>>> >> >> >>>
>>>> >> >> >>>
>>>> >> >> >>> Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >>>
>>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> >>> Discussions of bugs and features can be posted here
>>>> >> >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> >> >> >>> "unsubscribe
>>>> >> >> >>> csound"
>>>> >> >> >>>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >
>>>> >> >> >
>>>> >> >> > Send bugs reports to the Sourceforge bug tracker
>>>> >> >> >
>>>> >  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> > Discussions of bugs and features can be posted here
>>>> >> >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> > "unsubscribe
>>>> >> >> > csound"
>>>> >> >> >
>>>> >> >> >
>>>> >> >>
>>>> >> >>
>>>> >> >> Send bugs reports to the Sourceforge bug tracker
>>>> >> >>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> >> Discussions of bugs and features can be posted here
>>>> >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> > "unsubscribe
>>>> >> >> csound"
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >> Send bugs reports to the Sourceforge bug tracker
>>>> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> >> Discussions of bugs and features can be posted here
>>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> > "unsubscribe csound"
>>>> >>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-30 11:14
Fromjoachim heintz
SubjectRe: [Csnd] funny randomi issue
me too. i think your option 3 would definitely be very useful.

would you mind to add a similar optional parameter to randomh, too? as
it is now, randomh always starts from the lower border. my suggestion:
kres randomh kmin, kmax, kcps [,kstart]
kstart = 0 (default) starts at kmin
kstart = 1 starts at a random generated number in the range [kmin, kmax]

	joachim



Am 28.01.2011 10:21, schrieb Oeyvind Brandtsegg:
> +1
> Oeyvind
> 
> 2011/1/28  :
>> Yes
>>
>>> randi begins interpolation immediately, between iseed*kamp and a first
>>> generated random number. iseed being an optional argument with default
>>> value
>>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>>>
>>> So my proposal was:
>>>
>>> iinterp0=0, old behaviour for randomi
>>> iinterp0=1, randomi behaves like randi when iseed is not set (except that
>>> the interpolation for randomi begins from kmin, while it begins from
>>> kamp*0.5 for randi)
>>> iinterp1=2, randomi behaves like randi when iseed is set.
>>>
>>> We could add iinterp0=3, where two random numbers would be generated as
>>> breakpoints for the first interpolation.
>>>
>>> This way, we don't break backup compatibility, we gain a behaviour like
>>> the
>>> one of randi, plus the new possibility of two random breakpoints from the
>>> beginning of the note.
>>>
>>> Please let me know your opinion about this.
>>>
>>> Regards
>>>
>>> Francois
>>>
>>>
>>>
>>> 2011/1/27 joachim heintz 
>>>
>>>> That's my opinion, too. And randi behaves in this way.
>>>>
>>>> There is another issue with randomi/randomh: they will always start from
>>>> the minimum value, regardless the seed. for instance:
>>>> 
>>>> 
>>>> seed 0
>>>> instr 1
>>>> krand randomi 1, 10, 1
>>>> printk .5, krand
>>>> endin
>>>> 
>>>> 
>>>> i 1 0 10
>>>> 
>>>> 
>>>>
>>>> Again, randi/randh behave correctly.
>>>>
>>>> I'm afraid the randomi/randomh opcodes are simply not written as they
>>>> should.
>>>> Perhaps a small UDO with randi/randh inside, but the min/max syntax of
>>>> randomi/randomh would be the best solution?
>>>>
>>>>        joachim
>>>>
>>>>
>>>>
>>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>>>>> I would argue that the opcode should have, in the first place,
>>>> generated
>>>>> two random values and begun interpolation immediately. I can't really
>>>>> see the usefulness of the initial static segment. Adding optional
>>>>> arguments complicates the opcode but I can appreciate that this
>>>>> preserves backwards compatibility.
>>>>>
>>>>> Bye,
>>>>> Iain
>>>>>
>>>>>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>>>>>> From: peimankhosravi@gmail.com
>>>>>> To: csound@lists.bath.ac.uk
>>>>>> Subject: Re: [Csnd] funny randomi issue
>>>>>>
>>>>>> thanks very much. That would be awesome.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 27 January 2011 17:07, Art Hunkins  wrote:
>>>>>>> +1 for this entire enhancement.
>>>>>>>
>>>>>>> Art Hunkins
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: Francois PINOT
>>>>>>> To: csound@lists.bath.ac.uk
>>>>>>> Sent: Thursday, January 27, 2011 9:49 AM
>>>>>>> Subject: Re: [Csnd] funny randomi issue
>>>>>>> Something like this?
>>>>>>>
>>>>>>> kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>>>>>>>
>>>>>>> iinterp0 (optional, default=0) -- first interpolation cycle mode
>>>>> (see below)
>>>>>>> ifirstval (optional, default=0) -- first output value
>>>>>>>
>>>>>>> When iinterp0 = 0 (the default), the kmin argument value is
>>>>> outputted for
>>>>>>> 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
>>>>> the first
>>>>>>> random number is generated. Then the normal interpolation process
>>>> takes
>>>>>>> place, first between kmin and the first random number generated,
>>>> and
>>>>> then
>>>>>>> between successive generated random numbers, each interpolation
>>>>> cycle having
>>>>>>> a duration of 1/kcps (resp. 1/acps) seconds.
>>>>>>>
>>>>>>> When iinterp0 = 1, a random number is generated at initialization
>>>> and
>>>>>>> interpolation begins immediately between the kmin argument value
>>>> and
>>>>> that
>>>>>>> random number.
>>>>>>>
>>>>>>> When interp0 = 2, a random number is generated at initialization
>>>> and
>>>>>>> interpolation begins immediately between the ifirstval argument
>>>>> value and
>>>>>>> that random number.
>>>>>>>
>>>>>>>
>>>>>>> This  way, we could have immediate interpolation and initial value
>>>>> without
>>>>>>> modifying older versions behavior. If you agree with this, I can
>>>>> modify the
>>>>>>> source files (opcodes/uggab.h and opcodes/uggab.c), test the
>>>>> modifications
>>>>>>> and send the files to Andrés for upload
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> François
>>>>>>>
>>>>>>>
>>>>>>> 2011/1/27 peiman khosravi 
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> Yes I second Andres. I think the addition of both, an initial
>>>> state
>>>>>>>> and starting the interpolation immediately would be a big bonus.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 27 January 2011 10:56, Andres Cabrera 
>>>> wrote:
>>>>>>>>> It might actually be a better solution to add an optional i-time
>>>>>>>>> parameter which sets the initial state, or an option to enable
>>>>>>>>> producing a random number from the start.
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Andres
>>>>>>>>>
>>>>>>>>> On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>>>> fggpinot@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>> Absolutely! I can add this paragraph to the "Performance"
>>>> section
>>>> of
>>>>>>>>>> the
>>>>>>>>>> manual entry for randomi:
>>>>>>>>>>
>>>>>>>>>> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>>>> at
>>>> the
>>>>>>>>>> beginning of the note, before the first random number is
>>>> generated.
>>>>>>>>>> Then the
>>>>>>>>>> normal interpolation process takes place, first between kmin
>>>> and
>>>> the
>>>>>>>>>> first
>>>>>>>>>> random number generated, and then between successive generated
>>>>> random
>>>>>>>>>> numbers, each interpolation cycle having a duration of 1/kcps
>>>> (resp.
>>>>>>>>>> 1/acps)
>>>>>>>>>> seconds.
>>>>>>>>>>
>>>>>>>>>> Is it OK?
>>>>>>>>>>
>>>>>>>>>> Francois
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2011/1/27 peiman khosravi 
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the explaination Francois.
>>>>>>>>>>>
>>>>>>>>>>> So just to clarify. The minimum value is always outputed for
>>>> 1/kcps
>>>>>>>>>>> seconds when the note is initialised? Is this because the
>>>>> opcode uses
>>>>>>>>>>> this time to generate the next random number that is
>>>>> subsequently used
>>>>>>>>>>> for the interpolation?
>>>>>>>>>>>
>>>>>>>>>>> I think this should be in the manual as a kcps value of 0.1 or
>>>>>>>>>>> somthing like that means a long wait (10 seconds!). I guess
>>>> the
>>>>> trick
>>>>>>>>>>> would be something like this:
>>>>>>>>>>>
>>>>>>>>>>> kmult linseg 1000, 0.001, 1, p3, 1
>>>>>>>>>>> kmorph2 randomi 0,1, 2*kmult
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>>
>>>>>>>>>>> Peiman
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 27 January 2011 08:18, Francois PINOT 
>>>>> wrote:
>>>>>>>>>>>> Hi Peiman,
>>>>>>>>>>>>
>>>>>>>>>>>> This is normal behavior: randomi is an interpolating opcode.
>>>> That
>>>>>>>>>>>> means
>>>>>>>>>>>> that
>>>>>>>>>>>> it will generate new random numbers at a rate of  kcps but,
>>>>> during
>>>>>>>>>>>> the
>>>>>>>>>>>> 1/kcps sec separating two random numbers, it will output
>>>>>>>>>>>> interpolated
>>>>>>>>>>>> values. The first values in your example are always 0
>>>> because
>>>> the
>>>>>>>>>>>> first
>>>>>>>>>>>> interpolation is done between kmin (which is 0 in your
>>>>> example)  and
>>>>>>>>>>>> the
>>>>>>>>>>>> first generated random value. By changing the value of kmin,
>>>>> you'll
>>>>>>>>>>>> get
>>>>>>>>>>>> different starting values. Moreover, if you change the kcps
>>>>> value,
>>>>>>>>>>>> the
>>>>>>>>>>>> number of fixed initial values will change accordingly.
>>>>>>>>>>>>
>>>>>>>>>>>> Hope this helps
>>>>>>>>>>>>
>>>>>>>>>>>> Francois
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2011/1/27 peiman khosravi 
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you try this one please Victor.
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>> -odac -d
>>>>>>>>>>>>> 
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>> sr     = 96000
>>>>>>>>>>>>> kr     = 16
>>>>>>>>>>>>> nchnls = 1
>>>>>>>>>>>>>
>>>>>>>>>>>>> seed 0
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>      instr 1
>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>>>>>>>>>>>>
>>>>>>>>>>>>> printk 0.1, kmorph2
>>>>>>>>>>>>>
>>>>>>>>>>>>>      endin
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>> i1 0 3600
>>>>>>>>>>>>> 
>>>>>>>>>>>>>
>>>>>>>>>>>>> 
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 26 January 2011 22:15, Victor Lazzarini
>>>>>>>>>>>>> 
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>> Not stuck here. 5.13 OSX 10.5
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> i1 0.00000
>>>>>>>>>>>>>> i1 0.11036
>>>>>>>>>>>>>> i1 0.22072
>>>>>>>>>>>>>> i1 0.33108
>>>>>>>>>>>>>> i1 0.44144
>>>>>>>>>>>>>> i1 0.55180
>>>>>>>>>>>>>> i1 0.66215
>>>>>>>>>>>>>> i1 0.77251
>>>>>>>>>>>>>> i1 0.88287
>>>>>>>>>>>>>> i1 0.80893
>>>>>>>>>>>>>> i1 0.73499
>>>>>>>>>>>>>> i1 0.66105
>>>>>>>>>>>>>> i1 0.58711
>>>>>>>>>>>>>> i1 0.51317
>>>>>>>>>>>>>> i1 0.43922
>>>>>>>>>>>>>> i1 0.36528
>>>>>>>>>>>>>> i1 0.29134
>>>>>>>>>>>>>> i1 0.37064
>>>>>>>>>>>>>> i1 0.44993
>>>>>>>>>>>>>> i1 0.52923
>>>>>>>>>>>>>> i1 0.60853
>>>>>>>>>>>>>> i1 0.68782
>>>>>>>>>>>>>> i1 0.76712
>>>>>>>>>>>>>> i1 0.84641
>>>>>>>>>>>>>> i1 0.92571
>>>>>>>>>>>>>> i1 0.82436
>>>>>>>>>>>>>> i1 0.72301
>>>>>>>>>>>>>> i1 0.62166
>>>>>>>>>>>>>> i1 0.52031
>>>>>>>>>>>>>> i1 0.41896
>>>>>>>>>>>>>> i1 0.31761
>>>>>>>>>>>>>> i1 0.21626
>>>>>>>>>>>>>> i1 0.11491
>>>>>>>>>>>>>> i1 0.10123
>>>>>>>>>>>>>> i1 0.08756
>>>>>>>>>>>>>> i1 0.07388
>>>>>>>>>>>>>> i1 0.06021
>>>>>>>>>>>>>> i1 0.04653
>>>>>>>>>>>>>> i1 0.03286
>>>>>>>>>>>>>> i1 0.01918
>>>>>>>>>>>>>> i1 0.00551
>>>>>>>>>>>>>> i1 0.06780
>>>>>>>>>>>>>> i1 0.13008
>>>>>>>>>>>>>> i1 0.19237
>>>>>>>>>>>>>> i1 0.25466
>>>>>>>>>>>>>> i1 0.31695
>>>>>>>>>>>>>> i1 0.37924
>>>>>>>>>>>>>> i1 0.44153
>>>>>>>>>>>>>> i1 0.50381
>>>>>>>>>>>>>> i1 0.51766
>>>>>>>>>>>>>> i1 0.53150
>>>>>>>>>>>>>> i1 0.54534
>>>>>>>>>>>>>> i1 0.55919
>>>>>>>>>>>>>> i1 0.57303
>>>>>>>>>>>>>> i1 0.58687
>>>>>>>>>>>>>> i1 0.60072
>>>>>>>>>>>>>> On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> yes 5.13. I used the universal installer.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 26 January 2011 22:05, joachim heintz
>>>>> 
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> do you also use 5.13?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I wonder if this is only happening with this opcode or
>>>>> if it's
>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>> more
>>>>>>>>>>>>>>>>> general OS X related issue to do with krate and
>>>> timing.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> P
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On 26 January 2011 09:21, peiman khosravi
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks Menno,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I am on OS X 10.6. Using this other csd bellow I get
>>>> the
>>>>>>>>>>>>>>>>>> following.
>>>>>>>>>>>>>>>>>> The value remains on zero for .5 seconds every time.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>  new alloc for instr 1:
>>>>>>>>>>>>>>>>>>  i   1 time     0.06250:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.12500:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.25000:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.31250:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.43750:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.50000:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.62500:     0.08407
>>>>>>>>>>>>>>>>>>  i   1 time     0.75000:     0.25222
>>>>>>>>>>>>>>>>>>  i   1 time     0.81250:     0.33630
>>>>>>>>>>>>>>>>>>  i   1 time     0.93750:     0.50445
>>>>>>>>>>>>>>>>>>  i   1 time     1.00000:     0.58852
>>>>>>>>>>>>>>>>>>  i   1 time     1.12500:     0.69159
>>>>>>>>>>>>>>>>>>  i   1 time     1.25000:     0.72958
>>>>>>>>>>>>>>>>>>  i   1 time     1.31250:     0.74858
>>>>>>>>>>>>>>>>>>  i   1 time     1.43750:     0.78657
>>>>>>>>>>>>>>>>>>  i   1 time     1.50000:     0.80556
>>>>>>>>>>>>>>>>>>  i   1 time     1.62500:     0.78747
>>>>>>>>>>>>>>>>>>  i   1 time     1.75000:     0.71329
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> -odac -d
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> sr     = 96000
>>>>>>>>>>>>>>>>>> kr     = 16
>>>>>>>>>>>>>>>>>> nchnls = 1
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> seed 0
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>      instr 1
>>>>>>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> printk 0.1, kmorph2
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>      endin
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> i1 0 3600
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On 26 January 2011 08:35, menno 
>>>>> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>>>>>>>>>>>>>>>>>> Csound5.13beta,
>>>>>>>>>>>>>>>>>>> doubles
>>>>>>>>>>>>>>>>>>> ,Ubuntu, 48kHz, Jack:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> new alloc for instr 1:
>>>>>>>>>>>>>>>>>>>  i1     0.00000
>>>>>>>>>>>>>>>>>>>  i1     0.00052
>>>>>>>>>>>>>>>>>>>  i1     0.00111
>>>>>>>>>>>>>>>>>>>  i1     0.00170
>>>>>>>>>>>>>>>>>>>  i1     0.00229
>>>>>>>>>>>>>>>>>>>  i1     0.00288
>>>>>>>>>>>>>>>>>>>  i1     0.00347
>>>>>>>>>>>>>>>>>>>  i1     0.00406
>>>>>>>>>>>>>>>>>>>  i1     0.00464
>>>>>>>>>>>>>>>>>>>  i1     0.00523
>>>>>>>>>>>>>>>>>>>  i1     0.00582
>>>>>>>>>>>>>>>>>>>  i1     0.00641
>>>>>>>>>>>>>>>>>>>  i1     0.00700
>>>>>>>>>>>>>>>>>>>  i1     0.00759.....
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> greetings
>>>>>>>>>>>>>>>>>>> menno
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>
>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>>>>>>>>>>>>>>>>>> Sent from the Csound - General mailing list archive
>>>> at
>>>>>>>>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>>>> with body
>>>>>>>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-31 15:21
FromFrancois PINOT
SubjectRe: [Csnd] funny randomi issue
Done for randomi and randomh. I noticed too that the a-rate versions of those opcdes accept as third argument xcps (a-rate or k-rate) instead of acps. I'll commit the source files and the manual files as soon as the sourceforge cvs is repaired.

Regard

Francois


2011/1/30 joachim heintz <jh@joachimheintz.de>
me too. i think your option 3 would definitely be very useful.

would you mind to add a similar optional parameter to randomh, too? as
it is now, randomh always starts from the lower border. my suggestion:
kres randomh kmin, kmax, kcps [,kstart]
kstart = 0 (default) starts at kmin
kstart = 1 starts at a random generated number in the range [kmin, kmax]

       joachim



Am 28.01.2011 10:21, schrieb Oeyvind Brandtsegg:
> +1
> Oeyvind
>
> 2011/1/28  <jpff@cs.bath.ac.uk>:
>> Yes
>>
>>> randi begins interpolation immediately, between iseed*kamp and a first
>>> generated random number. iseed being an optional argument with default
>>> value
>>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>>>
>>> So my proposal was:
>>>
>>> iinterp0=0, old behaviour for randomi
>>> iinterp0=1, randomi behaves like randi when iseed is not set (except that
>>> the interpolation for randomi begins from kmin, while it begins from
>>> kamp*0.5 for randi)
>>> iinterp1=2, randomi behaves like randi when iseed is set.
>>>
>>> We could add iinterp0=3, where two random numbers would be generated as
>>> breakpoints for the first interpolation.
>>>
>>> This way, we don't break backup compatibility, we gain a behaviour like
>>> the
>>> one of randi, plus the new possibility of two random breakpoints from the
>>> beginning of the note.
>>>
>>> Please let me know your opinion about this.
>>>
>>> Regards
>>>
>>> Francois
>>>
>>>
>>>
>>> 2011/1/27 joachim heintz <jh@joachimheintz.de>
>>>
>>>> That's my opinion, too. And randi behaves in this way.
>>>>
>>>> There is another issue with randomi/randomh: they will always start from
>>>> the minimum value, regardless the seed. for instance:
>>>> <CsoundSynthesizer>
>>>> <CsInstruments>
>>>> seed 0
>>>> instr 1
>>>> krand randomi 1, 10, 1
>>>> printk .5, krand
>>>> endin
>>>> </CsInstruments>
>>>> <CsScore>
>>>> i 1 0 10
>>>> </CsScore>
>>>> </CsoundSynthesizer>
>>>>
>>>> Again, randi/randh behave correctly.
>>>>
>>>> I'm afraid the randomi/randomh opcodes are simply not written as they
>>>> should.
>>>> Perhaps a small UDO with randi/randh inside, but the min/max syntax of
>>>> randomi/randomh would be the best solution?
>>>>
>>>>        joachim
>>>>
>>>>
>>>>
>>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>>>>> I would argue that the opcode should have, in the first place,
>>>> generated
>>>>> two random values and begun interpolation immediately. I can't really
>>>>> see the usefulness of the initial static segment. Adding optional
>>>>> arguments complicates the opcode but I can appreciate that this
>>>>> preserves backwards compatibility.
>>>>>
>>>>> Bye,
>>>>> Iain
>>>>>
>>>>>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>>>>>> From: peimankhosravi@gmail.com
>>>>>> To: csound@lists.bath.ac.uk
>>>>>> Subject: Re: [Csnd] funny randomi issue
>>>>>>
>>>>>> thanks very much. That would be awesome.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 27 January 2011 17:07, Art Hunkins <abhunkin@uncg.edu> wrote:
>>>>>>> +1 for this entire enhancement.
>>>>>>>
>>>>>>> Art Hunkins
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: Francois PINOT
>>>>>>> To: csound@lists.bath.ac.uk
>>>>>>> Sent: Thursday, January 27, 2011 9:49 AM
>>>>>>> Subject: Re: [Csnd] funny randomi issue
>>>>>>> Something like this?
>>>>>>>
>>>>>>> kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>>>>>>>
>>>>>>> iinterp0 (optional, default=0) -- first interpolation cycle mode
>>>>> (see below)
>>>>>>> ifirstval (optional, default=0) -- first output value
>>>>>>>
>>>>>>> When iinterp0 = 0 (the default), the kmin argument value is
>>>>> outputted for
>>>>>>> 1/kcps (resp. 1/acps) seconds at the beginning of the note, before
>>>>> the first
>>>>>>> random number is generated. Then the normal interpolation process
>>>> takes
>>>>>>> place, first between kmin and the first random number generated,
>>>> and
>>>>> then
>>>>>>> between successive generated random numbers, each interpolation
>>>>> cycle having
>>>>>>> a duration of 1/kcps (resp. 1/acps) seconds.
>>>>>>>
>>>>>>> When iinterp0 = 1, a random number is generated at initialization
>>>> and
>>>>>>> interpolation begins immediately between the kmin argument value
>>>> and
>>>>> that
>>>>>>> random number.
>>>>>>>
>>>>>>> When interp0 = 2, a random number is generated at initialization
>>>> and
>>>>>>> interpolation begins immediately between the ifirstval argument
>>>>> value and
>>>>>>> that random number.
>>>>>>>
>>>>>>>
>>>>>>> This  way, we could have immediate interpolation and initial value
>>>>> without
>>>>>>> modifying older versions behavior. If you agree with this, I can
>>>>> modify the
>>>>>>> source files (opcodes/uggab.h and opcodes/uggab.c), test the
>>>>> modifications
>>>>>>> and send the files to Andrés for upload
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> François
>>>>>>>
>>>>>>>
>>>>>>> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> Yes I second Andres. I think the addition of both, an initial
>>>> state
>>>>>>>> and starting the interpolation immediately would be a big bonus.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 27 January 2011 10:56, Andres Cabrera <mantaraya36@gmail.com>
>>>> wrote:
>>>>>>>>> It might actually be a better solution to add an optional i-time
>>>>>>>>> parameter which sets the initial state, or an option to enable
>>>>>>>>> producing a random number from the start.
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Andres
>>>>>>>>>
>>>>>>>>> On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>>>> fggpinot@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>> Absolutely! I can add this paragraph to the "Performance"
>>>> section
>>>> of
>>>>>>>>>> the
>>>>>>>>>> manual entry for randomi:
>>>>>>>>>>
>>>>>>>>>> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>>>> at
>>>> the
>>>>>>>>>> beginning of the note, before the first random number is
>>>> generated.
>>>>>>>>>> Then the
>>>>>>>>>> normal interpolation process takes place, first between kmin
>>>> and
>>>> the
>>>>>>>>>> first
>>>>>>>>>> random number generated, and then between successive generated
>>>>> random
>>>>>>>>>> numbers, each interpolation cycle having a duration of 1/kcps
>>>> (resp.
>>>>>>>>>> 1/acps)
>>>>>>>>>> seconds.
>>>>>>>>>>
>>>>>>>>>> Is it OK?
>>>>>>>>>>
>>>>>>>>>> Francois
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the explaination Francois.
>>>>>>>>>>>
>>>>>>>>>>> So just to clarify. The minimum value is always outputed for
>>>> 1/kcps
>>>>>>>>>>> seconds when the note is initialised? Is this because the
>>>>> opcode uses
>>>>>>>>>>> this time to generate the next random number that is
>>>>> subsequently used
>>>>>>>>>>> for the interpolation?
>>>>>>>>>>>
>>>>>>>>>>> I think this should be in the manual as a kcps value of 0.1 or
>>>>>>>>>>> somthing like that means a long wait (10 seconds!). I guess
>>>> the
>>>>> trick
>>>>>>>>>>> would be something like this:
>>>>>>>>>>>
>>>>>>>>>>> kmult linseg 1000, 0.001, 1, p3, 1
>>>>>>>>>>> kmorph2 randomi 0,1, 2*kmult
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>>
>>>>>>>>>>> Peiman
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 27 January 2011 08:18, Francois PINOT <fggpinot@gmail.com>
>>>>> wrote:
>>>>>>>>>>>> Hi Peiman,
>>>>>>>>>>>>
>>>>>>>>>>>> This is normal behavior: randomi is an interpolating opcode.
>>>> That
>>>>>>>>>>>> means
>>>>>>>>>>>> that
>>>>>>>>>>>> it will generate new random numbers at a rate of  kcps but,
>>>>> during
>>>>>>>>>>>> the
>>>>>>>>>>>> 1/kcps sec separating two random numbers, it will output
>>>>>>>>>>>> interpolated
>>>>>>>>>>>> values. The first values in your example are always 0
>>>> because
>>>> the
>>>>>>>>>>>> first
>>>>>>>>>>>> interpolation is done between kmin (which is 0 in your
>>>>> example)  and
>>>>>>>>>>>> the
>>>>>>>>>>>> first generated random value. By changing the value of kmin,
>>>>> you'll
>>>>>>>>>>>> get
>>>>>>>>>>>> different starting values. Moreover, if you change the kcps
>>>>> value,
>>>>>>>>>>>> the
>>>>>>>>>>>> number of fixed initial values will change accordingly.
>>>>>>>>>>>>
>>>>>>>>>>>> Hope this helps
>>>>>>>>>>>>
>>>>>>>>>>>> Francois
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2011/1/27 peiman khosravi <peimankhosravi@gmail.com>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you try this one please Victor.
>>>>>>>>>>>>>
>>>>>>>>>>>>> <CsoundSynthesizer>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <CsOptions>
>>>>>>>>>>>>> -odac -d
>>>>>>>>>>>>> </CsOptions>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <CsInstruments>
>>>>>>>>>>>>> sr     = 96000
>>>>>>>>>>>>> kr     = 16
>>>>>>>>>>>>> nchnls = 1
>>>>>>>>>>>>>
>>>>>>>>>>>>> seed 0
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>      instr 1
>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>>>>>>>>>>>>
>>>>>>>>>>>>> printk 0.1, kmorph2
>>>>>>>>>>>>>
>>>>>>>>>>>>>      endin
>>>>>>>>>>>>>
>>>>>>>>>>>>> </CsInstruments>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <CsScore>
>>>>>>>>>>>>> i1 0 3600
>>>>>>>>>>>>> </CsScore>
>>>>>>>>>>>>>
>>>>>>>>>>>>> </CsoundSynthesizer>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 26 January 2011 22:15, Victor Lazzarini
>>>>>>>>>>>>> <Victor.Lazzarini@nuim.ie>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>> Not stuck here. 5.13 OSX 10.5
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> i1 0.00000
>>>>>>>>>>>>>> i1 0.11036
>>>>>>>>>>>>>> i1 0.22072
>>>>>>>>>>>>>> i1 0.33108
>>>>>>>>>>>>>> i1 0.44144
>>>>>>>>>>>>>> i1 0.55180
>>>>>>>>>>>>>> i1 0.66215
>>>>>>>>>>>>>> i1 0.77251
>>>>>>>>>>>>>> i1 0.88287
>>>>>>>>>>>>>> i1 0.80893
>>>>>>>>>>>>>> i1 0.73499
>>>>>>>>>>>>>> i1 0.66105
>>>>>>>>>>>>>> i1 0.58711
>>>>>>>>>>>>>> i1 0.51317
>>>>>>>>>>>>>> i1 0.43922
>>>>>>>>>>>>>> i1 0.36528
>>>>>>>>>>>>>> i1 0.29134
>>>>>>>>>>>>>> i1 0.37064
>>>>>>>>>>>>>> i1 0.44993
>>>>>>>>>>>>>> i1 0.52923
>>>>>>>>>>>>>> i1 0.60853
>>>>>>>>>>>>>> i1 0.68782
>>>>>>>>>>>>>> i1 0.76712
>>>>>>>>>>>>>> i1 0.84641
>>>>>>>>>>>>>> i1 0.92571
>>>>>>>>>>>>>> i1 0.82436
>>>>>>>>>>>>>> i1 0.72301
>>>>>>>>>>>>>> i1 0.62166
>>>>>>>>>>>>>> i1 0.52031
>>>>>>>>>>>>>> i1 0.41896
>>>>>>>>>>>>>> i1 0.31761
>>>>>>>>>>>>>> i1 0.21626
>>>>>>>>>>>>>> i1 0.11491
>>>>>>>>>>>>>> i1 0.10123
>>>>>>>>>>>>>> i1 0.08756
>>>>>>>>>>>>>> i1 0.07388
>>>>>>>>>>>>>> i1 0.06021
>>>>>>>>>>>>>> i1 0.04653
>>>>>>>>>>>>>> i1 0.03286
>>>>>>>>>>>>>> i1 0.01918
>>>>>>>>>>>>>> i1 0.00551
>>>>>>>>>>>>>> i1 0.06780
>>>>>>>>>>>>>> i1 0.13008
>>>>>>>>>>>>>> i1 0.19237
>>>>>>>>>>>>>> i1 0.25466
>>>>>>>>>>>>>> i1 0.31695
>>>>>>>>>>>>>> i1 0.37924
>>>>>>>>>>>>>> i1 0.44153
>>>>>>>>>>>>>> i1 0.50381
>>>>>>>>>>>>>> i1 0.51766
>>>>>>>>>>>>>> i1 0.53150
>>>>>>>>>>>>>> i1 0.54534
>>>>>>>>>>>>>> i1 0.55919
>>>>>>>>>>>>>> i1 0.57303
>>>>>>>>>>>>>> i1 0.58687
>>>>>>>>>>>>>> i1 0.60072
>>>>>>>>>>>>>> On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> yes 5.13. I used the universal installer.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 26 January 2011 22:05, joachim heintz
>>>>> <jh@joachimheintz.de>
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> do you also use 5.13?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I wonder if this is only happening with this opcode or
>>>>> if it's
>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>> more
>>>>>>>>>>>>>>>>> general OS X related issue to do with krate and
>>>> timing.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> P
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On 26 January 2011 09:21, peiman khosravi
>>>>>>>>>>>>>>>>> <peimankhosravi@gmail.com>
>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks Menno,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I am on OS X 10.6. Using this other csd bellow I get
>>>> the
>>>>>>>>>>>>>>>>>> following.
>>>>>>>>>>>>>>>>>> The value remains on zero for .5 seconds every time.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>  new alloc for instr 1:
>>>>>>>>>>>>>>>>>>  i   1 time     0.06250:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.12500:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.25000:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.31250:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.43750:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.50000:     0.00000
>>>>>>>>>>>>>>>>>>  i   1 time     0.62500:     0.08407
>>>>>>>>>>>>>>>>>>  i   1 time     0.75000:     0.25222
>>>>>>>>>>>>>>>>>>  i   1 time     0.81250:     0.33630
>>>>>>>>>>>>>>>>>>  i   1 time     0.93750:     0.50445
>>>>>>>>>>>>>>>>>>  i   1 time     1.00000:     0.58852
>>>>>>>>>>>>>>>>>>  i   1 time     1.12500:     0.69159
>>>>>>>>>>>>>>>>>>  i   1 time     1.25000:     0.72958
>>>>>>>>>>>>>>>>>>  i   1 time     1.31250:     0.74858
>>>>>>>>>>>>>>>>>>  i   1 time     1.43750:     0.78657
>>>>>>>>>>>>>>>>>>  i   1 time     1.50000:     0.80556
>>>>>>>>>>>>>>>>>>  i   1 time     1.62500:     0.78747
>>>>>>>>>>>>>>>>>>  i   1 time     1.75000:     0.71329
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>  <CsoundSynthesizer>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> <CsOptions>
>>>>>>>>>>>>>>>>>> -odac -d
>>>>>>>>>>>>>>>>>> </CsOptions>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> <CsInstruments>
>>>>>>>>>>>>>>>>>> sr     = 96000
>>>>>>>>>>>>>>>>>> kr     = 16
>>>>>>>>>>>>>>>>>> nchnls = 1
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> seed 0
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>      instr 1
>>>>>>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> printk 0.1, kmorph2
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>      endin
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> </CsInstruments>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> <CsScore>
>>>>>>>>>>>>>>>>>> i1 0 3600
>>>>>>>>>>>>>>>>>> </CsScore>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> </CsoundSynthesizer>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On 26 January 2011 08:35, menno <nabob_cd@yahoo.com>
>>>>> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>>>>>>>>>>>>>>>>>> Csound5.13beta,
>>>>>>>>>>>>>>>>>>> doubles
>>>>>>>>>>>>>>>>>>> ,Ubuntu, 48kHz, Jack:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> new alloc for instr 1:
>>>>>>>>>>>>>>>>>>>  i1     0.00000
>>>>>>>>>>>>>>>>>>>  i1     0.00052
>>>>>>>>>>>>>>>>>>>  i1     0.00111
>>>>>>>>>>>>>>>>>>>  i1     0.00170
>>>>>>>>>>>>>>>>>>>  i1     0.00229
>>>>>>>>>>>>>>>>>>>  i1     0.00288
>>>>>>>>>>>>>>>>>>>  i1     0.00347
>>>>>>>>>>>>>>>>>>>  i1     0.00406
>>>>>>>>>>>>>>>>>>>  i1     0.00464
>>>>>>>>>>>>>>>>>>>  i1     0.00523
>>>>>>>>>>>>>>>>>>>  i1     0.00582
>>>>>>>>>>>>>>>>>>>  i1     0.00641
>>>>>>>>>>>>>>>>>>>  i1     0.00700
>>>>>>>>>>>>>>>>>>>  i1     0.00759.....
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> greetings
>>>>>>>>>>>>>>>>>>> menno
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>
>>>> http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>>>>>>>>>>>>>>>>>> Sent from the Csound - General mailing list archive
>>>> at
>>>>>>>>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>>>> with body
>>>>>>>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>>>> body
>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>
>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2011-01-31 16:41
Fromjoachim heintz
SubjectRe: [Csnd] funny randomi issue
great - many thanks!!
	j

Am 31.01.2011 16:21, schrieb Francois PINOT:
> Done for randomi and randomh. I noticed too that the a-rate versions of
> those opcdes accept as third argument xcps (a-rate or k-rate) instead of
> acps. I'll commit the source files and the manual files as soon as the
> sourceforge cvs is repaired.
> 
> Regard
> 
> Francois
> 
> 
> 2011/1/30 joachim heintz >
> 
>     me too. i think your option 3 would definitely be very useful.
> 
>     would you mind to add a similar optional parameter to randomh, too? as
>     it is now, randomh always starts from the lower border. my suggestion:
>     kres randomh kmin, kmax, kcps [,kstart]
>     kstart = 0 (default) starts at kmin
>     kstart = 1 starts at a random generated number in the range [kmin, kmax]
> 
>            joachim
> 
> 
> 
>     Am 28.01.2011 10:21, schrieb Oeyvind Brandtsegg:
>     > +1
>     > Oeyvind
>     >
>     > 2011/1/28  >:
>     >> Yes
>     >>
>     >>> randi begins interpolation immediately, between iseed*kamp and a
>     first
>     >>> generated random number. iseed being an optional argument with
>     default
>     >>> value
>     >>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>     >>>
>     >>> So my proposal was:
>     >>>
>     >>> iinterp0=0, old behaviour for randomi
>     >>> iinterp0=1, randomi behaves like randi when iseed is not set
>     (except that
>     >>> the interpolation for randomi begins from kmin, while it begins from
>     >>> kamp*0.5 for randi)
>     >>> iinterp1=2, randomi behaves like randi when iseed is set.
>     >>>
>     >>> We could add iinterp0=3, where two random numbers would be
>     generated as
>     >>> breakpoints for the first interpolation.
>     >>>
>     >>> This way, we don't break backup compatibility, we gain a
>     behaviour like
>     >>> the
>     >>> one of randi, plus the new possibility of two random breakpoints
>     from the
>     >>> beginning of the note.
>     >>>
>     >>> Please let me know your opinion about this.
>     >>>
>     >>> Regards
>     >>>
>     >>> Francois
>     >>>
>     >>>
>     >>>
>     >>> 2011/1/27 joachim heintz      >
>     >>>
>     >>>> That's my opinion, too. And randi behaves in this way.
>     >>>>
>     >>>> There is another issue with randomi/randomh: they will always
>     start from
>     >>>> the minimum value, regardless the seed. for instance:
>     >>>> 
>     >>>> 
>     >>>> seed 0
>     >>>> instr 1
>     >>>> krand randomi 1, 10, 1
>     >>>> printk .5, krand
>     >>>> endin
>     >>>> 
>     >>>> 
>     >>>> i 1 0 10
>     >>>> 
>     >>>> 
>     >>>>
>     >>>> Again, randi/randh behave correctly.
>     >>>>
>     >>>> I'm afraid the randomi/randomh opcodes are simply not written
>     as they
>     >>>> should.
>     >>>> Perhaps a small UDO with randi/randh inside, but the min/max
>     syntax of
>     >>>> randomi/randomh would be the best solution?
>     >>>>
>     >>>>        joachim
>     >>>>
>     >>>>
>     >>>>
>     >>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>     >>>>> I would argue that the opcode should have, in the first place,
>     >>>> generated
>     >>>>> two random values and begun interpolation immediately. I can't
>     really
>     >>>>> see the usefulness of the initial static segment. Adding optional
>     >>>>> arguments complicates the opcode but I can appreciate that this
>     >>>>> preserves backwards compatibility.
>     >>>>>
>     >>>>> Bye,
>     >>>>> Iain
>     >>>>>
>     >>>>>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>     >>>>>> From: peimankhosravi@gmail.com 
>     >>>>>> To: csound@lists.bath.ac.uk 
>     >>>>>> Subject: Re: [Csnd] funny randomi issue
>     >>>>>>
>     >>>>>> thanks very much. That would be awesome.
>     >>>>>>
>     >>>>>> Best,
>     >>>>>>
>     >>>>>> Peiman
>     >>>>>>
>     >>>>>> On 27 January 2011 17:07, Art Hunkins      > wrote:
>     >>>>>>> +1 for this entire enhancement.
>     >>>>>>>
>     >>>>>>> Art Hunkins
>     >>>>>>>
>     >>>>>>> ----- Original Message -----
>     >>>>>>> From: Francois PINOT
>     >>>>>>> To: csound@lists.bath.ac.uk 
>     >>>>>>> Sent: Thursday, January 27, 2011 9:49 AM
>     >>>>>>> Subject: Re: [Csnd] funny randomi issue
>     >>>>>>> Something like this?
>     >>>>>>>
>     >>>>>>> kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>     >>>>>>>
>     >>>>>>> iinterp0 (optional, default=0) -- first interpolation cycle mode
>     >>>>> (see below)
>     >>>>>>> ifirstval (optional, default=0) -- first output value
>     >>>>>>>
>     >>>>>>> When iinterp0 = 0 (the default), the kmin argument value is
>     >>>>> outputted for
>     >>>>>>> 1/kcps (resp. 1/acps) seconds at the beginning of the note,
>     before
>     >>>>> the first
>     >>>>>>> random number is generated. Then the normal interpolation
>     process
>     >>>> takes
>     >>>>>>> place, first between kmin and the first random number generated,
>     >>>> and
>     >>>>> then
>     >>>>>>> between successive generated random numbers, each interpolation
>     >>>>> cycle having
>     >>>>>>> a duration of 1/kcps (resp. 1/acps) seconds.
>     >>>>>>>
>     >>>>>>> When iinterp0 = 1, a random number is generated at
>     initialization
>     >>>> and
>     >>>>>>> interpolation begins immediately between the kmin argument value
>     >>>> and
>     >>>>> that
>     >>>>>>> random number.
>     >>>>>>>
>     >>>>>>> When interp0 = 2, a random number is generated at initialization
>     >>>> and
>     >>>>>>> interpolation begins immediately between the ifirstval argument
>     >>>>> value and
>     >>>>>>> that random number.
>     >>>>>>>
>     >>>>>>>
>     >>>>>>> This  way, we could have immediate interpolation and initial
>     value
>     >>>>> without
>     >>>>>>> modifying older versions behavior. If you agree with this, I can
>     >>>>> modify the
>     >>>>>>> source files (opcodes/uggab.h and opcodes/uggab.c), test the
>     >>>>> modifications
>     >>>>>>> and send the files to Andrés for upload
>     >>>>>>>
>     >>>>>>> Regards
>     >>>>>>>
>     >>>>>>> François
>     >>>>>>>
>     >>>>>>>
>     >>>>>>> 2011/1/27 peiman khosravi      >
>     >>>>>>>>
>     >>>>>>>> Thanks!
>     >>>>>>>>
>     >>>>>>>> Yes I second Andres. I think the addition of both, an initial
>     >>>> state
>     >>>>>>>> and starting the interpolation immediately would be a big
>     bonus.
>     >>>>>>>>
>     >>>>>>>> Best,
>     >>>>>>>>
>     >>>>>>>> Peiman
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>> On 27 January 2011 10:56, Andres Cabrera
>     >
>     >>>> wrote:
>     >>>>>>>>> It might actually be a better solution to add an optional
>     i-time
>     >>>>>>>>> parameter which sets the initial state, or an option to enable
>     >>>>>>>>> producing a random number from the start.
>     >>>>>>>>>
>     >>>>>>>>> Cheers,
>     >>>>>>>>> Andres
>     >>>>>>>>>
>     >>>>>>>>> On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>     >>>> fggpinot@gmail.com >
>     >>>>>>>>> wrote:
>     >>>>>>>>>> Absolutely! I can add this paragraph to the "Performance"
>     >>>> section
>     >>>> of
>     >>>>>>>>>> the
>     >>>>>>>>>> manual entry for randomi:
>     >>>>>>>>>>
>     >>>>>>>>>> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>     >>>> at
>     >>>> the
>     >>>>>>>>>> beginning of the note, before the first random number is
>     >>>> generated.
>     >>>>>>>>>> Then the
>     >>>>>>>>>> normal interpolation process takes place, first between kmin
>     >>>> and
>     >>>> the
>     >>>>>>>>>> first
>     >>>>>>>>>> random number generated, and then between successive
>     generated
>     >>>>> random
>     >>>>>>>>>> numbers, each interpolation cycle having a duration of 1/kcps
>     >>>> (resp.
>     >>>>>>>>>> 1/acps)
>     >>>>>>>>>> seconds.
>     >>>>>>>>>>
>     >>>>>>>>>> Is it OK?
>     >>>>>>>>>>
>     >>>>>>>>>> Francois
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>> 2011/1/27 peiman khosravi      >
>     >>>>>>>>>>>
>     >>>>>>>>>>> Thanks for the explaination Francois.
>     >>>>>>>>>>>
>     >>>>>>>>>>> So just to clarify. The minimum value is always outputed for
>     >>>> 1/kcps
>     >>>>>>>>>>> seconds when the note is initialised? Is this because the
>     >>>>> opcode uses
>     >>>>>>>>>>> this time to generate the next random number that is
>     >>>>> subsequently used
>     >>>>>>>>>>> for the interpolation?
>     >>>>>>>>>>>
>     >>>>>>>>>>> I think this should be in the manual as a kcps value of
>     0.1 or
>     >>>>>>>>>>> somthing like that means a long wait (10 seconds!). I guess
>     >>>> the
>     >>>>> trick
>     >>>>>>>>>>> would be something like this:
>     >>>>>>>>>>>
>     >>>>>>>>>>> kmult linseg 1000, 0.001, 1, p3, 1
>     >>>>>>>>>>> kmorph2 randomi 0,1, 2*kmult
>     >>>>>>>>>>>
>     >>>>>>>>>>> Best,
>     >>>>>>>>>>>
>     >>>>>>>>>>> Peiman
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>> On 27 January 2011 08:18, Francois PINOT
>     >
>     >>>>> wrote:
>     >>>>>>>>>>>> Hi Peiman,
>     >>>>>>>>>>>>
>     >>>>>>>>>>>> This is normal behavior: randomi is an interpolating
>     opcode.
>     >>>> That
>     >>>>>>>>>>>> means
>     >>>>>>>>>>>> that
>     >>>>>>>>>>>> it will generate new random numbers at a rate of  kcps but,
>     >>>>> during
>     >>>>>>>>>>>> the
>     >>>>>>>>>>>> 1/kcps sec separating two random numbers, it will output
>     >>>>>>>>>>>> interpolated
>     >>>>>>>>>>>> values. The first values in your example are always 0
>     >>>> because
>     >>>> the
>     >>>>>>>>>>>> first
>     >>>>>>>>>>>> interpolation is done between kmin (which is 0 in your
>     >>>>> example)  and
>     >>>>>>>>>>>> the
>     >>>>>>>>>>>> first generated random value. By changing the value of
>     kmin,
>     >>>>> you'll
>     >>>>>>>>>>>> get
>     >>>>>>>>>>>> different starting values. Moreover, if you change the kcps
>     >>>>> value,
>     >>>>>>>>>>>> the
>     >>>>>>>>>>>> number of fixed initial values will change accordingly.
>     >>>>>>>>>>>>
>     >>>>>>>>>>>> Hope this helps
>     >>>>>>>>>>>>
>     >>>>>>>>>>>> Francois
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>> 2011/1/27 peiman khosravi      >
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> Can you try this one please Victor.
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>> -odac -d
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>> sr     = 96000
>     >>>>>>>>>>>>> kr     = 16
>     >>>>>>>>>>>>> nchnls = 1
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> seed 0
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>      instr 1
>     >>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> printk 0.1, kmorph2
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>      endin
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>> i1 0 3600
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> 
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> On 26 January 2011 22:15, Victor Lazzarini
>     >>>>>>>>>>>>>      >
>     >>>>>>>>>>>>> wrote:
>     >>>>>>>>>>>>>> Not stuck here. 5.13 OSX 10.5
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>> i1 0.00000
>     >>>>>>>>>>>>>> i1 0.11036
>     >>>>>>>>>>>>>> i1 0.22072
>     >>>>>>>>>>>>>> i1 0.33108
>     >>>>>>>>>>>>>> i1 0.44144
>     >>>>>>>>>>>>>> i1 0.55180
>     >>>>>>>>>>>>>> i1 0.66215
>     >>>>>>>>>>>>>> i1 0.77251
>     >>>>>>>>>>>>>> i1 0.88287
>     >>>>>>>>>>>>>> i1 0.80893
>     >>>>>>>>>>>>>> i1 0.73499
>     >>>>>>>>>>>>>> i1 0.66105
>     >>>>>>>>>>>>>> i1 0.58711
>     >>>>>>>>>>>>>> i1 0.51317
>     >>>>>>>>>>>>>> i1 0.43922
>     >>>>>>>>>>>>>> i1 0.36528
>     >>>>>>>>>>>>>> i1 0.29134
>     >>>>>>>>>>>>>> i1 0.37064
>     >>>>>>>>>>>>>> i1 0.44993
>     >>>>>>>>>>>>>> i1 0.52923
>     >>>>>>>>>>>>>> i1 0.60853
>     >>>>>>>>>>>>>> i1 0.68782
>     >>>>>>>>>>>>>> i1 0.76712
>     >>>>>>>>>>>>>> i1 0.84641
>     >>>>>>>>>>>>>> i1 0.92571
>     >>>>>>>>>>>>>> i1 0.82436
>     >>>>>>>>>>>>>> i1 0.72301
>     >>>>>>>>>>>>>> i1 0.62166
>     >>>>>>>>>>>>>> i1 0.52031
>     >>>>>>>>>>>>>> i1 0.41896
>     >>>>>>>>>>>>>> i1 0.31761
>     >>>>>>>>>>>>>> i1 0.21626
>     >>>>>>>>>>>>>> i1 0.11491
>     >>>>>>>>>>>>>> i1 0.10123
>     >>>>>>>>>>>>>> i1 0.08756
>     >>>>>>>>>>>>>> i1 0.07388
>     >>>>>>>>>>>>>> i1 0.06021
>     >>>>>>>>>>>>>> i1 0.04653
>     >>>>>>>>>>>>>> i1 0.03286
>     >>>>>>>>>>>>>> i1 0.01918
>     >>>>>>>>>>>>>> i1 0.00551
>     >>>>>>>>>>>>>> i1 0.06780
>     >>>>>>>>>>>>>> i1 0.13008
>     >>>>>>>>>>>>>> i1 0.19237
>     >>>>>>>>>>>>>> i1 0.25466
>     >>>>>>>>>>>>>> i1 0.31695
>     >>>>>>>>>>>>>> i1 0.37924
>     >>>>>>>>>>>>>> i1 0.44153
>     >>>>>>>>>>>>>> i1 0.50381
>     >>>>>>>>>>>>>> i1 0.51766
>     >>>>>>>>>>>>>> i1 0.53150
>     >>>>>>>>>>>>>> i1 0.54534
>     >>>>>>>>>>>>>> i1 0.55919
>     >>>>>>>>>>>>>> i1 0.57303
>     >>>>>>>>>>>>>> i1 0.58687
>     >>>>>>>>>>>>>> i1 0.60072
>     >>>>>>>>>>>>>> On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>> yes 5.13. I used the universal installer.
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>> On 26 January 2011 22:05, joachim heintz
>     >>>>> >
>     >>>>>>>>>>>>>>> wrote:
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>> do you also use 5.13?
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>> I wonder if this is only happening with this opcode or
>     >>>>> if it's
>     >>>>>>>>>>>>>>>>> a
>     >>>>>>>>>>>>>>>>> more
>     >>>>>>>>>>>>>>>>> general OS X related issue to do with krate and
>     >>>> timing.
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>> P
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>> On 26 January 2011 09:21, peiman khosravi
>     >>>>>>>>>>>>>>>>>      >
>     >>>>>>>>>>>>>>>>> wrote:
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> Thanks Menno,
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> I am on OS X 10.6. Using this other csd bellow I get
>     >>>> the
>     >>>>>>>>>>>>>>>>>> following.
>     >>>>>>>>>>>>>>>>>> The value remains on zero for .5 seconds every time.
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>  new alloc for instr 1:
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.06250:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.12500:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.25000:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.31250:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.43750:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.50000:     0.00000
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.62500:     0.08407
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.75000:     0.25222
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.81250:     0.33630
>     >>>>>>>>>>>>>>>>>>  i   1 time     0.93750:     0.50445
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.00000:     0.58852
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.12500:     0.69159
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.25000:     0.72958
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.31250:     0.74858
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.43750:     0.78657
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.50000:     0.80556
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.62500:     0.78747
>     >>>>>>>>>>>>>>>>>>  i   1 time     1.75000:     0.71329
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> Best,
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> Peiman
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>  
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>> -odac -d
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>> sr     = 96000
>     >>>>>>>>>>>>>>>>>> kr     = 16
>     >>>>>>>>>>>>>>>>>> nchnls = 1
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> seed 0
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>      instr 1
>     >>>>>>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> printk 0.1, kmorph2
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>      endin
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>> i1 0 3600
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> 
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>> On 26 January 2011 08:35, menno
>     >
>     >>>>> wrote:
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>     >>>>>>>>>>>>>>>>>>> Csound5.13beta,
>     >>>>>>>>>>>>>>>>>>> doubles
>     >>>>>>>>>>>>>>>>>>> ,Ubuntu, 48kHz, Jack:
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>> new alloc for instr 1:
>     >>>>>>>>>>>>>>>>>>>  i1     0.00000
>     >>>>>>>>>>>>>>>>>>>  i1     0.00052
>     >>>>>>>>>>>>>>>>>>>  i1     0.00111
>     >>>>>>>>>>>>>>>>>>>  i1     0.00170
>     >>>>>>>>>>>>>>>>>>>  i1     0.00229
>     >>>>>>>>>>>>>>>>>>>  i1     0.00288
>     >>>>>>>>>>>>>>>>>>>  i1     0.00347
>     >>>>>>>>>>>>>>>>>>>  i1     0.00406
>     >>>>>>>>>>>>>>>>>>>  i1     0.00464
>     >>>>>>>>>>>>>>>>>>>  i1     0.00523
>     >>>>>>>>>>>>>>>>>>>  i1     0.00582
>     >>>>>>>>>>>>>>>>>>>  i1     0.00641
>     >>>>>>>>>>>>>>>>>>>  i1     0.00700
>     >>>>>>>>>>>>>>>>>>>  i1     0.00759.....
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>> greetings
>     >>>>>>>>>>>>>>>>>>> menno
>     >>>>>>>>>>>>>>>>>>> --
>     >>>>>>>>>>>>>>>>>>> View this message in context:
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>
>     >>>>
>     http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>     >>>>>>>>>>>>>>>>>>> Sent from the Csound - General mailing list archive
>     >>>> at
>     >>>>>>>>>>>>>>>>>>> Nabble.com.
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>>>>>>>> To unsubscribe, send email
>     sympa@lists.bath.ac.uk 
>     >>>>> with body
>     >>>>>>>>>>>>>>>>>>> "unsubscribe csound"
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>
>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with
>     >>>> body
>     >>>>>>>>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>>>>>>>> csound"
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>
>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with
>     >>>> body
>     >>>>>>>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>>>>>>> csound"
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>>
>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with
>     >>>> body
>     >>>>>>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>>>>>> csound"
>     >>>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with
>     >>>> body
>     >>>>>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>>>>> csound"
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body
>     >>>>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>>>> csound"
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>>>
>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body
>     >>>>>>>>>>> "unsubscribe
>     >>>>>>>>>>> csound"
>     >>>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>>
>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body
>     >>>>> "unsubscribe
>     >>>>>>>>> csound"
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>>>>
>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>>>> Discussions of bugs and features can be posted here
>     >>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body
>     >>>>> "unsubscribe
>     >>>>>>>> csound"
>     >>>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>>>> Discussions of bugs and features can be posted here
>     >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body
>     >>>>> "unsubscribe csound"
>     >>>>>>
>     >>>>
>     >>>>
>     >>>> Send bugs reports to the Sourceforge bug tracker
>     >>>>          
>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>>> Discussions of bugs and features can be posted here
>     >>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe
>     >>>> csound"
>     >>>>
>     >>>>
>     >>>
>     >>> Send bugs reports to the Sourceforge bug tracker
>     >>>            
>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >>> Discussions of bugs and features can be posted here
>     >>> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe
>     >>> csound"
>     >>>
>     >>>
>     >>
>     >>
>     >>
>     >>
>     >> Send bugs reports to the Sourceforge bug tracker
>     >>          
>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     >> Discussions of bugs and features can be posted here
>     >> To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>     >>
>     >>
>     >
>     >
>     > Send bugs reports to the Sourceforge bug tracker
>     >            
>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     > Discussions of bugs and features can be posted here
>     > To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>     >
>     >
> 
> 
>     Send bugs reports to the Sourceforge bug tracker
>              
>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>     
>     Discussions of bugs and features can be posted here
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
> 
> 


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-31 17:37
Frompeiman khosravi
SubjectRe: [Csnd] funny randomi issue
Yes, much appreciated.

Best,

Peiman

On 31 January 2011 16:41, joachim heintz  wrote:
> great - many thanks!!
>        j
>
> Am 31.01.2011 16:21, schrieb Francois PINOT:
>> Done for randomi and randomh. I noticed too that the a-rate versions of
>> those opcdes accept as third argument xcps (a-rate or k-rate) instead of
>> acps. I'll commit the source files and the manual files as soon as the
>> sourceforge cvs is repaired.
>>
>> Regard
>>
>> Francois
>>
>>
>> 2011/1/30 joachim heintz >
>>
>>     me too. i think your option 3 would definitely be very useful.
>>
>>     would you mind to add a similar optional parameter to randomh, too? as
>>     it is now, randomh always starts from the lower border. my suggestion:
>>     kres randomh kmin, kmax, kcps [,kstart]
>>     kstart = 0 (default) starts at kmin
>>     kstart = 1 starts at a random generated number in the range [kmin, kmax]
>>
>>            joachim
>>
>>
>>
>>     Am 28.01.2011 10:21, schrieb Oeyvind Brandtsegg:
>>     > +1
>>     > Oeyvind
>>     >
>>     > 2011/1/28  >:
>>     >> Yes
>>     >>
>>     >>> randi begins interpolation immediately, between iseed*kamp and a
>>     first
>>     >>> generated random number. iseed being an optional argument with
>>     default
>>     >>> value
>>     >>> of 0.5, if it is not set, randi begins interpolation from kamp*0.5.
>>     >>>
>>     >>> So my proposal was:
>>     >>>
>>     >>> iinterp0=0, old behaviour for randomi
>>     >>> iinterp0=1, randomi behaves like randi when iseed is not set
>>     (except that
>>     >>> the interpolation for randomi begins from kmin, while it begins from
>>     >>> kamp*0.5 for randi)
>>     >>> iinterp1=2, randomi behaves like randi when iseed is set.
>>     >>>
>>     >>> We could add iinterp0=3, where two random numbers would be
>>     generated as
>>     >>> breakpoints for the first interpolation.
>>     >>>
>>     >>> This way, we don't break backup compatibility, we gain a
>>     behaviour like
>>     >>> the
>>     >>> one of randi, plus the new possibility of two random breakpoints
>>     from the
>>     >>> beginning of the note.
>>     >>>
>>     >>> Please let me know your opinion about this.
>>     >>>
>>     >>> Regards
>>     >>>
>>     >>> Francois
>>     >>>
>>     >>>
>>     >>>
>>     >>> 2011/1/27 joachim heintz >     >
>>     >>>
>>     >>>> That's my opinion, too. And randi behaves in this way.
>>     >>>>
>>     >>>> There is another issue with randomi/randomh: they will always
>>     start from
>>     >>>> the minimum value, regardless the seed. for instance:
>>     >>>> 
>>     >>>> 
>>     >>>> seed 0
>>     >>>> instr 1
>>     >>>> krand randomi 1, 10, 1
>>     >>>> printk .5, krand
>>     >>>> endin
>>     >>>> 
>>     >>>> 
>>     >>>> i 1 0 10
>>     >>>> 
>>     >>>> 
>>     >>>>
>>     >>>> Again, randi/randh behave correctly.
>>     >>>>
>>     >>>> I'm afraid the randomi/randomh opcodes are simply not written
>>     as they
>>     >>>> should.
>>     >>>> Perhaps a small UDO with randi/randh inside, but the min/max
>>     syntax of
>>     >>>> randomi/randomh would be the best solution?
>>     >>>>
>>     >>>>        joachim
>>     >>>>
>>     >>>>
>>     >>>>
>>     >>>> Am 27.01.2011 23:07, schrieb Iain McCurdy:
>>     >>>>> I would argue that the opcode should have, in the first place,
>>     >>>> generated
>>     >>>>> two random values and begun interpolation immediately. I can't
>>     really
>>     >>>>> see the usefulness of the initial static segment. Adding optional
>>     >>>>> arguments complicates the opcode but I can appreciate that this
>>     >>>>> preserves backwards compatibility.
>>     >>>>>
>>     >>>>> Bye,
>>     >>>>> Iain
>>     >>>>>
>>     >>>>>> Date: Thu, 27 Jan 2011 17:16:31 +0000
>>     >>>>>> From: peimankhosravi@gmail.com 
>>     >>>>>> To: csound@lists.bath.ac.uk 
>>     >>>>>> Subject: Re: [Csnd] funny randomi issue
>>     >>>>>>
>>     >>>>>> thanks very much. That would be awesome.
>>     >>>>>>
>>     >>>>>> Best,
>>     >>>>>>
>>     >>>>>> Peiman
>>     >>>>>>
>>     >>>>>> On 27 January 2011 17:07, Art Hunkins >     > wrote:
>>     >>>>>>> +1 for this entire enhancement.
>>     >>>>>>>
>>     >>>>>>> Art Hunkins
>>     >>>>>>>
>>     >>>>>>> ----- Original Message -----
>>     >>>>>>> From: Francois PINOT
>>     >>>>>>> To: csound@lists.bath.ac.uk 
>>     >>>>>>> Sent: Thursday, January 27, 2011 9:49 AM
>>     >>>>>>> Subject: Re: [Csnd] funny randomi issue
>>     >>>>>>> Something like this?
>>     >>>>>>>
>>     >>>>>>> kres randomi kmin, kmax, kcps [,iinterp0] [,ifirstval]
>>     >>>>>>>
>>     >>>>>>> iinterp0 (optional, default=0) -- first interpolation cycle mode
>>     >>>>> (see below)
>>     >>>>>>> ifirstval (optional, default=0) -- first output value
>>     >>>>>>>
>>     >>>>>>> When iinterp0 = 0 (the default), the kmin argument value is
>>     >>>>> outputted for
>>     >>>>>>> 1/kcps (resp. 1/acps) seconds at the beginning of the note,
>>     before
>>     >>>>> the first
>>     >>>>>>> random number is generated. Then the normal interpolation
>>     process
>>     >>>> takes
>>     >>>>>>> place, first between kmin and the first random number generated,
>>     >>>> and
>>     >>>>> then
>>     >>>>>>> between successive generated random numbers, each interpolation
>>     >>>>> cycle having
>>     >>>>>>> a duration of 1/kcps (resp. 1/acps) seconds.
>>     >>>>>>>
>>     >>>>>>> When iinterp0 = 1, a random number is generated at
>>     initialization
>>     >>>> and
>>     >>>>>>> interpolation begins immediately between the kmin argument value
>>     >>>> and
>>     >>>>> that
>>     >>>>>>> random number.
>>     >>>>>>>
>>     >>>>>>> When interp0 = 2, a random number is generated at initialization
>>     >>>> and
>>     >>>>>>> interpolation begins immediately between the ifirstval argument
>>     >>>>> value and
>>     >>>>>>> that random number.
>>     >>>>>>>
>>     >>>>>>>
>>     >>>>>>> This  way, we could have immediate interpolation and initial
>>     value
>>     >>>>> without
>>     >>>>>>> modifying older versions behavior. If you agree with this, I can
>>     >>>>> modify the
>>     >>>>>>> source files (opcodes/uggab.h and opcodes/uggab.c), test the
>>     >>>>> modifications
>>     >>>>>>> and send the files to Andrés for upload
>>     >>>>>>>
>>     >>>>>>> Regards
>>     >>>>>>>
>>     >>>>>>> François
>>     >>>>>>>
>>     >>>>>>>
>>     >>>>>>> 2011/1/27 peiman khosravi >     >
>>     >>>>>>>>
>>     >>>>>>>> Thanks!
>>     >>>>>>>>
>>     >>>>>>>> Yes I second Andres. I think the addition of both, an initial
>>     >>>> state
>>     >>>>>>>> and starting the interpolation immediately would be a big
>>     bonus.
>>     >>>>>>>>
>>     >>>>>>>> Best,
>>     >>>>>>>>
>>     >>>>>>>> Peiman
>>     >>>>>>>>
>>     >>>>>>>>
>>     >>>>>>>>
>>     >>>>>>>> On 27 January 2011 10:56, Andres Cabrera
>>     >
>>     >>>> wrote:
>>     >>>>>>>>> It might actually be a better solution to add an optional
>>     i-time
>>     >>>>>>>>> parameter which sets the initial state, or an option to enable
>>     >>>>>>>>> producing a random number from the start.
>>     >>>>>>>>>
>>     >>>>>>>>> Cheers,
>>     >>>>>>>>> Andres
>>     >>>>>>>>>
>>     >>>>>>>>> On Thu, Jan 27, 2011 at 10:42 AM, Francois PINOT <
>>     >>>> fggpinot@gmail.com >
>>     >>>>>>>>> wrote:
>>     >>>>>>>>>> Absolutely! I can add this paragraph to the "Performance"
>>     >>>> section
>>     >>>> of
>>     >>>>>>>>>> the
>>     >>>>>>>>>> manual entry for randomi:
>>     >>>>>>>>>>
>>     >>>>>>>>>> The kmin value is outputted for 1/kcps (resp. 1/acps) seconds
>>     >>>> at
>>     >>>> the
>>     >>>>>>>>>> beginning of the note, before the first random number is
>>     >>>> generated.
>>     >>>>>>>>>> Then the
>>     >>>>>>>>>> normal interpolation process takes place, first between kmin
>>     >>>> and
>>     >>>> the
>>     >>>>>>>>>> first
>>     >>>>>>>>>> random number generated, and then between successive
>>     generated
>>     >>>>> random
>>     >>>>>>>>>> numbers, each interpolation cycle having a duration of 1/kcps
>>     >>>> (resp.
>>     >>>>>>>>>> 1/acps)
>>     >>>>>>>>>> seconds.
>>     >>>>>>>>>>
>>     >>>>>>>>>> Is it OK?
>>     >>>>>>>>>>
>>     >>>>>>>>>> Francois
>>     >>>>>>>>>>
>>     >>>>>>>>>>
>>     >>>>>>>>>> 2011/1/27 peiman khosravi >     >
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> Thanks for the explaination Francois.
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> So just to clarify. The minimum value is always outputed for
>>     >>>> 1/kcps
>>     >>>>>>>>>>> seconds when the note is initialised? Is this because the
>>     >>>>> opcode uses
>>     >>>>>>>>>>> this time to generate the next random number that is
>>     >>>>> subsequently used
>>     >>>>>>>>>>> for the interpolation?
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> I think this should be in the manual as a kcps value of
>>     0.1 or
>>     >>>>>>>>>>> somthing like that means a long wait (10 seconds!). I guess
>>     >>>> the
>>     >>>>> trick
>>     >>>>>>>>>>> would be something like this:
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> kmult linseg 1000, 0.001, 1, p3, 1
>>     >>>>>>>>>>> kmorph2 randomi 0,1, 2*kmult
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> Best,
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> Peiman
>>     >>>>>>>>>>>
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> On 27 January 2011 08:18, Francois PINOT
>>     >
>>     >>>>> wrote:
>>     >>>>>>>>>>>> Hi Peiman,
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>> This is normal behavior: randomi is an interpolating
>>     opcode.
>>     >>>> That
>>     >>>>>>>>>>>> means
>>     >>>>>>>>>>>> that
>>     >>>>>>>>>>>> it will generate new random numbers at a rate of  kcps but,
>>     >>>>> during
>>     >>>>>>>>>>>> the
>>     >>>>>>>>>>>> 1/kcps sec separating two random numbers, it will output
>>     >>>>>>>>>>>> interpolated
>>     >>>>>>>>>>>> values. The first values in your example are always 0
>>     >>>> because
>>     >>>> the
>>     >>>>>>>>>>>> first
>>     >>>>>>>>>>>> interpolation is done between kmin (which is 0 in your
>>     >>>>> example)  and
>>     >>>>>>>>>>>> the
>>     >>>>>>>>>>>> first generated random value. By changing the value of
>>     kmin,
>>     >>>>> you'll
>>     >>>>>>>>>>>> get
>>     >>>>>>>>>>>> different starting values. Moreover, if you change the kcps
>>     >>>>> value,
>>     >>>>>>>>>>>> the
>>     >>>>>>>>>>>> number of fixed initial values will change accordingly.
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>> Hope this helps
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>> Francois
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>> 2011/1/27 peiman khosravi >     >
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> Can you try this one please Victor.
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>> -odac -d
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>> sr     = 96000
>>     >>>>>>>>>>>>> kr     = 16
>>     >>>>>>>>>>>>> nchnls = 1
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> seed 0
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>>      instr 1
>>     >>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> printk 0.1, kmorph2
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>>      endin
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>> i1 0 3600
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> On 26 January 2011 22:15, Victor Lazzarini
>>     >>>>>>>>>>>>> >     >
>>     >>>>>>>>>>>>> wrote:
>>     >>>>>>>>>>>>>> Not stuck here. 5.13 OSX 10.5
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>> i1 0.00000
>>     >>>>>>>>>>>>>> i1 0.11036
>>     >>>>>>>>>>>>>> i1 0.22072
>>     >>>>>>>>>>>>>> i1 0.33108
>>     >>>>>>>>>>>>>> i1 0.44144
>>     >>>>>>>>>>>>>> i1 0.55180
>>     >>>>>>>>>>>>>> i1 0.66215
>>     >>>>>>>>>>>>>> i1 0.77251
>>     >>>>>>>>>>>>>> i1 0.88287
>>     >>>>>>>>>>>>>> i1 0.80893
>>     >>>>>>>>>>>>>> i1 0.73499
>>     >>>>>>>>>>>>>> i1 0.66105
>>     >>>>>>>>>>>>>> i1 0.58711
>>     >>>>>>>>>>>>>> i1 0.51317
>>     >>>>>>>>>>>>>> i1 0.43922
>>     >>>>>>>>>>>>>> i1 0.36528
>>     >>>>>>>>>>>>>> i1 0.29134
>>     >>>>>>>>>>>>>> i1 0.37064
>>     >>>>>>>>>>>>>> i1 0.44993
>>     >>>>>>>>>>>>>> i1 0.52923
>>     >>>>>>>>>>>>>> i1 0.60853
>>     >>>>>>>>>>>>>> i1 0.68782
>>     >>>>>>>>>>>>>> i1 0.76712
>>     >>>>>>>>>>>>>> i1 0.84641
>>     >>>>>>>>>>>>>> i1 0.92571
>>     >>>>>>>>>>>>>> i1 0.82436
>>     >>>>>>>>>>>>>> i1 0.72301
>>     >>>>>>>>>>>>>> i1 0.62166
>>     >>>>>>>>>>>>>> i1 0.52031
>>     >>>>>>>>>>>>>> i1 0.41896
>>     >>>>>>>>>>>>>> i1 0.31761
>>     >>>>>>>>>>>>>> i1 0.21626
>>     >>>>>>>>>>>>>> i1 0.11491
>>     >>>>>>>>>>>>>> i1 0.10123
>>     >>>>>>>>>>>>>> i1 0.08756
>>     >>>>>>>>>>>>>> i1 0.07388
>>     >>>>>>>>>>>>>> i1 0.06021
>>     >>>>>>>>>>>>>> i1 0.04653
>>     >>>>>>>>>>>>>> i1 0.03286
>>     >>>>>>>>>>>>>> i1 0.01918
>>     >>>>>>>>>>>>>> i1 0.00551
>>     >>>>>>>>>>>>>> i1 0.06780
>>     >>>>>>>>>>>>>> i1 0.13008
>>     >>>>>>>>>>>>>> i1 0.19237
>>     >>>>>>>>>>>>>> i1 0.25466
>>     >>>>>>>>>>>>>> i1 0.31695
>>     >>>>>>>>>>>>>> i1 0.37924
>>     >>>>>>>>>>>>>> i1 0.44153
>>     >>>>>>>>>>>>>> i1 0.50381
>>     >>>>>>>>>>>>>> i1 0.51766
>>     >>>>>>>>>>>>>> i1 0.53150
>>     >>>>>>>>>>>>>> i1 0.54534
>>     >>>>>>>>>>>>>> i1 0.55919
>>     >>>>>>>>>>>>>> i1 0.57303
>>     >>>>>>>>>>>>>> i1 0.58687
>>     >>>>>>>>>>>>>> i1 0.60072
>>     >>>>>>>>>>>>>> On 26 Jan 2011, at 22:08, peiman khosravi wrote:
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>> yes 5.13. I used the universal installer.
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>> On 26 January 2011 22:05, joachim heintz
>>     >>>>> >
>>     >>>>>>>>>>>>>>> wrote:
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>> do you also use 5.13?
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>> Am 26.01.2011 11:36, schrieb peiman khosravi:
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>> I wonder if this is only happening with this opcode or
>>     >>>>> if it's
>>     >>>>>>>>>>>>>>>>> a
>>     >>>>>>>>>>>>>>>>> more
>>     >>>>>>>>>>>>>>>>> general OS X related issue to do with krate and
>>     >>>> timing.
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>> P
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>> On 26 January 2011 09:21, peiman khosravi
>>     >>>>>>>>>>>>>>>>> >     >
>>     >>>>>>>>>>>>>>>>> wrote:
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> Thanks Menno,
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> I am on OS X 10.6. Using this other csd bellow I get
>>     >>>> the
>>     >>>>>>>>>>>>>>>>>> following.
>>     >>>>>>>>>>>>>>>>>> The value remains on zero for .5 seconds every time.
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>  new alloc for instr 1:
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.06250:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.12500:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.25000:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.31250:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.43750:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.50000:     0.00000
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.62500:     0.08407
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.75000:     0.25222
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.81250:     0.33630
>>     >>>>>>>>>>>>>>>>>>  i   1 time     0.93750:     0.50445
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.00000:     0.58852
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.12500:     0.69159
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.25000:     0.72958
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.31250:     0.74858
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.43750:     0.78657
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.50000:     0.80556
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.62500:     0.78747
>>     >>>>>>>>>>>>>>>>>>  i   1 time     1.75000:     0.71329
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> Best,
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> Peiman
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>  
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>> -odac -d
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>> sr     = 96000
>>     >>>>>>>>>>>>>>>>>> kr     = 16
>>     >>>>>>>>>>>>>>>>>> nchnls = 1
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> seed 0
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>      instr 1
>>     >>>>>>>>>>>>>>>>>> kmorph2 randomi 0,1, 2
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> printk 0.1, kmorph2
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>      endin
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>> i1 0 3600
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> 
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>> On 26 January 2011 08:35, menno
>>     >
>>     >>>>> wrote:
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>> Hi Peiman,  FYI it does not get stuck here. I use
>>     >>>>>>>>>>>>>>>>>>> Csound5.13beta,
>>     >>>>>>>>>>>>>>>>>>> doubles
>>     >>>>>>>>>>>>>>>>>>> ,Ubuntu, 48kHz, Jack:
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>> new alloc for instr 1:
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00000
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00052
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00111
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00170
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00229
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00288
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00347
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00406
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00464
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00523
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00582
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00641
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00700
>>     >>>>>>>>>>>>>>>>>>>  i1     0.00759.....
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>> greetings
>>     >>>>>>>>>>>>>>>>>>> menno
>>     >>>>>>>>>>>>>>>>>>> --
>>     >>>>>>>>>>>>>>>>>>> View this message in context:
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>
>>     >>>>
>>     http://csound.1045644.n5.nabble.com/funny-randomi-issue-tp3356929p3357544.html
>>     >>>>>>>>>>>>>>>>>>> Sent from the Csound - General mailing list archive
>>     >>>> at
>>     >>>>>>>>>>>>>>>>>>> Nabble.com.
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>>>>>>>> To unsubscribe, send email
>>     sympa@lists.bath.ac.uk 
>>     >>>>> with body
>>     >>>>>>>>>>>>>>>>>>> "unsubscribe csound"
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with
>>     >>>> body
>>     >>>>>>>>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>>>>>>>> csound"
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>
>>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with
>>     >>>> body
>>     >>>>>>>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>>>>>>> csound"
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>>
>>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with
>>     >>>> body
>>     >>>>>>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>>>>>> csound"
>>     >>>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>
>>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with
>>     >>>> body
>>     >>>>>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>>>>> csound"
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>>
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>>
>>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body
>>     >>>>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>>>> csound"
>>     >>>>>>>>>>>>>
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>>
>>     >>>>>>>>>>>
>>     >>>>>>>>>>>
>>     >>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>>>
>>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body
>>     >>>>>>>>>>> "unsubscribe
>>     >>>>>>>>>>> csound"
>>     >>>>>>>>>>>
>>     >>>>>>>>>>
>>     >>>>>>>>>>
>>     >>>>>>>>>
>>     >>>>>>>>>
>>     >>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>>
>>     >>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body
>>     >>>>> "unsubscribe
>>     >>>>>>>>> csound"
>>     >>>>>>>>>
>>     >>>>>>>>>
>>     >>>>>>>>
>>     >>>>>>>>
>>     >>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>>>>
>>     >>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>>>> Discussions of bugs and features can be posted here
>>     >>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body
>>     >>>>> "unsubscribe
>>     >>>>>>>> csound"
>>     >>>>>>>>
>>     >>>>>>>
>>     >>>>>>>
>>     >>>>>>
>>     >>>>>>
>>     >>>>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>>>> Discussions of bugs and features can be posted here
>>     >>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body
>>     >>>>> "unsubscribe csound"
>>     >>>>>>
>>     >>>>
>>     >>>>
>>     >>>> Send bugs reports to the Sourceforge bug tracker
>>     >>>>
>>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>>> Discussions of bugs and features can be posted here
>>     >>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body "unsubscribe
>>     >>>> csound"
>>     >>>>
>>     >>>>
>>     >>>
>>     >>> Send bugs reports to the Sourceforge bug tracker
>>     >>>
>>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >>> Discussions of bugs and features can be posted here
>>     >>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body "unsubscribe
>>     >>> csound"
>>     >>>
>>     >>>
>>     >>
>>     >>
>>     >>
>>     >>
>>     >> Send bugs reports to the Sourceforge bug tracker
>>     >>
>>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     >> Discussions of bugs and features can be posted here
>>     >> To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body "unsubscribe csound"
>>     >>
>>     >>
>>     >
>>     >
>>     > Send bugs reports to the Sourceforge bug tracker
>>     >
>>     https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     > Discussions of bugs and features can be posted here
>>     > To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body "unsubscribe csound"
>>     >
>>     >
>>
>>
>>     Send bugs reports to the Sourceforge bug tracker
>>
>>      https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>     
>>     Discussions of bugs and features can be posted here
>>     To unsubscribe, send email sympa@lists.bath.ac.uk
>>      with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"