Csound Csound-dev Csound-tekno Search About

Music sources posted, and a revised convolver tool

Date2016-12-26 20:08
FromDave Seidel
SubjectMusic sources posted, and a revised convolver tool
Hi all,

I have posted the sources for two releases, Hexany Permutations and ~60 Hz, to GitHub. Eventually I hope to put more pieces up as well.


As well, I revised my simple convolution tool and moved it to here:

And finally, I have updated the yt-render script to version 1.1:

I hope the tools are useful for someone, and that the pieces may be of interest to other composers.

- Dave
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2016-12-27 11:19
FromAndrea Strappa
Subjecttimout cps init
Hi list,
In this csd test I expect to listen ifreq at the beginning, but I listen 
ifreq*igoldenr. Why?
What is the right way to listen ifreq at the beginning?
Andrea S.





;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5 ;-+rtmidi=mme
-odac



sr = 44100
kr = 4410
ksmps = 10
0dbfs = 1
nchnls = 2

instr 1
igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
         ;print igoldenr
idur        = .5
iamp        = p4
ifreq        = p5

kenv1        madsr .01, .01, iamp, 1

nextdur:
         timout 0, idur, makenote
         reinit nextdur
makenote:
         print idur
         print ifreq
         print iamp

kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
asig        poscil kenv2, ifreq
outs        asig*kenv1, asig*kenv1
idur        = idur * igoldenr
ifreq        = ifreq * igoldenr

if idur > 3 then
turnoff
endif

endin




;f0 z
i1 0 8 .4 220




Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-27 11:33
FromVictor Lazzarini
SubjectRe: timout cps init
ifreq is an i-time variable, so it will hold its last computed value when the instrument starts performing. If you want to change values during performance, use a k-rate variable.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 27 Dec 2016, at 11:20, Andrea Strappa  wrote:
> 
> Hi list,
> In this csd test I expect to listen ifreq at the beginning, but I listen ifreq*igoldenr. Why?
> What is the right way to listen ifreq at the beginning?
> Andrea S.
> 
> 
> 
> 
> 
> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5 ;-+rtmidi=mme
> -odac
> 
> 
> 
> sr = 44100
> kr = 4410
> ksmps = 10
> 0dbfs = 1
> nchnls = 2
> 
> instr 1
> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>        ;print igoldenr
> idur        = .5
> iamp        = p4
> ifreq        = p5
> 
> kenv1        madsr .01, .01, iamp, 1
> 
> nextdur:
>        timout 0, idur, makenote
>        reinit nextdur
> makenote:
>        print idur
>        print ifreq
>        print iamp
> 
> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
> asig        poscil kenv2, ifreq
> outs        asig*kenv1, asig*kenv1
> idur        = idur * igoldenr
> ifreq        = ifreq * igoldenr
> 
> if idur > 3 then
> turnoff
> endif
> 
> endin
> 
> 
> 
> 
> ;f0 z
> i1 0 8 .4 220
> 
> 
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-27 14:32
FromAndrea Strappa
SubjectRe: timout cps init
Thank you for  replay, Victor.

The "print" opcode shows that ifreq values change correctly:

SECTION 1:
new alloc for instr 1:
instr 1:  idur = 0.500
instr 1:  ifreq = 220.000
instr 1:  iamp = 0.400
instr 1:  idur = 0.809
instr 1:  ifreq = 355.967
instr 1:  iamp = 0.400
instr 1:  idur = 1.309
instr 1:  ifreq = 575.967
instr 1:  iamp = 0.400
instr 1:  idur = 2.118
instr 1:  ifreq = 931.935
instr 1:  iamp = 0.400
B  0.000 ..  8.000 T  8.000 TT  8.000 M:  0.04000  0.04000

but the the first freq that I listen is 355.967, not 220.000. Only the 
first ifreq is jamped.

The first duration is correct.



