Tempo clock / metronome ? How to ?

Post and discuss Lemur Modules.
Post Reply
Jaunmanuek
Newbie
Posts: 12
Joined: 04 Aug 2013 02:31

Tempo clock / metronome ? How to ?

Post 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
mat
Regular
Posts: 124
Joined: 08 Dec 2011 09:21
Location: Germany
Contact:

Re: Tempo clock / metronome ? How to ?

Post 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
Lemur modules and sequencer: http://music-interface.com
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Jaunmanuek
Newbie
Posts: 12
Joined: 04 Aug 2013 02:31

Re: Tempo clock / metronome ? How to ?

Post by Jaunmanuek »

Thank you a lot for your answer !
I will check your example !!!

JMA
dhjdhj
Newbie
Posts: 11
Joined: 18 Jul 2012 13:26

Re: Tempo clock / metronome ? How to ?

Post 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
Attachments
screenshot_496.png
screenshot_496.png (46.43 KiB) Viewed 6401 times
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: Tempo clock / metronome ? How to ?

Post by nick_liine »

You should use "On Clock" scripts and/or the Sequencer objects for tight sequencing.
dhjdhj
Newbie
Posts: 11
Joined: 18 Jul 2012 13:26

Re: Tempo clock / metronome ? How to ?

Post 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.
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Tempo clock / metronome ? How to ?

Post 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.
dhjdhj
Newbie
Posts: 11
Joined: 18 Jul 2012 13:26

Re: Tempo clock / metronome ? How to ?

Post by dhjdhj »

Got it --- will experiment.

Thanks for the feedback
Post Reply