You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MIDI Scripter is a framework for scripting MIDI, keyboard and Open Sound Control (OSC) input and output with a few lines of Python code.
3
+
MIDI Scripter is a framework for scripting MIDI, keyboard and Open Sound
4
+
Control (OSC) input and output with only a few lines of Python code.
4
5
5
-
MIDI Scripter is intended for digital audio workstation (DAW) controls scripting but can also be used for general input conversion and automation. It fits where controller mappings are not enough but rewriting DAW controller integration is too much.
6
+
MIDI Scripter listens to selected input ports and feed incoming messages to
7
+
subscribed callables (functions, methods, etc.). These callables or any
8
+
other Python code can send modified or brand-new messages with
9
+
output ports. MIDI Scripter can act as a proxy to filter and transform and
10
+
convert the input.
11
+
12
+
MIDI Scripter included customizable GUI that provides messages logging,
13
+
"ready to paste" port and message declarations and one line of code widgets for
14
+
monitoring / controlling scripts.
6
15
7
16
An octave transposer with GUI controls in 10 lines of code:
8
17
9
18
```python
10
-
from midiscripter import*# safe * import with no bloat
19
+
from midiscripter import*
11
20
12
-
midi_keyboard = MidiIn('Port name') # GUI will provide you with port names
13
-
proxy_output = MidiOut('loopMIDI Port') # using loopMIDI virtual port for output
21
+
midi_keyboard = MidiIn('MIDI Keyboard') # GUI will provide you with port names
22
+
proxy_output = MidiOut('To DAW') # using virtual port for output
14
23
15
-
# GUI control in a single line, many widget available, custom widgets supported

29
38
30
39
[You can find more examples here.](https://github.com/Maboroshy/midi-scripter/tree/master/examples)
31
40
32
41
[Scripting guide and API documentation available.](https://maboroshy.github.io/midi-scripter)
33
42
34
-
Currently MIDI Scripter is at "beta" development stage. It's fully functional but needs some more testing. It targets only Windows for now. Linux and macOS support will follow.
43
+
Currently MIDI Scripter is at "beta" development stage. It's fully
44
+
functional but needs more user feedback. It works on Windows and Linx and
45
+
should work on macOS.
46
+
47
+
## What it can do
48
+
49
+
For writing Python code:
50
+
51
+
- Prepare MIDI, OSC and keyboard inputs and outputs with a single line,
52
+
without boilerplate code.
53
+
- Feed input messages to functions or any callables by "decorating" them.
54
+
- Work with common message objects instead of raw data different for each port
55
+
type.
56
+
- Send MIDI, OSC and keyboard output messages.
57
+
- Create GUI widgets with one line and arrange them with mouse on your script's
58
+
dashboard.
59
+
60
+
For live performance setups:
35
61
36
-
## Features
37
-
Easy tasks for MIDI Scripter:
38
-
1. Filter, modify and route MIDI, OSC and keyboard messages in any way.
39
-
2. Map MIDI, OSC and keyboard to each other.
40
-
3. Map any Python code to input message.
41
-
4. Make extra "shift" keys to multiply MIDI controls.
42
-
5. Organize mappings into sets / scenes with GUI controls.
43
-
6. Make an extra overlay mappings on top of MIDI controller's default DAW integration by using proxy.
62
+
- Make extra layers to multiply MIDI controls.
63
+
- Organize mappings into sets / scenes with GUI dashboard.
64
+
- Make an extra overlay mappings on top of MIDI controller's DAW integration by
65
+
using proxies.
66
+
- Create and map complex macros.
44
67
45
-
Complex tasks for MIDI Scripter:
46
-
1. Create and map complex macros involving multiple hardware or virtual MIDI controllers.
47
-
2. Make custom sequencer or MIDI input generator.
48
-
3. Make music education or trainer GUI application based on MIDI input.
68
+
For MIDI related apps:
69
+
70
+
- Make custom sequencers or MIDI output generators.
71
+
- Make basic music training GUI applications based on MIDI input.
72
+
73
+
For software control and automation:
74
+
75
+
- Use MIDI controllers or keyboard shortcuts to run any Python code.
76
+
- Use keyboard macros to control apps.
49
77
50
78
## Installation
51
-
1.[Python 3.11+](https://www.python.org/downloads/) with "Add python.exe to PATH" option.
52
-
2.[loopMIDI](https://www.tobias-erichsen.de/software/loopmidi.html) for virtual MIDI output ports on Windows.
53
-
3.`pip install midiscripter` in console.
54
79
55
-
## Setup
56
-
Run loopMIDI and add virtual ports you want to send MIDI messages. You can enable its autostart option.
80
+
1. Install [Python 3.11+](https://www.python.org/downloads/) including pip.
81
+
2. Run `pip install midiscripter`.
57
82
58
-
Enable virtual MIDI output ports as MIDI inputs in DAW.
83
+
Extra steps for Windows:
84
+
85
+
1. Enable `Add python .exe to PATH` option in Python installer.
1. Paste [script template](examples/script_template.py) to Python IDE or plain text editor. IDE is greatly recommended.
62
-
2. Run unchanged template script from IDE or by `python .\script_template.py` to open GUI for more info on available ports and their input.
63
-
3. Turn on the ports' checkboxes to enable them and watch the log for input messages.
64
-
4. Click on port names and messages to copy their declarations to the clipboard. Paste the declarations to your script.
65
-
5. Write the functions you need. Subscribe them to messages with `@input_port.subscribe` decorator. Use `log('messages')` for debugging. Use `output_port.send(msg)` to send modified or created messages from a function.
66
-
6. Restart the script from GUI.
90
+
91
+
1. Paste [script template](examples/script_template.py) to Python IDE or plain
92
+
text editor. IDE is greatly recommended.
93
+
2. Run unaltered template script from IDE or by `python` command to open GUI for
94
+
more info on available ports and their input.
95
+
3. Turn on available ports' checkboxes to enable them, and watch the log for
96
+
input messages.
97
+
4. Click on port names and messages to copy their declarations to the clipboard.
98
+
Paste the declarations to your script.
99
+
5. Write the functions you need. Subscribe them to input messages with
100
+
`@input_port.subscribe` decorator. Use `log('messages')` for debugging.
101
+
Use `output_port.send(msg)` to send modified or created messages from a
102
+
function.
103
+
6. Restart the script from GUI to check how in works.
0 commit comments