Il 27/12/2016 12:33, Victor Lazzarini ha scritto:
> ifreq is an i-time variable, so it will hold its last computed value when the instrument starts performing. If you want to change values during performance, use a k-rate variable.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 27 Dec 2016, at 11:20, Andrea Strappa  wrote:
>>
>> Hi list,
>> In this csd test I expect to listen ifreq at the beginning, but I listen ifreq*igoldenr. Why?
>> What is the right way to listen ifreq at the beginning?
>> Andrea S.
>>
>>
>> 
>>
>> 
>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5 ;-+rtmidi=mme
>> -odac
>> 
>>
>> 
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> 0dbfs = 1
>> nchnls = 2
>>
>> instr 1
>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>         ;print igoldenr
>> idur        = .5
>> iamp        = p4
>> ifreq        = p5
>>
>> kenv1        madsr .01, .01, iamp, 1
>>
>> nextdur:
>>         timout 0, idur, makenote
>>         reinit nextdur
>> makenote:
>>         print idur
>>         print ifreq
>>         print iamp
>>
>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>> asig        poscil kenv2, ifreq
>> outs        asig*kenv1, asig*kenv1
>> idur        = idur * igoldenr
>> ifreq        = ifreq * igoldenr
>>
>> if idur > 3 then
>> turnoff
>> endif
>>
>> endin
>>
>> 
>>
>> 
>> ;f0 z
>> i1 0 8 .4 220
>> 
>>
>> 
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-27 15:00
FromVictor Lazzarini
SubjectRe: timout cps init
They change, but at init time, not perf time.
print runs at init time, not perf time.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 27 Dec 2016, at 14:32, Andrea Strappa  wrote:
> 
> Thank you for  replay, Victor.
> 
> The "print" opcode shows that ifreq values change correctly:
> 
> SECTION 1:
> new alloc for instr 1:
> instr 1:  idur = 0.500
> instr 1:  ifreq = 220.000
> instr 1:  iamp = 0.400
> instr 1:  idur = 0.809
> instr 1:  ifreq = 355.967
> instr 1:  iamp = 0.400
> instr 1:  idur = 1.309
> instr 1:  ifreq = 575.967
> instr 1:  iamp = 0.400
> instr 1:  idur = 2.118
> instr 1:  ifreq = 931.935
> instr 1:  iamp = 0.400
> B  0.000 ..  8.000 T  8.000 TT  8.000 M:  0.04000  0.04000
> 
> but the the first freq that I listen is 355.967, not 220.000. Only the first ifreq is jamped.
> 
> The first duration is correct.
> 
> 
> 
> Il 27/12/2016 12:33, Victor Lazzarini ha scritto:
>> ifreq is an i-time variable, so it will hold its last computed value when the instrument starts performing. If you want to change values during performance, use a k-rate variable.
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 27 Dec 2016, at 11:20, Andrea Strappa  wrote:
>>> 
>>> Hi list,
>>> In this csd test I expect to listen ifreq at the beginning, but I listen ifreq*igoldenr. Why?
>>> What is the right way to listen ifreq at the beginning?
>>> Andrea S.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5 ;-+rtmidi=mme
>>> -odac
>>> 
>>> 
>>> 
>>> sr = 44100
>>> kr = 4410
>>> ksmps = 10
>>> 0dbfs = 1
>>> nchnls = 2
>>> 
>>> instr 1
>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>        ;print igoldenr
>>> idur        = .5
>>> iamp        = p4
>>> ifreq        = p5
>>> 
>>> kenv1        madsr .01, .01, iamp, 1
>>> 
>>> nextdur:
>>>        timout 0, idur, makenote
>>>        reinit nextdur
>>> makenote:
>>>        print idur
>>>        print ifreq
>>>        print iamp
>>> 
>>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>> asig        poscil kenv2, ifreq
>>> outs        asig*kenv1, asig*kenv1
>>> idur        = idur * igoldenr
>>> ifreq        = ifreq * igoldenr
>>> 
>>> if idur > 3 then
>>> turnoff
>>> endif
>>> 
>>> endin
>>> 
>>> 
>>> 
>>> 
>>> ;f0 z
>>> i1 0 8 .4 220
>>> 
>>> 
>>> 
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-27 20:59
Fromjoachim heintz
SubjectRe: timout cps init
hi andrea -

as far as i understand, the ifreq which has been printed out is not used 
by the first timout cycle, because it has been set by the statement 
ifreq = ifreq * igoldenr to a new value which is then used by the 
oscillator.  this is probably what victor means, too.

i must say that i find the syntax of timout very obscur and would 
recommend another way of programming.  i think what you want is: to 
start one note with a certain duration and frequency, and apply the 
igoldenr for both for the next note, and so on, until a certain duration 
has passed.

so actually you play one note, and from inside this instrument, you call 
the next instance with the new duration and frequency, as long as the 
condition for the duration is satisfied.

you can do this straightforward in csound with schedule (or event_i). 
below is an example code, which i believe is clearer than the usage of 
timout.

best -
	joachim

instr 1
igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
istart      = p2
idur        = p3
iamp        = p4
ifreq       = p5
imaxdur     = 3
print istart, idur, ifreq

if idur > imaxdur then
  turnoff
else
  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
endif

kenv1       madsr .01, .01, iamp, 1
kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
asig        poscil kenv2, ifreq
outs        asig*kenv1, asig*kenv1

endin
schedule(1, 0, .5, .4, 220)



On 27/12/16 12:19, Andrea Strappa wrote:
> Hi list,
> In this csd test I expect to listen ifreq at the beginning, but I listen
> ifreq*igoldenr. Why?
> What is the right way to listen ifreq at the beginning?
> Andrea S.
>
>
> 
>
> 
> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
> ;-+rtmidi=mme
> -odac
> 
>
> 
> sr = 44100
> kr = 4410
> ksmps = 10
> 0dbfs = 1
> nchnls = 2
>
> instr 1
> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>         ;print igoldenr
> idur        = .5
> iamp        = p4
> ifreq        = p5
>
> kenv1        madsr .01, .01, iamp, 1
>
> nextdur:
>         timout 0, idur, makenote
>         reinit nextdur
> makenote:
>         print idur
>         print ifreq
>         print iamp
>
> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
> asig        poscil kenv2, ifreq
> outs        asig*kenv1, asig*kenv1
> idur        = idur * igoldenr
> ifreq        = ifreq * igoldenr
>
> if idur > 3 then
> turnoff
> endif
>
> endin
>
> 
>
> 
> ;f0 z
> i1 0 8 .4 220
> 
>
> 
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-27 21:09
FromAndrea Strappa
SubjectRe: timout cps init
Thank you very much, Joachim, i'll study your solution.

