# \[Solved\] Help troubleshooting MIDI input

**URL:** <https://in-thread.sonic-pi.net/t/solved-help-troubleshooting-midi-input/764>\
**Category:** \[P\] Patreon Support\
**Created:** [February 16, 2018, 3:00pm UTC](https://in-thread.sonic-pi.net/t/solved-help-troubleshooting-midi-input/764 "2018-02-16T15:00:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![polar](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@polar](https://in-thread.sonic-pi.net/u/polar)\
**Post date:** [February 16, 2018, 3:00pm UTC](https://in-thread.sonic-pi.net/t/solved-help-troubleshooting-midi-input/764/1 "2018-02-16T15:00:33Z")

</div>

Hi all!

I’m brand new to Sonic Pi and am trying to get the MIDI in example from the online help to work with my M-Audio Keystation Mini 32.

Here’s the code:

```
live_loop :midi_piano do
  use_real_time
  note, velocity = sync "/midi/keystation_mini_32/0/1/note_on"
  synth :piano, note: note, amp: velocity / 127.0
end

```

I’m seeing log messages from it like:

```
/midi/keystation_mini_32/0/1/note_on [52, 64]
/midi/keystation_mini_32/0/1/note_on [52, 0]

```

… when I hit the keys, so that’s working.

- I confirmed that the /midi/ device matches, but it’s not triggering sounds.
- I can add play commands and those play notes as well

I assume it’s something simple that I’m missing. I’m on a 2008 Macbook Pro 15" running 10.11.6 and Sonic Pi 3.1.0.

Any idea what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![polar](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@polar](https://in-thread.sonic-pi.net/u/polar)\
**Post date:** [February 16, 2018, 6:41pm UTC](https://in-thread.sonic-pi.net/t/solved-help-troubleshooting-midi-input/764/2 "2018-02-16T18:41:49Z")

</div>

I figured it out.

I think I must have had “Enforce timing guarantees” set. I noticed “Out of time” messages in the logs and tracked it to a suggestion in the issue tracker on github.

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [February 17, 2018, 9:31am UTC](https://in-thread.sonic-pi.net/t/solved-help-troubleshooting-midi-input/764/3 "2018-02-17T09:31:22Z")

</div>

Sorry about that - this is a bug - threads that are in real time mode should bypass the timing guarantee check. I’ll fix this before the next release, but until now, you’re right - the solution is to uncheck the “Enforce timing guarantees”.
