back to home

shorepine / amy

AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers

404 stars
23 forks
43 issues
CJupyter NotebookPython

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing shorepine/amy in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/shorepine/amy)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers AMY is a fast and small music synthesizer library written in C with Python, Javascript, GDScript and Arduino bindings. It can easily be embedded into almost any program, architecture or microcontroller. It can be used as a very good analog-type synthesizer (Juno-6 style) a FM synthesizer (DX7 style), a partial breakpoint synthesizer (Alles machine or Atari AMY), a very good synthesized piano, a sampler or wavetable synth (where you load in your own PCM data), a drum machine (808-style PCM samples are included), or as a lower level toolkit to make your own combinations of oscillators, filters, LFOs and effects. AMY supports MIDI internally and can manage synthesizer note messages for you, including voice stealing and assigning controller changes. We've run AMY on: • the web • Mac and Linux, and small Linux devices like the Raspberry Pi • ESP32, ESP32S3 and ESP32P4 • Teensy 3.6, Teensy 4.1 • Playdate • Pi Pico RP2040, the Pi Pico 2 RP2350 • iOS devices • Electro-Smith Daisy (ARM Cortex M7) • Godot • And certainly much more AMY is highly optimized for polyphony and poly-timbral operation on even the lowest power and constrained RAM microcontroller but can scale to as many oscillators as you want. AMY powers the multi-speaker mesh synthesizer Alles, as well as the Tulip Creative Computer. Let us know if you use AMY for your own projects and we'll add it here! AMY was built by DAn Ellis and Brian Whitman, and would love your contributions. **Chat about AMY on our Discord!** More information • **Interactive AMY tutorial** • **AMY API** • **AMY Synthesizer Details** • **AMY's MIDI specification** • **AMY in Arduino Getting Started** • **Other AMY web demos** AMY supports • MIDI input support and synthesizer voice management, including voice stealing, controllers and per-channel multi-timbral operation • A strong Juno-6 style analog synthesizer • An operator / algorithm-based frequency modulation (FM) synth, modeled after the DX-7 • PCM sampler, reading from a baked-in buffer of percussive and misc samples, or by loading samples into RAM, or playing from files on disk directly, with loop points and base midi note • Wavetable oscillator • karplus-strong string with adjustable feedback • An arbitrary number of band-limited oscillators, each with adjustable frequency, pan, phase, amplitude: • pulse (+ adjustable duty cycle), sine, saw (up and down), triangle, noise • Stereo audio input or audio buffers in code can be used as an oscillator for real time audio effects • Biquad low-pass, bandpass or hi-pass filters with cutoff and resonance, can be assigned to any oscillator • Reverb, echo and chorus effects, set globally • An additive partial synthesizer • Each oscillator has 2 envelope generators, which can modify any combination of amplitude, frequency, PWM duty, filter cutoff, or pan over time • Each oscillator can also act as an modulator to modify any combination of parameters of another oscillator, for example, a bass drum can be indicated via a half phase sine wave at 0.25Hz modulating the frequency of another sine wave. • Control of overall gain and 3-band EQ • 300+ built in preset patches for PCM, DX7, piano and Juno-6 • A front end for DX7 and Juno-6 SYSEX patches and conversion setup commands • Built-in event clock and pattern sequencer, using hardware real time timers on microcontrollers • Multi-core (including microcontrollers) for rendering if available • File transfer to the host The FM synth provides a Python library, that can convert any DX7 patch into an AMY patch. The Juno-6 emulation provides and can read in Juno-6 SYSEX patches and convert them into AMY patches. The partials-driven piano voice and the code to generate the partials are described here. Using AMY in Arduino AMY will run on many modern microcontrollers under Arduino. On most platforms, we handle sending audio out to an I2S interface and handling MIDI input. Some platforms support more features than others. **Please see our more detailed Getting Started on Arduino page for more details.** Using AMY in Python on any platform You can in Python and have it render either out to your speakers or to a buffer of samples you can process on your own. To install the library, run . You can also run to install the library and run a series of tests. **Please see our interactive AMY tutorial for more tips on using AMY** Using AMY on the web We provide an port of AMY that runs in Javascript. See the AMY web demos. To build for the web, use . It will generate in . Using AMY in any other software To use AMY in your own software, simply copy the .c and .h files in to your program and compile them. No other libraries should be required to synthesize audio in AMY. To run a simple C example on many platforms: AMY quickstart **Please see our interactive AMY tutorial for more tips on using AMY** MIDI mode AMY provides a MIDI mode by default that lets you control many parts of AMY over MIDI. You can even control the underlying oscillators over SYSEX. See our MIDI documentation for more details. The simplest way to use AMY is to start it and them play MIDI notes to it. By default, AMY boots with a Juno-6 patch 0 on MIDI channel 1. In Python: In C: In Javascript (see minimal.html for the full example): AMY supports note commands, some MIDI controllers, and program changes to change the patch. Controlling AMY in code Presumably you'd like to explicitly tell AMY what to play. You can control AMY from almost anything. We mostly work in Python, C or Javascript, but AMY has been built to work with anything that can send a string. AMY has two API interfaces: _wire messages_ and . An AMY wire message is a string that looks like , with each letter corresponding to a field (like means , means midi note 50, means patch number 130, etc.) Wire messages are converted into s within AMY once received. So in C, or JS, you'd fill an struct to…