Loading midmix.py +2 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,8 @@ def Init(): morbital.setDeviceLED(display,1,0) morbital.setDeviceLED(display,2,0) print("Initializing synthisizer in mode") resetDevice(findAMIDIDevice()) resetDevice(findAMIDIDevice(),GS) resetDevice(findAMIDIDevice(),GM) time.sleep(1) # The Main Function. Loading player_functions.py +10 −5 Original line number Diff line number Diff line Loading @@ -10,11 +10,14 @@ import serial import morbital import threading # Initialize serial port display = serial.Serial("/dev/ttyUSB0", 19200, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE, timeout=5, rtscts=False) # Initialize variables for serial playback killswitch global status status="alive" # Listener for the serial stop command def stoplisten(): while True: received_char = "" Loading Loading @@ -42,10 +45,8 @@ def findAMIDIDevice(): threading.Thread(target=stoplisten).start() # GM Mode= 'F07E7F0901F7' # GS Mode= 'F04110421240007F0041F7' # use amidi to send a reset command # The resetDevice function sends a GM or GS reset sysex command to the synthesizer. # Function to update the serial display def updateDisplay(message): morbital.clearDisplay(display) display.write(b"====SYNTHESIZER CONTROL====") Loading @@ -53,6 +54,10 @@ def updateDisplay(message): display.write(b"\n") display.write(message) # GM Mode= 'F07E7F0901F7' # GS Mode= 'F04110421240007F0041F7' # use amidi to send a reset command # The resetDevice function sends a GM or GS reset sysex command to the synthesizer. def resetDevice(device_id, mode='GS'): fn_prefix = "player_functions.py/resetDevice" Loading Loading
midmix.py +2 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,8 @@ def Init(): morbital.setDeviceLED(display,1,0) morbital.setDeviceLED(display,2,0) print("Initializing synthisizer in mode") resetDevice(findAMIDIDevice()) resetDevice(findAMIDIDevice(),GS) resetDevice(findAMIDIDevice(),GM) time.sleep(1) # The Main Function. Loading
player_functions.py +10 −5 Original line number Diff line number Diff line Loading @@ -10,11 +10,14 @@ import serial import morbital import threading # Initialize serial port display = serial.Serial("/dev/ttyUSB0", 19200, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE, timeout=5, rtscts=False) # Initialize variables for serial playback killswitch global status status="alive" # Listener for the serial stop command def stoplisten(): while True: received_char = "" Loading Loading @@ -42,10 +45,8 @@ def findAMIDIDevice(): threading.Thread(target=stoplisten).start() # GM Mode= 'F07E7F0901F7' # GS Mode= 'F04110421240007F0041F7' # use amidi to send a reset command # The resetDevice function sends a GM or GS reset sysex command to the synthesizer. # Function to update the serial display def updateDisplay(message): morbital.clearDisplay(display) display.write(b"====SYNTHESIZER CONTROL====") Loading @@ -53,6 +54,10 @@ def updateDisplay(message): display.write(b"\n") display.write(message) # GM Mode= 'F07E7F0901F7' # GS Mode= 'F04110421240007F0041F7' # use amidi to send a reset command # The resetDevice function sends a GM or GS reset sysex command to the synthesizer. def resetDevice(device_id, mode='GS'): fn_prefix = "player_functions.py/resetDevice" Loading