Just now I found a solution with a conditional branch:

if ifollowingdur = initialdur goto next
ifreq        = ifreq * igoldenr
next:

this is the complete .csd:




-odac -M0 -B4096 -b400 --midi-velocity-amp=4  --midi-key-cps=5 ;-+rtmidi=mme
;-odac



sr = 44100
kr = 4410
ksmps = 10
0dbfs = 1
nchnls = 2

instr 1
igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
         ;print igoldenr
initialdur    = .5
ifollowingdur    = initialdur
iamp        = p4
;iamp        ampmidi .3
ifreq        = p5
;ifreq        cpsmidi

kenv1        madsr .01, .01, iamp, 1

nextdur:

         timout 0, ifollowingdur, makenote

         reinit nextdur

makenote:
         print ifollowingdur
         print ifreq
         ;print iamp

kenv2        linseg 0, ifollowingdur*.1, .1, ifollowingdur*.8, .1, 
ifollowingdur*.1, 0
asig        poscil kenv2, ifreq
outs        asig*kenv1, asig*kenv1


         if ifollowingdur = initialdur goto next
ifreq        = ifreq * igoldenr
next:
ifollowingdur    = ifollowingdur * igoldenr

if ifollowingdur > 3 then
turnoff
endif

endin




;f0 z
i1 0 8 .4 220






Il 27/12/2016 21:59, joachim heintz ha scritto:
> hi andrea -
>
> as far as i understand, the ifreq which has been printed out is not 
> used by the first timout cycle, because it has been set by the 
> statement ifreq = ifreq * igoldenr to a new value which is then used 
> by the oscillator.  this is probably what victor means, too.
>
> i must say that i find the syntax of timout very obscur and would 
> recommend another way of programming.  i think what you want is: to 
> start one note with a certain duration and frequency, and apply the 
> igoldenr for both for the next note, and so on, until a certain 
> duration has passed.
>
> so actually you play one note, and from inside this instrument, you 
> call the next instance with the new duration and frequency, as long as 
> the condition for the duration is satisfied.
>
> you can do this straightforward in csound with schedule (or event_i). 
> below is an example code, which i believe is clearer than the usage of 
> timout.
>
> best -
>     joachim
>
> instr 1
> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
> istart      = p2
> idur        = p3
> iamp        = p4
> ifreq       = p5
> imaxdur     = 3
> print istart, idur, ifreq
>
> if idur > imaxdur then
>  turnoff
> else
>  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
> endif
>
> kenv1       madsr .01, .01, iamp, 1
> kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
> asig        poscil kenv2, ifreq
> outs        asig*kenv1, asig*kenv1
>
> endin
> schedule(1, 0, .5, .4, 220)
>
>
>
> On 27/12/16 12:19, Andrea Strappa wrote:
>> Hi list,
>> In this csd test I expect to listen ifreq at the beginning, but I listen
>> ifreq*igoldenr. Why?
>> What is the right way to listen ifreq at the beginning?
>> Andrea S.
>>
>>
>> 
>>
>> 
>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>> ;-+rtmidi=mme
>> -odac
>> 
>>
>> 
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> 0dbfs = 1
>> nchnls = 2
>>
>> instr 1
>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>         ;print igoldenr
>> idur        = .5
>> iamp        = p4
>> ifreq        = p5
>>
>> kenv1        madsr .01, .01, iamp, 1
>>
>> nextdur:
>>         timout 0, idur, makenote
>>         reinit nextdur
>> makenote:
>>         print idur
>>         print ifreq
>>         print iamp
>>
>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>> asig        poscil kenv2, ifreq
>> outs        asig*kenv1, asig*kenv1
>> idur        = idur * igoldenr
>> ifreq        = ifreq * igoldenr
>>
>> if idur > 3 then
>> turnoff
>> endif
>>
>> endin
>>
>> 
>>
>> 
>> ;f0 z
>> i1 0 8 .4 220
>> 
>>
>> 
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-28 21:39
FromAndrea Strappa
SubjectRe: timout cps init
Attachmentsschedule_06.csd  schedule_06b.csd  sezione_aurea_06.csd  
I worked on 'schedule'. I found a way for rtmidi with 'pset' opcode. But:

If I play many notes I listen some drops and I cannot turnoff the 
instrument upper a frequency threshold (two file attached).

