Fall 2023 ︎︎︎ SUNY Purchase ︎︎︎ (DES3090) Interactive & Experience Design
Knitting circle: Miscellaneous Code Snippets
IntroductionThe following are code snippets that are relevant to individuals, but might be helpful for other folks. These are not presented as extensively as other warm-ups, please consult me if you want more of a background.
MIDI and CPX
MIDI is, musical instrument digital interface. It is a protocol for how digital instruments can talk with computers. The Circuit Playground Express can function as a MIDI controller.
The main thing this will be helpful for is producing “meaningful” audio as the CPX is severly limited in this capacity, even if you hook it up to an aux cord as outlined in a previous warm-up. This could be as simple as triggering a long recorded speech or polyphony (multiple notes at the same time) no a synthesizer.
Here is a page with a great example of how to get started with the CPX and MIDI The touch sensors will provide what are called “note on” and “note off” information. You can test it with an online Web MIDI synthesizer or a program like Ableton Live (free for 30 days)︎︎︎ Garageband (free for Macs).
You should be able to get started with the code there, You’ll need to find the appropriate “adafruit_midi” library and install it into your CPX in the “lib” folder. You’ll need to modify that example to do what you’d like.
Here is a quick video about music theory, if you need that related to your project.
Annotated Sound Meter Code
︎Back to Interactive & Experience Design