builtins note_{on,off}: error was reported even when function completed successfully (#37)

This commit is contained in:
Robert Bendun 2023-01-08 09:56:34 +01:00
parent ad95299a7e
commit 986545b2ec

View File

@ -1215,6 +1215,7 @@ static Result<Value> builtin_note_on(Interpreter &interpreter, std::vector<Value
note = interpreter.current_context->fill(note); note = interpreter.current_context->fill(note);
interpreter.midi_connection->send_note_on(chan.as_int(), *note.into_midi_note(), vel.as_int()); interpreter.midi_connection->send_note_on(chan.as_int(), *note.into_midi_note(), vel.as_int());
} }
return Value{};
} }
return Error { return Error {
@ -1252,6 +1253,7 @@ static Result<Value> builtin_note_off(Interpreter &interpreter, std::vector<Valu
note = interpreter.current_context->fill(note); note = interpreter.current_context->fill(note);
interpreter.midi_connection->send_note_off(chan.as_int(), *note.into_midi_note(), 127); interpreter.midi_connection->send_note_off(chan.as_int(), *note.into_midi_note(), 127);
} }
return Value{};
} }
return Error { return Error {