11 halp_meta(name,
"Midi Pitch")
12 halp_meta(c_name,
"PitchToValue")
13 halp_meta(category,
"Midi")
14 halp_meta(author,
"ossia score")
15 halp_flag(deprecated);
16 halp_meta(manual_url,
"https://ossia.io/score-docs/processes/midi-utilities.html#midi-pitch")
17 halp_meta(description,
"Extract a MIDI pitch")
18 halp_meta(uuid,
"29ce484f-cb56-4501-af79-88768fa261c3")
22 halp::midi_bus<
"in", libremidi::message> midi;
26 struct : halp::timed_callback<
"out",
int>
28 halp_meta(unit,
"midipitch");
34 for(
const auto& note : inputs.midi)
36 if(note.get_message_type() == libremidi::message_type::NOTE_ON)
37 outputs.out(note.timestamp, (
int)note.bytes[1]);