This commit is contained in:
2025-09-01 02:34:01 -04:00
parent 9787fd4681
commit e173ebae4e

View File

@@ -81,7 +81,7 @@ I asked around a few places about this, and I got answers ranging from "why woul
Enter the [SparkFun MIDI Shield for the Arduino](https://www.sparkfun.com/products/12898)! This shield gives you MIDI-IN and MIDI-OUT ports and interfaces with the internal serial bus of the Arduino. And [there is a fully feature-complete library for it as well](https://github.com/FortySevenEffects/arduino_midi_library), allowing one to easily build MIDI functionality in the Arduino IDE. Enter the [SparkFun MIDI Shield for the Arduino](https://www.sparkfun.com/products/12898)! This shield gives you MIDI-IN and MIDI-OUT ports and interfaces with the internal serial bus of the Arduino. And [there is a fully feature-complete library for it as well](https://github.com/FortySevenEffects/arduino_midi_library), allowing one to easily build MIDI functionality in the Arduino IDE.
All the pieces came together for me: I just had to write a bit of conditional code that would read in the MIDI CC#4 events, track the hi-hat "openness" state, handle nodes asynchronously, and rewrite the YC signal to be a BC signal whenever the hi-hat was opened. All the pieces came together for me: I just had to write a bit of conditional code that would read in the MIDI CC#4 events, track the hi-hat "openness" state, handle notes asynchronously, and rewrite the YC signal to be a BC signal whenever the hi-hat was opened.
As part of this, I leveraged the Pro MIDI adapter's ability to map multiple notes to each game note, so I would send note 22 for the Hi-Hat yellow cymbal, but send note 26 for the Crash yellow cymbal, so they could operate independently. I'd then rewrite only note 22 events based on the pedal, so the crash would always work while the hi-hat would change in response to the pedal. As part of this, I leveraged the Pro MIDI adapter's ability to map multiple notes to each game note, so I would send note 22 for the Hi-Hat yellow cymbal, but send note 26 for the Crash yellow cymbal, so they could operate independently. I'd then rewrite only note 22 events based on the pedal, so the crash would always work while the hi-hat would change in response to the pedal.