Need help with MIDI in w/controller


#1

OK, I’m trying to get my Arturia Minilab MkII working with Sonic Pi, using Analog Lab 3.

I’m running Windows 10, SP 3.0.1.

So SP does detect the midi controller automatically, but no cue messages are showing up in the log when I play notes on the controller. I am using one of the synth models in Analog Lab.

Should I set SP to listen on a particular port for MIDI? If so, which one?The I/O panel looks like this:


#2

Hi @birv2,

try with checking the “Receive remote OSC messages” checkbox as well. I remember there is/was a bug connecting the OSC settings somehow to Midi. Did the trick in my case a few months ago… (I also have the Minilab, it works flawlessly… but I am under Linux).

Martin


#3

Thanks! I can see the cue messages now.

I used this code, modified from the SP tute, and I’m hearing the notes:

live_loop :midicheck do
#use_real_time
note, velocity = sync “/midi/arturia_minilab_mkii/0/1/note_on”
synth :piano, note: note, amp: velocity / 127.0
end

It works, with latency. I added line 2 above (as per the tute), and then the sound stopped completely. So right now I’ve got sound with lag, or no sound.

Suggestions?

TIA,
Bob


#4

Hi @birv2,

well, I don’t have an idea about the sound issues. But the latency is probably due to your #use_real_time, which should be commented out. Otherwise you will get the 0.5 seconds latency, which Sonic Pi uses to schedule everything in time. Midi input should be processed in real time. You might check and reduce the latency with set_audio_latency! and/or set_sched_ahead_time!; but this is just some wild guess…

I am quite sure there are other Windows users, who can assist.

Martin


#5

Thanks for the reply. I did some googling and found someone here who suggested not using the use_real_time command but instead the set_sched_ahead_time, and then playing with the values. I think I got it down to about .0001 and drastically reduced the latency. Still not bang on, but much better.

But I’m open to other suggestions! I’m a complete n00b with MIDI, so this is all new to me.

Bob


#6

The main latency will be produced by the response of your audio card. If you are using the built in Windows sound this will not be great. A good sound card, probably set up for asio driver should give better results. I’m not a Windows user, but possible @samaaron who now uses a windows pc for his live performances may be able to advise.


#7

Hi,

@robin.newman that is probably the point. I don’t know how Windows behaves. I can get rather decent latency values with my Lenovo x230 with the inbuild card (with Linux).

But: Fact is, if you want to have a low close to unnoticable latency, which is: less or not much more then 10 milliseconds, (and if you are making music with your computer regularly) you’ll probably will want to buy an USB audio interface (such as Focusrite Scarlett MK2 or Steinberg UR22).