
4 changed files with 71 additions and 0 deletions
@ -1,2 +1,10 @@ |
|||
# keykey |
|||
MIDI Synth Sequencer Suite |
|||
|
|||
## Dependencies |
|||
`sudo apt install libjack-jackd2-0 libjack-jackd2-dev` |
|||
`sudo pip3 install mido` |
|||
`sudo pip3 install python-rtmidi` |
|||
|
|||
Maybe not needed: |
|||
`sudo pip3 install py-midi` |
@ -0,0 +1,24 @@ |
|||
{ |
|||
"folders": |
|||
[ |
|||
{ |
|||
"path": "../", |
|||
"name": "KeyKey", |
|||
"folder_exclude_patterns": ["project"],//, "thirdParty"], |
|||
"file_include_patterns": ["*.c", "*.cpp", "*.h", "*.hpp", "*.txt", "Jam*", "*.md", "*.py"] |
|||
}, |
|||
], |
|||
"build_systems": |
|||
[ |
|||
// For galavant/, use |
|||
// "working_dir": "$project_path/../../.." |
|||
// Not sure why, but Sublime will actually keep going up across builds if you just do ../ first |
|||
|
|||
// Misc. Commands |
|||
{ |
|||
"name": "List", |
|||
"shell_cmd": "ls -l", |
|||
"working_dir": "$project_path" |
|||
}, |
|||
] |
|||
} |
@ -0,0 +1,36 @@ |
|||
import mido |
|||
import time |
|||
|
|||
""" |
|||
mido.get_input_names() |
|||
mido.get_output_names() |
|||
""" |
|||
|
|||
def testOutput(): |
|||
outputs = mido.get_output_names() |
|||
lmmsOutPort = None |
|||
for output in outputs: |
|||
if 'LMMS'.lower() in output.lower(): |
|||
lmmsOutPort = output |
|||
|
|||
if not lmmsOutPort: |
|||
return |
|||
|
|||
with mido.open_output(lmmsOutPort) as lmmsOut: |
|||
for i in range(1, 10): |
|||
song = [100, 80, 40, 80, 100] |
|||
for note in song: |
|||
testNote = mido.Message('note_on', note=note, velocity=127, time=0.1) |
|||
lmmsOut.send(testNote) |
|||
testNote = mido.Message('note_on', note=20, velocity=127, time=0.1) |
|||
lmmsOut.send(testNote) |
|||
time.sleep(0.1) |
|||
testNote = mido.Message('note_off', note=note, velocity=127, time=0.2) |
|||
lmmsOut.send(testNote) |
|||
testNote = mido.Message('note_off', note=20, velocity=127, time=0.2) |
|||
lmmsOut.send(testNote) |
|||
time.sleep(0.1) |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
testOutput() |
Loading…
Reference in new issue