$ maccordion --start

> MACcordion

// Turn Your MacBook into an Accordion

Lid angle sensor as bellows. Keyboard as keys. Real-time polyphonic synthesis at 44.1 kHz.

MIT macOS Python 3 v0.0.1

Features

Everything you need to play accordion on your MacBook

πŸ“

Lid Angle Sensor

Reads the MacBook lid opening angle and converts it into bellows push/pull force β€” the wider you move, the louder it gets

🎡

Real-Time Synthesis

PolyAccordionSynth engine with dual detuned sawtooth waves and soft-clipping, outputting at 44.1 kHz in real time

🎹

Keyboard Mapping

Two-octave keyboard layout mimicking piano black and white keys, with octave transposition support

πŸŽ›οΈ

Live Tweak Panel

GUI sliders for real-time adjustment of bellows sensitivity, reed thickness, air noise, and 11 parameters total

See It in Action

Watch how the MacBook lid becomes your bellows

Download & Install

Get started in seconds

Recommended

Pre-Built App

Download the ready-to-run macOS app. No Python or dependencies needed.

Download MACcordion.app

Requires macOS. Check Releases for all versions.

Run from Source

pip install pygame numpy sounddevice pybooklid
python maccordion.py

Build .app Yourself

chmod +x build_mac_app.sh
./build_mac_app.sh

# Run it
./dist/MACcordion.app/Contents/MacOS/MACcordion

Requires macOS + Python 3 (for source/build). Falls back to simulation mode (arrow keys) when the lid angle sensor is unavailable.

Key Bindings

Mid Range (MIDI 60–78)

White keys: Q W E R T Y U I O P

Black keys: 1 2 4 5 6 8 9 0

High Range (MIDI 72–94)

White keys: Z X C V B N M , . /

Black keys: A S D F G H J K L ;

Release Shift = octave up | Release Ctrl = octave down | Tab = reset to default

Support This Project

If you enjoy this project, consider buying me a coffee or donating via crypto!

β˜• Ko-fi

⟠ Ethereum Donation

0xF821eaE8df237022F17235C36eb22D8426b989A4