Lightjams receive MTC (midi time clock) for synchronizing?

477 views
Skip to first unread message

Steve French

unread,
Mar 13, 2014, 8:40:24 PM3/13/14
to ligh...@googlegroups.com
Hello Mat!
I am getting back into some LJ programming again!  I am using Ableton Live as a music sequencer and I am slaving LJ to it using loopMidi.  I know that LJ has some cool "tempo based effects" that I am wanting to try out.  Instead of having LJ "learn the tempo" from the microphone input (which I asked for last year and you did!!), can we have LJ track the tempo of an MTC master?  This will be much more consistent and quick and responsive, because LJ doesnt have to "think" about it.  It is time for me to get some lights moving around to the music!!  (Another benefit of MTC is that LJ knows the correct tempo even if the music is doing a quiet section!)

Bonus Question:  How can I have LJ tell me the current BPM (not a %).   Is there a visual BPM indicator that says "120BPM"?  Sure I can jump over to Ableton to see the tempo, but an indicator in LJ helps during troubleshooting and performance.
PS: I just patched a Wii controller through LJ to control ableton and its awesome!!!  It is working perfectly!!  They are controlling each other!
Thx!
-frenchy

Mathieu

unread,
Mar 15, 2014, 11:20:45 AM3/15/14
to ligh...@googlegroups.com
Hi Steve,

Handling MTC messages would be nice. Now on the todo list.

About displaying the BPM, there's no dedicated visual indicator. All the bpm and taptempo features are implemented at the scripting level only. Once MTC is implemented, then the BPM and timing info should be displayed in the MIDI config panel.

Thanks for the feedback!

  

Mathieu

unread,
Mar 15, 2014, 11:46:27 AM3/15/14
to
After some reading, Ableton can send two types of midi "timing" messages: timecode and clock. Timecode (MTC) represents a position in time (hours:minutes:seconds:frames...) while clock message are like a metronome and are sent at a rate relative to the BPM and in sync with the playback.

So I guess the clock messages are the most interesting. Since Lightjams doesn't have a timeline, MTC isn't really useful.


Any thoughts?

Steve French

unread,
Mar 15, 2014, 2:09:41 PM3/15/14
to ligh...@googlegroups.com
[i apologize in advance for babbling below... Just thinking things through!]

Mat,
I agree! What really matters is being locked to Ableton's (or any sequencer's) tempo. Does it make sense to listen for "Stop" and "Start" messages from a master sequencer like Ableton? Probably not because as you said LJ doesn't have a sequencer. I have not thought through all the options and implications yet... That's what today is for!

If I want lighting movements, cues, flashes, whatever, to be perfectly synced to Ableton, then I could have Ableton serve up midi clips (notes&CCs) already synced to the music, then why do I need Lightjams tempo based effects?

The Midi clock allows LJ to always be "tempo aware"... I guess it comes down to who is generating the "coolest" and most powerful lighting effects.... Ableton or LJ? Probably LJ is best, as I am sure you will agree.... But why? I bet the Tempo-based lighting scripts you already made in LJ will get me farther, faster than trying to "create cool things" using Ableton midi notes and CCs.... Also, by sending simple note messages from Ableton to LJ I can just "trigger"entire LJ scenes exactly in time with the tempo..... once the LJ scene is running, it would be nice to have the LJ LfOs (sines, etc) be Locked to the tempo... Not just the scene transitions.... Or should I create my own tempo based LFOs in Ableton and send them to LJ as CCs...?

Sorry for babbling...just thinking it through.... I will be trying different approaches today.

Question: Currently, what is your favorite LJ based tempo effect?? Thx!
--
Respectfully,
Steve French
President, Volt Vision
www.voltvision.com

Sent from my iPhone

Mathieu

unread,
Mar 15, 2014, 2:24:12 PM3/15/14
to
Start and stop messages are needed to sync the beats. 

About why Lightjams is better than Ableton to generate lighting fx, that depends on your installation. If a 1 to 1 mapping between midi notes/cc and lighting parameters is manageable for you, then LJ can only do the mapping job and Ableton can generate the effects. However, you may quickly reach the situation where there are so many lighting parameters to control than doing it directly from Ableton becomes too complex. In this case, you start creating your lighting effects in Lightjams, and use Ableton to control key effects parameters only. 

