MIDI on RPi- notes but no sound

Hi again,
found another topic by @robin.newman for note_off .
Since I get real note_off events from the Arturia keyboard (and not only note_on with velocity 0) I could simplify the event loops somewhat:

set :value, 0
use_synth :dsaw
ns = []

live_loop :midi_piano do
  use_real_time
  note, velocity = sync "/midi*/note_on"
  x = play note, amp: velocity/127.0 * get(:value)/127.0, sustain: 5 # if velocity>0 #uncomment if note_on with velocity 0 is used for note_off
  ns[note] = x
end

live_loop :midi_off do
  use_real_time
  note, velocity = sync "/midi*/note_off"
  x = ns[note]
  control x, amp: 0, amp_slide: 0.25
end

live_loop :midi_cc do
  use_real_time
  c, value = sync "/midi*/control_change"
  set :value, value  if (c==74)  #I used controller value 74 when testing
end