Skip to content

Commit

Permalink
Add transport controls
Browse files Browse the repository at this point in the history
  • Loading branch information
Abigail de Joode committed Dec 28, 2022
1 parent d76067e commit 28177c4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Arturia Keystep 37 Controller Script for FL Studio

![Arturia_Keystep_37_Black](https://user-images.githubusercontent.com/16174954/209695523-1e63591b-a9ed-46e1-9b62-78b5f5c0a085.png)
![Arturia_Keystep_37](https://user-images.githubusercontent.com/16174954/209695384-f355a731-3998-4836-a49b-2ded002cf8ab.png)

## Installation

1. Download the latest [release](../../releases). Make sure to download the ZIP file and not the source code.
2. Extract the ZIP file in your `%USERPROFILE%/Documents/Image-Line/FL Studio/Settings/Hardware` directory.
3. In FL studio go to <kbd>Options > MIDI Settings > Input > MPK mini Plus</kbd> and select <kbd>Arturia Keystep 37 (User)</kbd> from the <kbd>Controller Type</kbd> dropdown menu.
3. In FL studio go to <kbd>Options > MIDI Settings > Input > Arturia Keystep 37</kbd> and select <kbd>Arturia Keystep 37 (User)</kbd> from the <kbd>Controller Type</kbd> dropdown menu.

## Mapping

| Button | Function |
|:-------:|---------------------|
| &#9210; | Toggle Recording |
| &#9209; | Stop Playback |
| &#9199; | Play/Pause Playback |
19 changes: 18 additions & 1 deletion device_arturia_keystep_37.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# name=Arturia Keystep 37
# url=https://forum.image-line.com/viewtopic.php?f=1994
# url=https://forum.image-line.com/viewtopic.php?f=1994&t=295188
# supportedDevices=Arturia Keystep 37
# version=1.0.0

import transport, general, mixer, midi

BUTTON_RECORD = 0x32
BUTTON_STOP = 0x33
BUTTON_PLAY = 0x36

def OnControlChange(event):
event.handled = False
if event.data1 == BUTTON_RECORD:
print(f'{"Disabled" if transport.isRecording() else "Enabled"} recording')
transport.record()
elif event.data1 == BUTTON_STOP and event.data2 > 0:
print('Stopped playback')
transport.stop()
elif event.data1 == BUTTON_PLAY and event.data2 > 0:
print(f'{"Paused" if transport.isPlaying() else "Started"} playback')
transport.start()
event.handled = True

0 comments on commit 28177c4

Please sign in to comment.