¡Descubre cómo utilizar tu Raspberry Pi como un USB MIDI Host para controlar dispositivos MIDI sin necesidad de teclado, ratón o pantalla! En este ejemplo práctico, te guiaré a través del proceso de configuración para controlar una Behringer Flow 8 utilizando tu Raspberry Pi. Aprenderás cómo conectar y configurar tu Raspberry Pi para actuar como un puente MIDI, permitiéndote manejar tu equipo MIDI de forma remota y eficiente. No te pierdas este tutorial paso a paso para desbloquear todo el potencial de tu Raspberry Pi en el mundo de la música y la producción. El articulo principal del cual me guie para este tutorial esta en este Link: https://linuxmusicians.com/viewtopic.php?p=103927&sid=039b9897a6d57ab1579bbd4b1e3dd4c0#p103927
1. sudo apt-get install ruby git
2. Configuring automatic Midi connection. Issue the command sudo nano /usr/local/bin/connectall.rb and copy the following content:
CODE: SELECT ALL
#!/usr/bin/ruby
#
t = `aconnect -i -l`
ports = []
t.lines.each do |l|
/client (\d*)\:/=~l
port = $1
# we skip empty lines and the "Through" port
ports << port unless $1.nil? || $1 == '0' || /Through/=~l
end
ports.each do |p1|
ports.each do |p2|
unless p1 == p2 # probably not a good idea to connect a port to itself
system "aconnect #{p1}:0 #{p2}:0"
end
end
end
3. Issue the command:
CODE: SELECT ALL
sudo chmod +x /usr/local/bin/connectall.rb
You can test the auto-connection with command connectall.rb and checking results with aconnect -l.
4. Configure automatic MIDI connection/disconnection on USB device connect/disconnect:
CODE: SELECT ALL
sudo nano /etc/udev/rules.d/33-midiusb.rules
Copy the following content and save the file:
CODE: SELECT ALL
ACTION=="add|remove", SUBSYSTEM=="usb", DRIVER=="usb", RUN+="/usr/local/bin/connectall.rb"
5. Issue the following commands:
CODE: SELECT ALL
sudo udevadm control --reload
sudo service udev restart
6. Configure MIDI connection at system boot:
CODE: SELECT ALL
sudo nano /lib/systemd/system/midi.service
Copy the following content and save the file
CODE: SELECT ALL
[Unit]
Description=Initial USB MIDI connect
[Service]
ExecStart=/usr/local/bin/connectall.rb
[Install]
WantedBy=multi-user.target
7. Issue the following commands:
CODE: SELECT ALL
sudo systemctl daemon-reload
sudo systemctl enable midi.service
sudo systemctl start midi.service
8. To test automatic connection, you can use the command aconnect -l