Midi latency on macOS 10.14 Mojave


#1

Hello, I’m experimenting with Midi using the tutorial example…

live_loop :midi_piano do
  note, velocity = sync "/midi/oxygen_25/0/1/note_on"
  synth :piano, note: note
end

However, like the issue in MIDI & latency: use_real_time has no effect I’m experiencing approximately 0.5 second latency, despite being on a Mac.

Any idea what the problem might be?


#2

Hi, what happens if you try the following:

live_loop :midi_piano do
  use_real_time
  note, velocity = sync "/midi/oxygen_25/0/1/note_on"
  synth :piano, note: note
end

#3

That’s a lot better, thanks! Another thing though is that as I play notes, there is this rising background of noise. It’s not very loud, but enough to be noticable.


#4

Hi,

great that it helps. It’s important to note that use_real_time is thread-local, so it will only affect the thread it is declared within (or any child threads that are created from a ‘real-time’ thread).

With respect to background noise, this isn’t something I’ve experienced. Could you explain it in a bit more detail? Does it appear for every synth or just the :piano?


#5

Of course it would help if I didn’t have Logic Pro X open at the same time, set to some atmospheric noise setting!

Panic over!


#6

HAHAHAHAHAHAHAHAHA! Brilliant! :slight_smile:


#7

I hope you’re laughing with me, not at me


#8

Both I think :slight_smile:

It’s definitely the kind of thing I would do…


#9

While I’ve got your attention, is there an easy way to invoke the “code completion” drop down lists in the code editor? When I was trying different voices just now, I had to type out synth again before the drop down list with the colon+names appeared. I’m used to Ctrl+Space with other languages and editors. Is there an equivalent in Sonic Pi?


#10

No, sorry, it’s currently entirely automatic.

One thing you can do is to delete the space after synth and re-type it rather than retyping all of synth. That should at least be a bit easier.


#11

That’s perfectly acceptable!


#12

Fab! And by the way, thank-you so much for your kind and generous support on Patreon - it means a lot to me :slight_smile: