Midi in events not triggering

Hello,

I have a launch control and I’d like to pair it with sonic pi. I got it working on sonic pi version 2, but I don’t know what could be hapenning now. As you can see on the following image, the midi events can be seen on the cue log, but it’s not executing the “synth :piano” line.
Could I be missing something?

Thank you!

Could it be that you already have a live loop called midi_piano that was already syncing on a previous event that hasn’t been received?

Try pressing stop and then run again (or start Sonic Pi and try again if the app is closed).

Hi Sam. Yes, tried that with no results. I’m running v3.2.0 on Windows 8.1, if it helps.

No idea what’s going wrong at all. Do you have anything in your log files - specifically ~/.sonic-pi/log/server-errors.log or server-output.log.

Are you able to use sync with internal cues, such as those generated from live loops?

In case there’s something wrong with your audio, try changing it to

puts “got here”
instead of the
synth :piano,note: 60

See if that works first.

Hello Robin. I’ve tried with puts “something” too, but I’m not getting any message.

Here are the contents of log files:

server-errors-log:

Failed to load the fast_osc c-extension, falling back to pure Ruby version
Overriding fast_osc c-extension FastOsc::decode_single_message, falling back to pure Ruby version
C:/Program Files/Sonic Pi/app/server/ruby/vendor/sys-proctable-1.1.3/lib/windows/sys/proctable.rb:97: warning: constant ::Fixnum is deprecated
C:/Program Files/Sonic Pi/app/server/ruby/vendor/sys-proctable-1.1.3/lib/windows/sys/proctable.rb:97: warning: constant ::Fixnum is deprecated
C:/Program Files/Sonic Pi/app/server/ruby/vendor/sys-proctable-1.1.3/lib/windows/sys/proctable.rb:97: warning: constant ::Fixnum is deprecated
C:/Program Files/Sonic Pi/app/server/ruby/vendor/sys-proctable-1.1.3/lib/windows/sys/proctable.rb:97: warning: constant ::Fixnum is deprecated

server-output-log:

Sonic Pi server booting...
This is version 3.2.0 running on Ruby 2.7.0.
The time is 2020-03-23 10:35:05 +0100
Using primary protocol: udp
Detecting port numbers...
Listen port: 51235
  - OK
Scsynth port: 51237
  - OK
Scsynth send port: 51237
  - OK
OSC cues port: 4560
  - OK
Erlang port: 51240
  - OK
OSC MIDI out port: 51238
  - OK
OSC MIDI in port: 51239
  - OK
Websocket port: 51241
  - OK
Opening UDP Server to listen to GUI on port: 51235
Started [5816] [-] "C:\Program Files\Sonic Pi\app\server\native\scsynth.exe" -u 51237 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -U "C:/Program Files/Sonic Pi/app/server/native/plugins/" -b 4096 -B 127.0.0.1 [-] C:/Users/jsanjuan/AppData/Local/Temp/sonic-pi-pids/5816
Started [4596] [-] "C:/Program Files/Sonic Pi/app/server/native/erlang/bin/erl.exe" -noshell -pz "C:/Program Files/Sonic Pi/app/server/erlang" -s pi_server start 51240 4560 51235 [-] C:/Users/jsanjuan/AppData/Local/Temp/sonic-pi-pids/4596
Started [3972] [-] 'C:/Program Files/Sonic Pi/app/server/native/osmid/o2m.exe' -L -b -i 51238 -O 51239 -m 6 [-] C:/Users/jsanjuan/AppData/Local/Temp/sonic-pi-pids/3972
Started [5484] [-] 'C:/Program Files/Sonic Pi/app/server/native/osmid/m2o.exe' -t /midi:$n:$i:$c/$m -b -o 51239 -m 6 'Sonic Pi' [-] C:/Users/jsanjuan/AppData/Local/Temp/sonic-pi-pids/5484
Starting Server Runtime
Booting server...


Booting Sonic Pi
----------------

Booting on Windows
Boot - Starting the SuperCollider server...
Boot - C:/Program Files/Sonic Pi/app/server/native/scsynth.exe -u 51237 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 16 -o 16 -U C:/Program Files/Sonic Pi/app/server/native/plugins/ -b 4096 -B 127.0.0.1
Boot - SuperCollider booted successfully.
Boot - Connecting to the SuperCollider server...
Boot - Sending /status to server: 127.0.0.1:51237
Boot - Receiving ack from scsynth
Boot - Server connection established
Studio - Initialised SuperCollider Audio Server v3.10.4
Studio - Resetting server
Studio - Studio - clearing scsynth
Studio - Studio - allocating audio bus
Studio - Studio - Create Base Synth Groups
Studio - Starting mixer
Studio - Starting scope
"C:/Program Files/Sonic Pi/app/server/native/erlang/bin/erl.exe" -noshell -pz "C:/Program Files/Sonic Pi/app/server/erlang" -s pi_server start 51240 4560 51235
Studio - Spawning o2m with:
    'C:/Program Files/Sonic Pi/app/server/native/osmid/o2m.exe' -L -b -i 51238 -O 51239 -m 6
Studio - Spawning m2o with:
    'C:/Program Files/Sonic Pi/app/server/native/osmid/m2o.exe' -t /midi:$n:$i:$c/$m -b -o 51239 -m 6 'Sonic Pi'
Studio - Initialised MIDI subsystems
This is Sonic Pi v3.2 running on windows with ruby api 2.7.0.
Sonic Pi Server successfully booted.
Server is exiting.
Shutting down GUI...
Goodbye :-)
Exiting - shutting down scsynth server...
Sending /quit command to scsynth
Stopping OSC server...
Stopped OSC server...

Super odd - these log files look absolutely fine to me.

Are you able to use explicit calls to cue and sync as expected?

:thinking: Yes, cue and sync are working ok.

(edit) …and the Launch Control is receiving midi messages (for switching on-off buttons) from Sonic Pi with no problem

In the first message I wrote that it was working on version 2. Obviously, this is wrong, because midi functions started on sonic pi 3. So, the working version I was using was 3.1. Now I’m back to v3.1 and it works again