Midi latency on macOS 10.14 Mojave

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

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?

Hi, what happens if you try the following:

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

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.


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?

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!


HAHAHAHAHAHAHAHAHA! Brilliant! :slight_smile:

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

Both I think :slight_smile:

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

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?

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.

That’s perfectly acceptable!

1 Like

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: