Csound Csound-dev Csound-tekno Search About

[Csnd] Turn "off" metro

Date2013-10-19 15:26
FromRoger Kelly
Subject[Csnd] Turn "off" metro
Is there a way to turn off a metro opcode once it has started?



Date2013-10-21 22:02
Fromjoachim heintz
SubjectRe: [Csnd] Turn "off" metro
not sure what you mean by "once it has started". this works ...




-odac




instr 1
kGo init 1
if kGo == 1 then
kTrig metro 1
else
kTrig = 0
endif
printk2 kTrig
kGo = 0
endin



i 1 0 10




... but actually then there is no sense to use metro, but this:

if kGo == 1 then
kTrig = 1
else
kTrig = 0
endif


best -

	joachim

Am 19.10.2013 16:26, schrieb Roger Kelly:
> Is there a way to turn off a metro opcode once it has started?
>
>

Date2013-10-24 21:04
FromRoger Kelly
SubjectRe: [Csnd] Turn "off" metro
I think these are all good solutions.  I should explain better the context of my question.

I am developing an Android application and using "metro" as a 'tick' trigger to do various graphic animations.  The Android app gets updates from Csound per "metro" frequency tick.

I had considered "turning off" metro over concern of CPU usage when animations are off.  But perhaps there is no real overhead of a metro opcode?

Does anyone know if metro incurs much of a CPU cost?

 


On Mon, Oct 21, 2013 at 4:02 PM, joachim heintz <jh@joachimheintz.de> wrote:
not sure what you mean by "once it has started". this works ...

<CsoundSynthesizer>

<CsOptions>
-odac
</CsOptions>

<CsInstruments>

instr 1
kGo init 1
if kGo == 1 then
kTrig metro 1
else
kTrig = 0
endif
printk2 kTrig
kGo = 0
endin

</CsInstruments>
<CsScore>
i 1 0 10
</CsScore>

</CsoundSynthesizer>

... but actually then there is no sense to use metro, but this:

if kGo == 1 then
kTrig = 1
else
kTrig = 0
endif


best -

        joachim

Am 19.10.2013 16:26, schrieb Roger Kelly:

Is there a way to turn off a metro opcode once it has started?




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"