diff --git a/assets/images/MIDI_FIRST.jpg b/assets/images/MIDI_FIRST.jpg new file mode 100644 index 0000000..b73d004 Binary files /dev/null and b/assets/images/MIDI_FIRST.jpg differ diff --git a/assets/images/MIDI_SECOND.jpg b/assets/images/MIDI_SECOND.jpg new file mode 100644 index 0000000..b5197d2 Binary files /dev/null and b/assets/images/MIDI_SECOND.jpg differ diff --git a/assets/images/MIDI_THIRD.jpg b/assets/images/MIDI_THIRD.jpg new file mode 100644 index 0000000..addfc6e Binary files /dev/null and b/assets/images/MIDI_THIRD.jpg differ diff --git a/index.html b/index.html index b9ce7ed..fc9bf23 100644 --- a/index.html +++ b/index.html @@ -116,6 +116,7 @@
Project Notes + GitHub Repo
diff --git a/projects/index.html b/projects/index.html index 50034ac..8bc7ffb 100644 --- a/projects/index.html +++ b/projects/index.html @@ -134,24 +134,25 @@

Confirmed components & tools:

-

What I am currently learning: Translating musical MIDI data into C code arrays and coordinating buzzers, a display, and physical user inputs on a breadboard.

-

Next step: Recording build notes, refining the MIDI-to-C conversion workflow, and documenting the breadboard setup.

+

What I am currently learning: RLE compression of fragmented MIDI events into C struct arrays, acoustic transposition (+2 octaves) for passive piezo resonance, and Dual-Core FreeRTOS IPC between Core 0 (30 FPS OLED UI) and Core 1 (microsecond audio engine).

+

Next step: Migrating the dual-breadboard prototype onto a soldered perfboard or custom KiCad PCB.

Read Project Page + GitHub Repository
diff --git a/projects/midi-breadboard-instrument.html b/projects/midi-breadboard-instrument.html index 570f465..521e726 100644 --- a/projects/midi-breadboard-instrument.html +++ b/projects/midi-breadboard-instrument.html @@ -3,8 +3,8 @@ - MIDI Breadboard Instrument — Projects — Ertunç Özbay - + MIDI Breadboard Instrument (Desk Rave & 16-Track Symphony) — Projects — Ertunç Özbay + @@ -48,102 +48,161 @@
- Status: In progress / Experimental - Project 03 // Breadboard Hardware, C Code & Music + Status: Active Breadboard Prototype + Project 03 // ESP32, ESP-IDF C99, FreeRTOS & Python RLE Tooling
-

MIDI Breadboard Instrument

+

MIDI Breadboard Instrument — Desk Rave & 16-Track Symphony Controller

- A breadboard-based project that plays MIDI melodies by converting MIDI data into C code for the device. + A standalone, dual-core ESP32 MIDI synthesizer, drum sequencer, and 30 FPS SPI OLED visualizer written in ESP-IDF v5.2.2 (C99 / FreeRTOS), powered by a custom Run-Length Encoding (RLE) Python MIDI-to-C compiler.

- The hardware currently includes two active buzzers, one passive buzzer, a rotary encoder, a 1.3-inch AMOLED display, two buttons, and two LEDs. + What started as making a passive piezo buzzer squeak evolved into a full 16-track embedded music box with live kick/hi-hat drum transients, hardware PCNT quadrature rotary controls for real-time tempo and volume scaling, and dual-core FreeRTOS task isolation.

- Block diagram of the MIDI Breadboard Instrument showing the MIDI conversion script producing C code for the breadboard system, connected to two active buzzers, one passive buzzer, a 1.3-inch AMOLED screen, one rotary encoder, two buttons, and two LEDs. + Block diagram of the MIDI Breadboard Instrument showing the MIDI conversion script producing C code for the breadboard system, connected to two active buzzers, one passive buzzer, a 1.3-inch SPI OLED screen, one rotary encoder, two buttons, and two LEDs.
- Confirmed software-to-hardware workflow and component list for the MIDI Breadboard Instrument. + Software-to-hardware pipeline: Python RLE MIDI compiler (midi_to_c.py) generating flash-resident SequenceStep struct arrays for the dual-core ESP32 breadboard synthesizer.
+
+ + +
+
+ Full dual-breadboard overview of the ESP32 MIDI Breadboard Instrument +
+ Full Breadboard Layout: Dual-breadboard build featuring the ESP32 DevKit, 1.3" 7-pin SPI OLED display, KY-040 rotary encoder, tactile buttons, passive melody piezo, and dual active drum buzzers. +
+
+
+ Active 1.3-inch SPI OLED visualizer running at 30 FPS on the breadboard +
+ 30 FPS Live OLED Visualizer: Custom 5×7 font renderer displaying track code (WHISP), rotary mode (SPD / VOL), kick/hi-hat drum boxes, and dynamic frequency bars. +
+
+
+ Close-up of the rotary encoder, tactile buttons, LEDs, and three buzzers +
+ Controls & Acoustic Stage: Close-up of the rotary encoder, Play/Pause and Next Track buttons, green/red drum LEDs, and the 3-buzzer audio stage. +
+
+
+
+
- -

