Page 1 of 1

Midiclock

Posted: 10 Dec 2013 21:41
by MrCorba
I guess the solution is really simple but i just can't find it.

I want a random function on a fader that changes with say every quarter note. Synced with midi clock to ableton. Now I know that midi clock sends out date 24 times each quarter note,so if i take a monitor
and give as input "midi_clocks[0]/24" it changes every quarter note. However, I just can not get this to work within a script or an expression. Has anyone an suggestion?

Re: Midiclock

Posted: 11 Dec 2013 11:16
by electrofux
You can try putting the MidiClock part into the trigger field of a script.

Re: Midiclock

Posted: 11 Dec 2013 18:50
by MrCorba
I've tried that but then it just changes on every midiclock pulse and not on quarter/eight note. Thats the main issue

Re: Midiclock

Posted: 12 Dec 2013 14:55
by Macciza
You just gotta take your logic that step further . . .

First use Modulo- % rather than Div - / cause it cycles from 0 to whatever
Then you could use 'midi_clocks[0]%24==1' to get the timing

Re: Midiclock

Posted: 12 Dec 2013 17:17
by Traxus
Macciza wrote:You just gotta take your logic that step further . . .

First use Modulo- % rather than Div - / cause it cycles from 0 to whatever
Then you could use 'midi_clocks[0]%24==1' to get the timing
To elaborate, if I'm not mistaken, 'on expression' does not mean 'on change'. So if a script is set to on expression of 'var' and var is set to the same value three times in a row, the on expression listener script will fire all three times, no?

Re: Midiclock

Posted: 15 Dec 2013 19:38
by MrCorba
Great, it finally works! Thanks!