Skip to content

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:

overlays.yaml
overlays:
  note_repeat: {}

Now create the file overlays/note_repeat.yaml. We'll use the buttons scene_1 through scene_8 in a group:

overlays/note_repeat.yaml
__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:

named_controls.yaml
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:

overlays/note_repeat.yaml
__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.yaml
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.yaml
overlays:
  note_repeat:
    on_enter:
      keyboard:
        repeat_rate: on
    on_leave:
      keyboard:
        repeat_rate: off
    pages_out: true
named_controls.yaml
repeat:
  type: overlay
  overlay: note_repeat
  gestures:
    press:
      overlay:
        toggle: note_repeat
overlays/note_repeat.yaml
__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]}