This project is a MIDI file player that controls solenoids to create physical sound or movement based on MIDI notes. It's designed to run on a microcontroller and can play MIDI files from multiple subdirectories in a specific order.
This project is part of the "»ensamble«" exhibition at Carmen Araujo Arte gallery in Caracas, Venezuela:
- Exhibition #108: »ensamble«
- Artists: Armando Pantoja, Miguel La Corte, Pepe López
- Dates: October 19, 2024 - November 24, 2024
- Location: HLTPC. Secadero 2, Caracas
The exhibition brings together three artists from different disciplines creating a visual and sonic essay through rhythm. The installation features eighteen solenoids by musician Miguel La Corte distributed across a "tambor palitero" (traditional drum) crafted by drum maker Armando Pantoja and 6 paintings by visual artist Pepe López. Through this exercise, each rhythm reveals the understanding of the essential conditions that form time, proposing rhythm as a way to define and express time through culture.
- The system boots up and looks for numbered subdirectories (1, 2, 3, etc.) in a
/midi_files
directory. - For each subdirectory, it selects a random MIDI file.
- The selected MIDI file is loaded into memory.
- The system waits until the next 5-second interval since boot time to ensure synchronized playback across multiple devices.
- The MIDI file is played, controlling solenoids based on specific MIDI notes.
- After playing a file, the system waits for 10 seconds before moving to the next subdirectory.
- This process repeats for all subdirectories, then starts over.
- A microcontroller compatible with CircuitPython (e.g., Adafruit Feather, Raspberry Pi Pico)
- 4 solenoids connected to digital pins (D5, D6, D9, D10)
- Power supply suitable for your solenoids
- MicroSD card module (if your microcontroller doesn't have built-in storage)
- CircuitPython firmware installed on your microcontroller
- Required CircuitPython libraries:
digitalio
,time
,random
,os
- Install CircuitPython on your microcontroller if not already installed.
- Copy the
code.py
file to the root directory of your microcontroller. - Create a
/midi_files
directory on your microcontroller. - Inside
/midi_files
, create numbered subdirectories (1, 2, 3, etc.). - Place MIDI files in these numbered subdirectories.
- Connect your solenoids to the specified pins (D5, D6, D9, D10).
- Power up your microcontroller.
- Modify the
noid_pins
list to match your solenoid pin connections. - Adjust the
notes
list to change which MIDI notes trigger the solenoids. - Change the timing intervals in the main loop if needed.
- Ensure all directories and files are named correctly.
- Check the console output for any error messages.
- Verify that your MIDI files are valid and not corrupted.
Be cautious when working with solenoids and power supplies. Ensure proper wiring and use appropriate safety measures.
This project is licensed under the MIT License - see the LICENSE file for details.
- Based on original code by Liz Clark for Adafruit Industries
- MIDI file parsing adapted for CircuitPython