Combining Hardware, Software, and Creativity

+ +

From a Squeaking Buzzer to a Dual-Core Synthesizer

- This project represents the kind of work I enjoy most: combining hardware, software, music, experimentation, and creativity in a practical and unusual system on a breadboard. -

-

- To get melodies onto the hardware, I wrote a script that converts MIDI data into C code for the device. That generated C code drives the breadboard setup to play MIDI sounds while providing physical controls and visual feedback. + Pushing a bare-metal breadboard setup to play recognizable, energetic multi-track music required solving several real embedded systems challenges:

+
- -

Confirmed Components on the Breadboard

+ +

ESP32 Pinout & Architecture Specifications

- - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - - - - - + + +
Component / LayerConfirmed SpecificationComponent / PeripheralESP32 Pin / InterfaceFunction
Conversion WorkflowCustom script that converts MIDI data into C code for the deviceMicrocontrollerESP32 (Dual-Core Xtensa @ 160 MHz)ESP-IDF v5.2.2 + FreeRTOS dual-core execution
Device Code OutputC codeRotary Encoder CLK / DTGPIO 32 / GPIO 33Hardware PCNT quadrature tracking (1000 ns glitch filter)
Active Sound Components2 × Active buzzersRotary Encoder SWGPIO 16 (Active Low)Toggles knob & OLED HUD between Speed (0.2x–3.0x) and Volume (0%–100%)
Passive Sound Component1 × Passive buzzerPause / Next ButtonsGPIO 13 / GPIO 14 (Active Low)Play/Pause toggle and 16-track playlist cycling
Display1 × 1.3-inch AMOLED screenPassive Buzzer (Melody)GPIO 25 (LEDC 13-bit PWM)Main melody synthesizer driven by hardware LEDC Timer 0
Rotational Input1 × Rotary encoderActive Buzzer 1 & 2 (Drums)GPIO 26 (Kick) / GPIO 27 (Hi-Hat)Physical percussion transients on drum steps
Push Inputs2 × ButtonsKick & Hi-Hat LEDsGPIO 21 (Kick) / GPIO 22 (Hi-Hat)Visual beat indicators synchronized to drum hits
Visual Indicators2 × LEDs
Additional Circuit DetailsDetails will be documented as the project develops.1.3" 7-Pin SPI OLEDCS: 5, DC: 2, RES: 4, MOSI: 23, SCK: 1810 MHz SPI2 display running custom 30 FPS visualizer on Core 0
+
+ +

The 16-Track Symphony

+

+ All 16 tracks are stored in ESP32 flash memory as SequenceStep arrays featuring frequency, duration, kick_drum, and hi_hat triggers: +

+
    +
  1. Careless Whisper (Extended Club Edit)
  2. +
  3. Take On Me (EDM Build-up Edition)
  4. +
  5. Never Gonna Give You Up / Rickroll (Double Chorus)
  6. +
  7. Can't Help Falling In Love (Wedding Mix)
  8. +
  9. Gimme! Gimme! Gimme! (Midnight Rave)
  10. +
  11. Für Elise (Beethoven Trance)
  12. +
  13. Symphony No. 40 (Mozart Intense Strings)
  14. +
  15. Super Mario Bros. (Main Theme)
  16. +
  17. Pirates of the Caribbean 1 (He's a Pirate)
  18. +
  19. Pirates of the Caribbean 2 (The Black Pearl)
  20. +
  21. Rondo Alla Turca (Mozart)
  22. +
  23. Tetris (Korobeiniki)
  24. +
  25. Sonic the Hedgehog (Green Hill Zone)
  26. +
  27. Castlevania (Vampire Killer)
  28. +
  29. Seven Nation Army (Transposed +2 Octaves for piezo resonance)
  30. +
  31. Mega Man 2 (Dr. Wily Stage)
  32. +
+
+
- -

What I Am Currently Learning & Next Steps

+ +

Current State & Roadmap

- What I Am Currently Learning + Current State

- How data conversion scripts bridge file formats (like MIDI) into low-level C structures, and how multiple physical outputs (two active buzzers, one passive buzzer, two LEDs, and a 1.3-inch AMOLED screen) can be coordinated alongside user inputs (a rotary encoder and two buttons). + The firmware is rock-solid on the breadboard: the rotary encoder dynamically scales volume and tempo via lockless IPC variables, all 16 tracks play from flash memory, and the 1.3" SPI OLED renders real-time frequency bars and drum hits at 30 FPS.

- Next Step + Next Steps

- Documenting how the MIDI-to-C conversion script formats note events and adding further hardware notes as the breadboard prototype evolves. + Migrating the dual-breadboard circuit onto a soldered perfboard or custom KiCad PCB, and optionally re-integrating a WS2812B addressable RGB strip when expanding the enclosure.