With 'timout' opcode I found a well working solution (third file 
attached), whitout drops and with working freq threshold.

Andrea S.



Il 27/12/2016 22:09, Andrea Strappa ha scritto:
> Thank you very much, Joachim, i'll study your solution.
>
> Just now I found a solution with a conditional branch:
>
> if ifollowingdur = initialdur goto next
> ifreq        = ifreq * igoldenr
> next:
>
> this is the complete .csd:
>
> 
>
> 
> -odac -M0 -B4096 -b400 --midi-velocity-amp=4  --midi-key-cps=5 
> ;-+rtmidi=mme
> ;-odac
> 
>
> 
> sr = 44100
> kr = 4410
> ksmps = 10
> 0dbfs = 1
> nchnls = 2
>
> instr 1
> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>         ;print igoldenr
> initialdur    = .5
> ifollowingdur    = initialdur
> iamp        = p4
> ;iamp        ampmidi .3
> ifreq        = p5
> ;ifreq        cpsmidi
>
> kenv1        madsr .01, .01, iamp, 1
>
> nextdur:
>
>         timout 0, ifollowingdur, makenote
>
>         reinit nextdur
>
> makenote:
>         print ifollowingdur
>         print ifreq
>         ;print iamp
>
> kenv2        linseg 0, ifollowingdur*.1, .1, ifollowingdur*.8, .1, 
> ifollowingdur*.1, 0
> asig        poscil kenv2, ifreq
> outs        asig*kenv1, asig*kenv1
>
>
>         if ifollowingdur = initialdur goto next
> ifreq        = ifreq * igoldenr
> next:
> ifollowingdur    = ifollowingdur * igoldenr
>
> if ifollowingdur > 3 then
> turnoff
> endif
>
> endin
>
> 
>
> 
> ;f0 z
> i1 0 8 .4 220
> 
>
> 
>
>
>
> Il 27/12/2016 21:59, joachim heintz ha scritto:
>> hi andrea -
>>
>> as far as i understand, the ifreq which has been printed out is not 
>> used by the first timout cycle, because it has been set by the 
>> statement ifreq = ifreq * igoldenr to a new value which is then used 
>> by the oscillator.  this is probably what victor means, too.
>>
>> i must say that i find the syntax of timout very obscur and would 
>> recommend another way of programming.  i think what you want is: to 
>> start one note with a certain duration and frequency, and apply the 
>> igoldenr for both for the next note, and so on, until a certain 
>> duration has passed.
>>
>> so actually you play one note, and from inside this instrument, you 
>> call the next instance with the new duration and frequency, as long 
>> as the condition for the duration is satisfied.
>>
>> you can do this straightforward in csound with schedule (or event_i). 
>> below is an example code, which i believe is clearer than the usage 
>> of timout.
>>
>> best -
>>     joachim
>>
>> instr 1
>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>> istart      = p2
>> idur        = p3
>> iamp        = p4
>> ifreq       = p5
>> imaxdur     = 3
>> print istart, idur, ifreq
>>
>> if idur > imaxdur then
>>  turnoff
>> else
>>  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
>> endif
>>
>> kenv1       madsr .01, .01, iamp, 1
>> kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>> asig        poscil kenv2, ifreq
>> outs        asig*kenv1, asig*kenv1
>>
>> endin
>> schedule(1, 0, .5, .4, 220)
>>
>>
>>
>> On 27/12/16 12:19, Andrea Strappa wrote:
>>> Hi list,
>>> In this csd test I expect to listen ifreq at the beginning, but I 
>>> listen
>>> ifreq*igoldenr. Why?
>>> What is the right way to listen ifreq at the beginning?
>>> Andrea S.
>>>
>>>
>>> 
>>>
>>> 
>>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>>> ;-+rtmidi=mme
>>> -odac
>>> 
>>>
>>> 
>>> sr = 44100
>>> kr = 4410
>>> ksmps = 10
>>> 0dbfs = 1
>>> nchnls = 2
>>>
>>> instr 1
>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>         ;print igoldenr
>>> idur        = .5
>>> iamp        = p4
>>> ifreq        = p5
>>>
>>> kenv1        madsr .01, .01, iamp, 1
>>>
>>> nextdur:
>>>         timout 0, idur, makenote
>>>         reinit nextdur
>>> makenote:
>>>         print idur
>>>         print ifreq
>>>         print iamp
>>>
>>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>> asig        poscil kenv2, ifreq
>>> outs        asig*kenv1, asig*kenv1
>>> idur        = idur * igoldenr
>>> ifreq        = ifreq * igoldenr
>>>
>>> if idur > 3 then
>>> turnoff
>>> endif
>>>
>>> endin
>>>
>>> 
>>>
>>> 
>>> ;f0 z
>>> i1 0 8 .4 220
>>> 
>>>
>>> 
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-29 15:48
FromAndrea Strappa
SubjectRe: timout cps init
to complete my last message...  which is my error when I use 'schedule' 
in midi real time?

Or... there's a good example about 'schedule' with midi real time and 
reinit pass?

