Csound Csound-dev Csound-tekno Search About

[Csnd] Detect phasor cycle

Date2009-09-03 04:08
FromMike Moser-Booth
Subject[Csnd] Detect phasor cycle
Hello list,

Is there an opcode that can detect when a phasor has reached the end of its cycle? I want to use one as a master clock and be able to accumulate how many cycles have passed.

Thanks,
.mmb

Date2009-09-03 08:24
FromIain McCurdy
Subject[Csnd] RE: Detect phasor cycle
trigger?

I'm sure there are better ways of doing this:

kaccum init 0
kphase phasor 1
kcounter trigger kphase, 0.99, 0
kaccum = kaccum + kcounter
printk2 kaccum

Iain


Date: Wed, 2 Sep 2009 23:08:33 -0400
From: mmoserbooth@gmail.com
To: csound@lists.bath.ac.uk
Subject: [Csnd] Detect phasor cycle

Hello list,

Is there an opcode that can detect when a phasor has reached the end of its cycle? I want to use one as a master clock and be able to accumulate how many cycles have passed.

Thanks,
.mmb


With Windows Live, you can organize, edit, and share your photos. Click here.

Date2009-09-03 12:35
FromOeyvind Brandtsegg
Subject[Csnd] Re: Detect phasor cycle
You could also check out the syncphasor opcode, it has a phase output
and a trigger (sync) output that gives a pulse for each phase cycle.
Oeyvind

2009/9/3 Mike Moser-Booth :
> Hello list,
>
> Is there an opcode that can detect when a phasor has reached the end of its
> cycle? I want to use one as a master clock and be able to accumulate how
> many cycles have passed.
>
> Thanks,
> .mmb
>

Date2009-09-05 02:06
FromMike Moser-Booth
Subject[Csnd] Re: RE: Detect phasor cycle
Iain, Oeyvind, thanks for your responses! I can't use syncphasor because my master phasor is actually being fed into [csound~] from Max/MSP, though that sync output is exactly what I'm looking for. Sticking trigger in a UDO with setksmps = 1 did the trick.

Thanks,
.mmb

Iain McCurdy wrote:
trigger?

I'm sure there are better ways of doing this:

kaccum init 0
kphase phasor 1
kcounter trigger kphase, 0.99, 0
kaccum = kaccum + kcounter
printk2 kaccum

Iain


Date: Wed, 2 Sep 2009 23:08:33 -0400
From: mmoserbooth@gmail.com
To: csound@lists.bath.ac.uk
Subject: [Csnd] Detect phasor cycle

Hello list,

Is there an opcode that can detect when a phasor has reached the end of its cycle? I want to use one as a master clock and be able to accumulate how many cycles have passed.

Thanks,
.mmb


With Windows Live, you can organize, edit, and share your photos. Click here.