Skip to content

Commit

Permalink
suppport midierealtimein
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Nov 20, 2023
1 parent d9f9648 commit 6b7e92b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Next Release
* Objects: `[bang~]`
* Documentation fixes/additions
* Daisy: ability to set samplerate and blocksize
* Daisy: midirealtimein support
* DPF: enum for UI parameter IDs
* DPF bugfixes: correct input PortGroup names; correct UI slider updates
* Cleanup: remove deprecated build.json
Expand Down
29 changes: 29 additions & 0 deletions hvcc/generators/c2daisy/templates/HeavyDaisy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,35 @@ void HandleMidiMessage(MidiEvent m)
{
switch(m.type)
{
case SystemRealTime: {
float srtType;

switch(m.srt_type)
{
case TimingClock:
srtType = MIDI_RT_CLOCK;
break;
case Start:
srtType = MIDI_RT_START;
break;
case Continue:
srtType = MIDI_RT_CONTINUE;
break;
case Stop:
srtType = MIDI_RT_STOP;
break;
case ActiveSensing:
srtType = MIDI_RT_ACTIVESENSE;
break;
case Reset:
srtType = MIDI_RT_RESET;
break;
}

hv.sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, 0, "ff",
(float) srtType);
break;
}
case NoteOff: {
NoteOnEvent p = m.AsNoteOn();
hv.sendMessageToReceiverV(HV_HASH_NOTEIN, 0, "fff",
Expand Down

0 comments on commit 6b7e92b

Please sign in to comment.