Csound Csound-dev Csound-tekno Search About

Start and stop metro at will

Date2016-02-24 21:40
FromBeinan Li
SubjectStart and stop metro at will
Hi Csound,

The PD metro object has a left inlet through which one can send Start/Stop messages to start and stop the metro at any time.

I wonder if there is a "straightforward" way in Csound to achieve this with the metro object (or similar time-loop mechanism) without using an explicit logic.


Thanks,
Beinan

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-02-24 21:42
FromBeinan Li
SubjectRe: Start and stop metro at will
btw, I know that you can probably tweak the metro frequency input to start/stop it, but here I'd like to keep that input independent of the process.

Thanks,
Beinan


On Wed, Feb 24, 2016 at 4:40 PM, Beinan Li <li.beinan@gmail.com> wrote:
Hi Csound,

The PD metro object has a left inlet through which one can send Start/Stop messages to start and stop the metro at any time.

I wonder if there is a "straightforward" way in Csound to achieve this with the metro object (or similar time-loop mechanism) without using an explicit logic.


Thanks,
Beinan


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-02-24 21:59
FromHlöðver Sigurðsson
SubjectRe: Start and stop metro at will
If you want to stop the metro with p-field you could do
kmetro metro 10
kmetro = (p5 == 0 ? 0 : kmetro)

without logic

kmetro metro p5

;;send score event with p5 = 0

2016-02-24 22:42 GMT+01:00 Beinan Li <li.beinan@gmail.com>:
btw, I know that you can probably tweak the metro frequency input to start/stop it, but here I'd like to keep that input independent of the process.

Thanks,
Beinan


On Wed, Feb 24, 2016 at 4:40 PM, Beinan Li <li.beinan@gmail.com> wrote:
Hi Csound,

The PD metro object has a left inlet through which one can send Start/Stop messages to start and stop the metro at any time.

I wonder if there is a "straightforward" way in Csound to achieve this with the metro object (or similar time-loop mechanism) without using an explicit logic.


Thanks,
Beinan


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-02-24 22:20
FromTarmo Johannes
SubjectRe: Start and stop metro at will

You can always multpile the metro value with 1 or 0 (maybe from a globarl variable you can set elsewhere)

ktrig metro 10
ktrig *= gkUseMetroFlag

or as oneliner

ktrig = metro(10)*gkUseMetroFlag

or put it into another instrument and use global variables or channels for communicating the signal. I think metro is so lightweight that you don't need to worry much stopping and starting it for performance sake, just use conditions, how and when to use the output.

Like always with Csound, there are very many ways to do.

best,
tarmo



2016-02-24 23:59 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
If you want to stop the metro with p-field you could do
kmetro metro 10
kmetro = (p5 == 0 ? 0 : kmetro)

without logic

kmetro metro p5

;;send score event with p5 = 0

2016-02-24 22:42 GMT+01:00 Beinan Li <li.beinan@gmail.com>:
btw, I know that you can probably tweak the metro frequency input to start/stop it, but here I'd like to keep that input independent of the process.

Thanks,
Beinan


On Wed, Feb 24, 2016 at 4:40 PM, Beinan Li <li.beinan@gmail.com> wrote:
Hi Csound,

The PD metro object has a left inlet through which one can send Start/Stop messages to start and stop the metro at any time.

I wonder if there is a "straightforward" way in Csound to achieve this with the metro object (or similar time-loop mechanism) without using an explicit logic.


Thanks,
Beinan


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-02-25 21:14
Fromjoachim heintz
SubjectRe: Start and stop metro at will
hi beinan -

as tarmo said, there are many ways in csound to do this (he and hlödver 
showed some).  perhaps i may add, that in my experience, it is not very 
efficient, to "copy" some behaviour from max or pd in csound (like here 
"start" and "stop" messages).  in particular in scheduling events, pd 
and csound are very different; and the solutions for "turning something 
off" will depend on the situation.

so, perhaps better to describe the situation in which you want to "turn 
off" the metro, so that people can share ideas how to do this best.

bye -
	joachim



On 24/02/16 22:40, Beinan Li wrote:
> Hi Csound,
>
> The PD metro object has a left inlet through which one can send
> Start/Stop messages to start and stop the metro at any time.
>
> I wonder if there is a "straightforward" way in Csound to achieve this
> with the metro object (or similar time-loop mechanism) without using an
> explicit logic.
>
>
> Thanks,
> Beinan
>
> 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