Greetings

Andrea S.


Il 28/12/2016 22:39, Andrea Strappa ha scritto:
> I worked on 'schedule'. I found a way for rtmidi with 'pset' opcode. But:
>
> If I play many notes I listen some drops and I cannot turnoff the 
> instrument upper a frequency threshold (two file attached).
>
> With 'timout' opcode I found a well working solution (third file 
> attached), whitout drops and with working freq threshold.
>
> Andrea S.
>
>
>
> Il 27/12/2016 22:09, Andrea Strappa ha scritto:
>> Thank you very much, Joachim, i'll study your solution.
>>
>> Just now I found a solution with a conditional branch:
>>
>> if ifollowingdur = initialdur goto next
>> ifreq        = ifreq * igoldenr
>> next:
>>
>> this is the complete .csd:
>>
>> 
>>
>> 
>> -odac -M0 -B4096 -b400 --midi-velocity-amp=4  --midi-key-cps=5 
>> ;-+rtmidi=mme
>> ;-odac
>> 
>>
>> 
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> 0dbfs = 1
>> nchnls = 2
>>
>> instr 1
>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>         ;print igoldenr
>> initialdur    = .5
>> ifollowingdur    = initialdur
>> iamp        = p4
>> ;iamp        ampmidi .3
>> ifreq        = p5
>> ;ifreq        cpsmidi
>>
>> kenv1        madsr .01, .01, iamp, 1
>>
>> nextdur:
>>
>>         timout 0, ifollowingdur, makenote
>>
>>         reinit nextdur
>>
>> makenote:
>>         print ifollowingdur
>>         print ifreq
>>         ;print iamp
>>
>> kenv2        linseg 0, ifollowingdur*.1, .1, ifollowingdur*.8, .1, 
>> ifollowingdur*.1, 0
>> asig        poscil kenv2, ifreq
>> outs        asig*kenv1, asig*kenv1
>>
>>
>>         if ifollowingdur = initialdur goto next
>> ifreq        = ifreq * igoldenr
>> next:
>> ifollowingdur    = ifollowingdur * igoldenr
>>
>> if ifollowingdur > 3 then
>> turnoff
>> endif
>>
>> endin
>>
>> 
>>
>> 
>> ;f0 z
>> i1 0 8 .4 220
>> 
>>
>> 
>>
>>
>>
>> Il 27/12/2016 21:59, joachim heintz ha scritto:
>>> hi andrea -
>>>
>>> as far as i understand, the ifreq which has been printed out is not 
>>> used by the first timout cycle, because it has been set by the 
>>> statement ifreq = ifreq * igoldenr to a new value which is then used 
>>> by the oscillator.  this is probably what victor means, too.
>>>
>>> i must say that i find the syntax of timout very obscur and would 
>>> recommend another way of programming.  i think what you want is: to 
>>> start one note with a certain duration and frequency, and apply the 
>>> igoldenr for both for the next note, and so on, until a certain 
>>> duration has passed.
>>>
>>> so actually you play one note, and from inside this instrument, you 
>>> call the next instance with the new duration and frequency, as long 
>>> as the condition for the duration is satisfied.
>>>
>>> you can do this straightforward in csound with schedule (or 
>>> event_i). below is an example code, which i believe is clearer than 
>>> the usage of timout.
>>>
>>> best -
>>>     joachim
>>>
>>> instr 1
>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>> istart      = p2
>>> idur        = p3
>>> iamp        = p4
>>> ifreq       = p5
>>> imaxdur     = 3
>>> print istart, idur, ifreq
>>>
>>> if idur > imaxdur then
>>>  turnoff
>>> else
>>>  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
>>> endif
>>>
>>> kenv1       madsr .01, .01, iamp, 1
>>> kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>> asig        poscil kenv2, ifreq
>>> outs        asig*kenv1, asig*kenv1
>>>
>>> endin
>>> schedule(1, 0, .5, .4, 220)
>>>
>>>
>>>
>>> On 27/12/16 12:19, Andrea Strappa wrote:
>>>> Hi list,
>>>> In this csd test I expect to listen ifreq at the beginning, but I 
>>>> listen
>>>> ifreq*igoldenr. Why?
>>>> What is the right way to listen ifreq at the beginning?
>>>> Andrea S.
>>>>
>>>>
>>>> 
>>>>
>>>> 
>>>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>>>> ;-+rtmidi=mme
>>>> -odac
>>>> 
>>>>
>>>> 
>>>> sr = 44100
>>>> kr = 4410
>>>> ksmps = 10
>>>> 0dbfs = 1
>>>> nchnls = 2
>>>>
>>>> instr 1
>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>>         ;print igoldenr
>>>> idur        = .5
>>>> iamp        = p4
>>>> ifreq        = p5
>>>>
>>>> kenv1        madsr .01, .01, iamp, 1
>>>>
>>>> nextdur:
>>>>         timout 0, idur, makenote
>>>>         reinit nextdur
>>>> makenote:
>>>>         print idur
>>>>         print ifreq
>>>>         print iamp
>>>>
>>>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>>> asig        poscil kenv2, ifreq
>>>> outs        asig*kenv1, asig*kenv1
>>>> idur        = idur * igoldenr
>>>> ifreq        = ifreq * igoldenr
>>>>
>>>> if idur > 3 then
>>>> turnoff
>>>> endif
>>>>
>>>> endin
>>>>
>>>> 
>>>>
>>>> 
>>>> ;f0 z
>>>> i1 0 8 .4 220
>>>> 
>>>>
>>>> 
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-29 22:00
Fromjoachim heintz
SubjectRe: timout cps init
well, i did not know you wanted to work with midi real time input.  if 
it then works for you with timout adjusted, it' s all good.