About tempo effect, the taptempo.sawtooth function is useful. 

Mathieu

unread,
Mar 15, 2014, 5:55:19 PM3/15/14
to
I've had lots of fun today with midi clocks! Try the new beta to share the joy ;)


In the midi config panel, you now see the clock info (bpm) when it is detected. The clock id is used to reference this clock from the scripting. There are 4 new functions:

midi.clock.bpm, midi.clock.beat, midi.clock.speed and midi.clock.sawtooth (my favorite).

You can create a sinus wave in sync with the beat by using map.sin(midi.clock.sawtooth(1))

Cheers,
Mathieu

Steve French

unread,
Mar 17, 2014, 9:38:18 PM3/17/14
to ligh...@googlegroups.com
Mat,
I love it great job!!!!!  Here are some thoughts as I am still working with it...

1) I am trying to set up lighting effects which are related to the beat, but much, much slower than every beat.  The midi.clock.sawtooth(3) is great and it gives me a nice quick timing resolution for quick changes, but what if I want slow moving changes which are still locked to the beat?  the measure?  every 4th measure?  I am fiddling around right now using counters to control the x-position of an energy source and dividing down the time.... I am having challenges with all the counters syncing.... still playing with it.  After some more time, I am not liking using counters to "simulate" slower time segments like measures, 2-measure intervals etc, because if you jump from one song to another in the middle of a measure the counters are all out of sync.  I think counters are inherently out of sync with the tempo clock without a better reset/syncing mechanism....

I am essentially trying to build my own 16-step sequencer...I have most of it working.  I am trying to select where along the sequencer I would like to trigger different scenes.  I have some of it working....but some things are still quirky.
On my sequencing grid, I have 4 energy sources on the screen, and I have assigned these scripts to their "X" value:
Energy Source1, x-value = 100-midi.clock.sawtooth(3)
Energy Source2, x-value = counter(0,1,midi.clock.beat(3),0,wii.remote1.b)*50
Energy Source3, x-value = counter(0,3,midi.clock.beat(3),0,wii.remote1.b)*25
Energy Source4, x-value = counter(0,7,midi.clock.beat(3),0,wii.remote1.b)*12.5

To get scenes to turn on/off in sync with the tempo I have to "paint" the scene enables onto the grid along a certain Y value....but its not right...  too messy.

2) I am starting to realize that with moving lights.....once you tell them the beat is there and they should change scenes....it is already too late...and they have already missed the beat....   this is why LFO/sine syncing seems better for movement....but damn it is too fast to use this "map.sin(midi.clock.sawtooth(1))"... I wish we could scale the timebase to be slower by 2x, 4x or 8x or 16x.  Switching colors exactly on the downbeat seems great!, but STARTING a "moving cue" on the beat has to happen sooner to be "on-time".  I can see how using a tempo-locked Sine would be great because it always knows in advance when the "beat" is coming.

I am continuing playing with this, but I just wanted to report my initial results and thoughts.
Thanks again and great job!  I feel like I am just at the beginning of a long journey....thx!

PS-The "Clock ID" thing is interesting...perhaps this is where we have a bunch of clock options which are temporally related to the Tempo! (1/2x, 1/4x, etc)
Check out the way the VDMX guys do their LFO section.  You can have several LFO waveforms with different parameters and choose which you want to use as a data source....each of them can by synced to the incoming midi time clock.

Mathieu

unread,
Mar 18, 2014, 9:25:07 AM3/18/14
to ligh...@googlegroups.com
Hi Steve,

You can use the onbeat function to divide the beat. For example, to pulse each 2 beats you do: onbeat(midi.clock.beat(1), 2)

To avoid your grids getting out of sync, try computing the values at one place and use gmem/grecall. For example, on a "beat master" grid, you compute the beat values you need with gmem(0, onbeat(midi.clock.beat(1), 2)) + gmem(1, onbeat(midi.clock.beat(1), 3)) + gmem(2, onbeat(midi.clock.beat(1), 4)).... Then just use grecall on your other grids.

I'm pretty sure most software generating midi clocks (like Ableton) can divide and offset the clocks.
Reply all
Reply to author
Forward
0 new messages