Please ensure Javascript is enabled for purposes of website accessibility Jump to content

eberdugo

Members
  • Posts

    1
  • Joined

  • Last visited

eberdugo's Achievements

Newbie

Newbie (1/14)

  • Conversation Starter Rare
  • Week One Done

Recent Badges

0

Reputation

  1. Hello everybody, I don't know if there is anybody interested on this, but I decided to share my findings about communication with M5 via MIDI interface. I decided to build a small pedal by myself, using most probably some micro-controller to send MIDI commands to the pedal, when I press, enable navigation. This is the ultimate goal, but meanwhile, to test the concept, I started to do some communication experiments, and for my initial setup I could implement a VERY SIMPLE python code to do this, using an USB-MIDI interface cable by ESI MidiMate eX connected to my computer. It worked, with no need of any driver installation (Windows 10), using the commands explained in M5 manual. Here's the python code with some examples: ------------------ #remember to install the library python-rtmidi #pip install python-rtmidi import rtmidi midiout = rtmidi.MidiOut() available_ports = midiout.get_ports() from rtmidi.midiconstants import (PROGRAM_CHANGE , CONTROLLER_CHANGE) print(available_ports) #the number (1) can change, depending on the address on your computer when you connect the cable if available_ports: midiout.open_port(1) #this is from the M5 manual: #Preset Change PC 0-23 (Corresponds to Presets 01-24) #FX on/off CC#11 / 0-63 (Bypass) / 64-127 (On) #Tuner Mode on/off CC#69 0-63 (Exit) / 64-127 (Enter) #Expression Pedal CC#01 0-127 #Tap Tempo CC#64 / 64-127 #change to effect 10 control = [PROGRAM_CHANGE, 9] #change to effect 19 control = [PROGRAM_CHANGE, 18] #switch OFF effect control = [CONTROLLER_CHANGE, 11, 0] #switch ON effect control = [CONTROLLER_CHANGE, 11, 64] #tuner mode ON control = [CONTROLLER_CHANGE, 69, 64] #tuner mode OFF control = [CONTROLLER_CHANGE, 69, 0] #send the command midiout.send_message(control) #close the port midiout.close_port() del midiout ------------------- Enjoy!
×
×
  • Create New...