Page 1 of 1
Tempo clock / metronome ? How to ?
Posted: 10 Nov 2013 18:14
by Jaunmanuek
Hello,
I'd like to learn lemur from basic skills and advance as I learn.
My main objective at this moment is to create a step sequencer.
Im trying to configure a tempo clock or metronome first.
The following code works, but it wont operate when i reopen lemur after a few hours or a long time.
I create a fader called tempo with the expressions timefollow and click set with a 0 value.
A script called clock() is executed on expression time as it updates.
if (time > timefollow)
{
timefollow = time + (60/tempo.value);
click = click + 1;
M2.value = click;
};
M2.value is a monitor to display its operation.
Is this a correct way to set up a tempo clock ?
Is there a bug that is breaking its execution ?
Any help is appreciated,
Thank you !
Juan manuel aguirre
Re: Tempo clock / metronome ? How to ?
Posted: 13 Nov 2013 14:55
by mat
Hey Juan,
its been a while since I worked with the clock on the Lemur, so I am no more really into it.
However, I think you experience a time out as you refer to the global time variable, which starts (if I remember right) with Lemur start and may be at some point reach its maximum (??...not sure)
I had a working clock in "Modumat"
http://liine.net/en/community/user-library/view/59/
This module is about stepmodulation of CC, but you can have a look at the clock (extra "Midiclock" container) and copy it... you might also go through some variables I had in this module, e.g. for grid selection. As said, I had no look under the hood of a lemur clock for years, but maybe it helps.
g*mat
Re: Tempo clock / metronome ? How to ?
Posted: 05 Dec 2013 15:52
by Jaunmanuek
Thank you a lot for your answer !
I will check your example !!!
JMA
Re: Tempo clock / metronome ? How to ?
Posted: 17 Oct 2014 17:04
by dhjdhj
I would love to take Modumat and convert it to a basic metronome. Unfortunately, I don't understand how all the pieces fit together.
For example, (see attachment) I can see that there seems to be a number of variables defined inside (whatever that means) the OnOff button and I totally understand the C conditional expressions, etc.
But I don't understand how they are being used/accessed. For example, when you turn the OnOff button on, there must be some event that gets triggered periodically so you can update which slider turns white but I can't find such an event nor an associated script.
So where's the "heartbeat"?
Thanks,
D
Re: Tempo clock / metronome ? How to ?
Posted: 17 Oct 2014 18:09
by nick_liine
You should use "On Clock" scripts and/or the Sequencer objects for tight sequencing.
Re: Tempo clock / metronome ? How to ?
Posted: 20 Oct 2014 04:40
by dhjdhj
I thought the "On Clock" event was something that responded to MIDI clocks.
I just want a basic visual metronome so I know at what speed to play the intros of certain songs.
I realized that that the time "variable" continuously updates itself. Now I understand how everything works.
Re: Tempo clock / metronome ? How to ?
Posted: 20 Oct 2014 11:31
by oldgearguy
dhjdhj wrote:I thought the "On Clock" event was something that responded to MIDI clocks.
I just want a basic visual metronome so I know at what speed to play the intros of certain songs.
I realized that that the time "variable" continuously updates itself. Now I understand how everything works.
Yes, but if you have one of the MIDI clocks allocated to your internal use, you can set the tempo, start the MIDI clock, and then have a OnClock event do the metronome display perfectly in time to that internal clock.
In general, using the internal MIDI clocks and the OnClock event gives you an extremely flexible timer that you can stop and start programatically. It's worth building a small test project to just play around with the clocks and event and display some simple counters.
Re: Tempo clock / metronome ? How to ?
Posted: 20 Oct 2014 17:53
by dhjdhj
Got it --- will experiment.
Thanks for the feedback