Note repeat overlay¶
Let's recreate the note repeat feature on the Ableton Push, where after pushing the Repeat button we can use the scene buttons to change the keyboard's repeat rate.
Instructions¶
First, create the necessary overlay.
Call it note_repeat and leave it as an empty object:
Now create the file overlays/note_repeat.yaml.
We'll use the buttons scene_1 through scene_8 in a group:
__repeat_group:
includes:
[scene_1, scene_2, scene_3, scene_4, scene_5, scene_6, scene_7, scene_8]
We'll also set up a control to activate the overlay:
repeat:
type: overlay
overlay: note_repeat
gestures:
press:
overlay:
toggle: note_repeat
Setting type: overlay isn't necessary, it's just for LED feedback.
By using the keyboard control we can get feedback about the zcx keyboard's note repeat setting.
We need to set the keyboard control's function option to repeat_rate: 1/4, or whichever rate.
This is tedious to do for eight controls, so we will use template strings and vars to automate it somewhat:
__repeat_group:
includes:
[scene_1, scene_2, scene_3, scene_4, scene_5, scene_6, scene_7, scene_8]
vars:
repeat_rates: ["1/32t", "1/32", "1/16t", "1/16", "1/8t", "1/8", "1/4t", "1/4"]
type: keyboard
function:
repeat_rate: ${repeat_rates[me.index]}
gestures:
press:
keyboard:
repeat_rate: ${repeat_rates[me.index]}
Note
These particular repeat rates are chosen because they are printed on the Push's buttons. You may use as many buttons and any repeat rates you like.
The overlay is now functional! But we can make it a bit cooler:
overlays:
note_repeat:
on_enter:
keyboard:
repeat_rate: on
on_leave:
keyboard:
repeat_rate: off
pages_out: true
By setting an on_enter and on_leave command, we can have the repeat turn on and off with the overlay. The pages_out option means that if the page changes while the overlay is active, the overlay is automatically dismissed.
Final output¶
overlays:
note_repeat:
on_enter:
keyboard:
repeat_rate: on
on_leave:
keyboard:
repeat_rate: off
pages_out: true
repeat:
type: overlay
overlay: note_repeat
gestures:
press:
overlay:
toggle: note_repeat
__repeat_group:
includes:
[scene_1, scene_2, scene_3, scene_4, scene_5, scene_6, scene_7, scene_8]
vars:
repeat_rates: ["1/32t", "1/32", "1/16t", "1/16", "1/8t", "1/8", "1/4t", "1/4"]
type: keyboard
function:
repeat_rate: ${repeat_rates[me.index]}
gestures:
press:
keyboard:
repeat_rate: ${repeat_rates[me.index]}