actually, a real time midi note-on message has the same effect as 
schedule: it turns one instance of an instrument on.  but of course you 
don't know about your p3 duration; this is the main difference.

	joachim


On 29/12/16 16:48, Andrea Strappa wrote:
> to complete my last message...  which is my error when I use 'schedule'
> in midi real time?
>
> Or... there's a good example about 'schedule' with midi real time and
> reinit pass?
>
> Greetings
>
> Andrea S.
>
>
> Il 28/12/2016 22:39, Andrea Strappa ha scritto:
>> I worked on 'schedule'. I found a way for rtmidi with 'pset' opcode. But:
>>
>> If I play many notes I listen some drops and I cannot turnoff the
>> instrument upper a frequency threshold (two file attached).
>>
>> With 'timout' opcode I found a well working solution (third file
>> attached), whitout drops and with working freq threshold.
>>
>> Andrea S.
>>
>>
>>
>> Il 27/12/2016 22:09, Andrea Strappa ha scritto:
>>> Thank you very much, Joachim, i'll study your solution.
>>>
>>> Just now I found a solution with a conditional branch:
>>>
>>> if ifollowingdur = initialdur goto next
>>> ifreq        = ifreq * igoldenr
>>> next:
>>>
>>> this is the complete .csd:
>>>
>>> 
>>>
>>> 
>>> -odac -M0 -B4096 -b400 --midi-velocity-amp=4  --midi-key-cps=5
>>> ;-+rtmidi=mme
>>> ;-odac
>>> 
>>>
>>> 
>>> sr = 44100
>>> kr = 4410
>>> ksmps = 10
>>> 0dbfs = 1
>>> nchnls = 2
>>>
>>> instr 1
>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>         ;print igoldenr
>>> initialdur    = .5
>>> ifollowingdur    = initialdur
>>> iamp        = p4
>>> ;iamp        ampmidi .3
>>> ifreq        = p5
>>> ;ifreq        cpsmidi
>>>
>>> kenv1        madsr .01, .01, iamp, 1
>>>
>>> nextdur:
>>>
>>>         timout 0, ifollowingdur, makenote
>>>
>>>         reinit nextdur
>>>
>>> makenote:
>>>         print ifollowingdur
>>>         print ifreq
>>>         ;print iamp
>>>
>>> kenv2        linseg 0, ifollowingdur*.1, .1, ifollowingdur*.8, .1,
>>> ifollowingdur*.1, 0
>>> asig        poscil kenv2, ifreq
>>> outs        asig*kenv1, asig*kenv1
>>>
>>>
>>>         if ifollowingdur = initialdur goto next
>>> ifreq        = ifreq * igoldenr
>>> next:
>>> ifollowingdur    = ifollowingdur * igoldenr
>>>
>>> if ifollowingdur > 3 then
>>> turnoff
>>> endif
>>>
>>> endin
>>>
>>> 
>>>
>>> 
>>> ;f0 z
>>> i1 0 8 .4 220
>>> 
>>>
>>> 
>>>
>>>
>>>
>>> Il 27/12/2016 21:59, joachim heintz ha scritto:
>>>> hi andrea -
>>>>
>>>> as far as i understand, the ifreq which has been printed out is not
>>>> used by the first timout cycle, because it has been set by the
>>>> statement ifreq = ifreq * igoldenr to a new value which is then used
>>>> by the oscillator.  this is probably what victor means, too.
>>>>
>>>> i must say that i find the syntax of timout very obscur and would
>>>> recommend another way of programming.  i think what you want is: to
>>>> start one note with a certain duration and frequency, and apply the
>>>> igoldenr for both for the next note, and so on, until a certain
>>>> duration has passed.
>>>>
>>>> so actually you play one note, and from inside this instrument, you
>>>> call the next instance with the new duration and frequency, as long
>>>> as the condition for the duration is satisfied.
>>>>
>>>> you can do this straightforward in csound with schedule (or
>>>> event_i). below is an example code, which i believe is clearer than
>>>> the usage of timout.
>>>>
>>>> best -
>>>>     joachim
>>>>
>>>> instr 1
>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>> istart      = p2
>>>> idur        = p3
>>>> iamp        = p4
>>>> ifreq       = p5
>>>> imaxdur     = 3
>>>> print istart, idur, ifreq
>>>>
>>>> if idur > imaxdur then
>>>>  turnoff
>>>> else
>>>>  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
>>>> endif
>>>>
>>>> kenv1       madsr .01, .01, iamp, 1
>>>> kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>>> asig        poscil kenv2, ifreq
>>>> outs        asig*kenv1, asig*kenv1
>>>>
>>>> endin
>>>> schedule(1, 0, .5, .4, 220)
>>>>
>>>>
>>>>
>>>> On 27/12/16 12:19, Andrea Strappa wrote:
>>>>> Hi list,
>>>>> In this csd test I expect to listen ifreq at the beginning, but I
>>>>> listen
>>>>> ifreq*igoldenr. Why?
>>>>> What is the right way to listen ifreq at the beginning?
>>>>> Andrea S.
>>>>>
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>>>>> ;-+rtmidi=mme
>>>>> -odac
>>>>> 
>>>>>
>>>>> 
>>>>> sr = 44100
>>>>> kr = 4410
>>>>> ksmps = 10
>>>>> 0dbfs = 1
>>>>> nchnls = 2
>>>>>
>>>>> instr 1
>>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>>>         ;print igoldenr
>>>>> idur        = .5
>>>>> iamp        = p4
>>>>> ifreq        = p5
>>>>>
>>>>> kenv1        madsr .01, .01, iamp, 1
>>>>>
>>>>> nextdur:
>>>>>         timout 0, idur, makenote
>>>>>         reinit nextdur
>>>>> makenote:
>>>>>         print idur
>>>>>         print ifreq
>>>>>         print iamp
>>>>>
>>>>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>>>> asig        poscil kenv2, ifreq
>>>>> outs        asig*kenv1, asig*kenv1
>>>>> idur        = idur * igoldenr
>>>>> ifreq        = ifreq * igoldenr
>>>>>
>>>>> if idur > 3 then
>>>>> turnoff
>>>>> endif
>>>>>
>>>>> endin
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>> ;f0 z
>>>>> i1 0 8 .4 220
>>>>> 
>>>>>
>>>>> 
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-12-29 22:30
FromAndrea Strappa
SubjectRe: timout cps init
Thank you, Joachim. Yes, in real time p3 is the main question to solve 
for 'schedule'.

