| I assume you're using Csound5. Get yourself on over to Csound6 if you
want to use the new functional syntax!
On 21 December 2013 16:22, Machina wrote:
> works great!
>
> this syntax didnt work.. you know.. i wish it would
>
> if(metro(abs(kfreq1))==1) then
>
> anyway, thanks a lot!
>
> On Saturday, December 21, 2013 at 2:06 AM, Rory Walsh wrote:
>
> Would something like this do? The instrument/phasor gets retriggered
> by a random frequency. Otherwise you can try resetting the phase of
> your phasor at a different frequency. To do this you may need to roll
> your own phasor where you can reset the phase arbitrarily. Of course
> I'm probably overlooking some much simpler ways.
>
>
>
> -odac
>
>
> sr = 44100
> ksmps = 64
> nchnls = 2
> 0dbfs=1
>
> instr 1
> kfreq1 randi .5, .1, 2;freq of retriggering
> kfreq2 = 0.01;freq of phasor
> if(metro(abs(kfreq1))==1) then
> ;trigger instrument to reinit
> reinit beginReinit
> endif
>
> ;reinit and reset the phasor back to 0
> beginReinit:
> k1 phasor kfreq2
> printk2 k1
>
> endin
>
>
>
> f1 0 1024 10 1
> i1 0 3600
>
>
>
> On 20 December 2013 21:50, Machina wrote:
>
> Hi guys
>
> im using phasor and i need it retriggered by a different period.
> assuming phasor is in f1 and retriggering happens in f2
> i was thinking of:
> kmetro metro f2
> if(kmetro==1) then
> kphs phasor f1
> end if
>
> but its not working…
> any other approaches i should take?
>
> here is a copy of my code
>
> kProperMetro metro 1/giproperLen
>
> if(kProperMetro==1) then
>
> gkeepPhs phasor 1/gilength
>
> endif
>
>
> thanks
>
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
> https://sourceforge.net/p/csound/tickets/
> csound5:
> https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
|