But your version with this opcode is excellent with score instruction.

Greetings

Andrea S.


Il 29/12/2016 23:00, joachim heintz ha scritto:
> well, i did not know you wanted to work with midi real time input.  if 
> it then works for you with timout adjusted, it' s all good.
>
> actually, a real time midi note-on message has the same effect as 
> schedule: it turns one instance of an instrument on.  but of course 
> you don't know about your p3 duration; this is the main difference.
>
>     joachim
>
>
> On 29/12/16 16:48, Andrea Strappa wrote:
>> to complete my last message...  which is my error when I use 'schedule'
>> in midi real time?
>>
>> Or... there's a good example about 'schedule' with midi real time and
>> reinit pass?
>>
>> Greetings
>>
>> Andrea S.
>>
>>
>> Il 28/12/2016 22:39, Andrea Strappa ha scritto:
>>> I worked on 'schedule'. I found a way for rtmidi with 'pset' opcode. 
>>> But:
>>>
>>> If I play many notes I listen some drops and I cannot turnoff the
>>> instrument upper a frequency threshold (two file attached).
>>>
>>> With 'timout' opcode I found a well working solution (third file
>>> attached), whitout drops and with working freq threshold.
>>>
>>> Andrea S.
>>>
>>>
>>>
>>> Il 27/12/2016 22:09, Andrea Strappa ha scritto:
>>>> Thank you very much, Joachim, i'll study your solution.
>>>>
>>>> Just now I found a solution with a conditional branch:
>>>>
>>>> if ifollowingdur = initialdur goto next
>>>> ifreq        = ifreq * igoldenr
>>>> next:
>>>>
>>>> this is the complete .csd:
>>>>
>>>> 
>>>>
>>>> 
>>>> -odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>>>> ;-+rtmidi=mme
>>>> ;-odac
>>>> 
>>>>
>>>> 
>>>> sr = 44100
>>>> kr = 4410
>>>> ksmps = 10
>>>> 0dbfs = 1
>>>> nchnls = 2
>>>>
>>>> instr 1
>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>>         ;print igoldenr
>>>> initialdur    = .5
>>>> ifollowingdur    = initialdur
>>>> iamp        = p4
>>>> ;iamp        ampmidi .3
>>>> ifreq        = p5
>>>> ;ifreq        cpsmidi
>>>>
>>>> kenv1        madsr .01, .01, iamp, 1
>>>>
>>>> nextdur:
>>>>
>>>>         timout 0, ifollowingdur, makenote
>>>>
>>>>         reinit nextdur
>>>>
>>>> makenote:
>>>>         print ifollowingdur
>>>>         print ifreq
>>>>         ;print iamp
>>>>
>>>> kenv2        linseg 0, ifollowingdur*.1, .1, ifollowingdur*.8, .1,
>>>> ifollowingdur*.1, 0
>>>> asig        poscil kenv2, ifreq
>>>> outs        asig*kenv1, asig*kenv1
>>>>
>>>>
>>>>         if ifollowingdur = initialdur goto next
>>>> ifreq        = ifreq * igoldenr
>>>> next:
>>>> ifollowingdur    = ifollowingdur * igoldenr
>>>>
>>>> if ifollowingdur > 3 then
>>>> turnoff
>>>> endif
>>>>
>>>> endin
>>>>
>>>> 
>>>>
>>>> 
>>>> ;f0 z
>>>> i1 0 8 .4 220
>>>> 
>>>>
>>>> 
>>>>
>>>>
>>>>
>>>> Il 27/12/2016 21:59, joachim heintz ha scritto:
>>>>> hi andrea -
>>>>>
>>>>> as far as i understand, the ifreq which has been printed out is not
>>>>> used by the first timout cycle, because it has been set by the
>>>>> statement ifreq = ifreq * igoldenr to a new value which is then used
>>>>> by the oscillator.  this is probably what victor means, too.
>>>>>
>>>>> i must say that i find the syntax of timout very obscur and would
>>>>> recommend another way of programming.  i think what you want is: to
>>>>> start one note with a certain duration and frequency, and apply the
>>>>> igoldenr for both for the next note, and so on, until a certain
>>>>> duration has passed.
>>>>>
>>>>> so actually you play one note, and from inside this instrument, you
>>>>> call the next instance with the new duration and frequency, as long
>>>>> as the condition for the duration is satisfied.
>>>>>
>>>>> you can do this straightforward in csound with schedule (or
>>>>> event_i). below is an example code, which i believe is clearer than
>>>>> the usage of timout.
>>>>>
>>>>> best -
>>>>>     joachim
>>>>>
>>>>> instr 1
>>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>>> istart      = p2
>>>>> idur        = p3
>>>>> iamp        = p4
>>>>> ifreq       = p5
>>>>> imaxdur     = 3
>>>>> print istart, idur, ifreq
>>>>>
>>>>> if idur > imaxdur then
>>>>>  turnoff
>>>>> else
>>>>>  schedule 1, idur, idur*igoldenr, iamp, ifreq*igoldenr
>>>>> endif
>>>>>
>>>>> kenv1       madsr .01, .01, iamp, 1
>>>>> kenv2       linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>>>> asig        poscil kenv2, ifreq
>>>>> outs        asig*kenv1, asig*kenv1
>>>>>
>>>>> endin
>>>>> schedule(1, 0, .5, .4, 220)
>>>>>
>>>>>
>>>>>
>>>>> On 27/12/16 12:19, Andrea Strappa wrote:
>>>>>> Hi list,
>>>>>> In this csd test I expect to listen ifreq at the beginning, but I
>>>>>> listen
>>>>>> ifreq*igoldenr. Why?
>>>>>> What is the right way to listen ifreq at the beginning?
>>>>>> Andrea S.
>>>>>>
>>>>>>
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> ;-odac -M0 -B4096 -b400 --midi-velocity-amp=4 --midi-key-cps=5
>>>>>> ;-+rtmidi=mme
>>>>>> -odac
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> sr = 44100
>>>>>> kr = 4410
>>>>>> ksmps = 10
>>>>>> 0dbfs = 1
>>>>>> nchnls = 2
>>>>>>
>>>>>> instr 1
>>>>>> igoldenr    = (1 + sqrt(5))/2    ;phi (golden ratio)
>>>>>>         ;print igoldenr
>>>>>> idur        = .5
>>>>>> iamp        = p4
>>>>>> ifreq        = p5
>>>>>>
>>>>>> kenv1        madsr .01, .01, iamp, 1
>>>>>>
>>>>>> nextdur:
>>>>>>         timout 0, idur, makenote
>>>>>>         reinit nextdur
>>>>>> makenote:
>>>>>>         print idur
>>>>>>         print ifreq
>>>>>>         print iamp
>>>>>>
>>>>>> kenv2        linseg 0, idur*.1, .1, idur*.8, .1, idur*.1, 0
>>>>>> asig        poscil kenv2, ifreq
>>>>>> outs        asig*kenv1, asig*kenv1
>>>>>> idur        = idur * igoldenr
>>>>>> ifreq        = ifreq * igoldenr
>>>>>>
>>>>>> if idur > 3 then
>>>>>> turnoff
>>>>>> endif
>>>>>>
>>>>>> endin
>>>>>>
>>>>>> 
>>>>>>
>>>>>> 
>>>>>> ;f0 z
>>>>>> i1 0 8 .4 220
>>>>>> 
>>>>>>
>>>>>> 
>>>>>>
>>>>>> Csound mailing list
>>>>>> Csound@listserv.heanet.ie
>>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>>> Send bugs reports to
>>>>>>        https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here