Neon Noir – a small cinematic synth piece using the Teensy Audio Library

Mcu32

Well-known member

Neon Noir – a small cinematic synth piece using the Teensy Audio Library​

First of all, a big thank you to Paul Stoffregen and everyone who has contributed to the Teensy Audio Library. It is a fantastic piece of work.

I've been working on ESP-beatsy, a port of the Teensy Audio Library to the ESP32 family. The goal is to preserve the familiar API wherever possible, while adapting things to the ESP32's hardware, memory and scheduling constraints.

A small disclaimer: ESP-beatsy is very much a work in progress. At this stage, the repository is still a PlatformIO project rather than a polished, independently packaged library. The library code lives in the lib/ directory. I'm actively working on it and continuously adding, improving and refining things.

I thought it might be nice to share a small example of what can be done without writing an excessive amount of code.

Neon Noir is a generative synth piece with a cinematic, retro-futuristic atmosphere, broadly inspired by the kind of mood associated with Blade Runner and Vangelis. It doesn't reproduce any existing melody or recording; I wanted to explore that general atmosphere with the audio library.

The patch combines:

  • Four slightly detuned oscillators for evolving pad chords
  • A synthesized bass with filtering and an envelope
  • A wavetable lead and an airy, choir-like upper layer
  • Low drones and pink noise for a machine-like ambience
  • A slowly modulated low-pass filter on the lead
  • A tempo-synchronized, four-tap delay
  • Stereo Freeverb reverb
  • A distant, pitch-swept siren heard through the reverb
  • Stereo I2S output and CPU-usage diagnostics


  • Audio graph at a glance

    The example uses 30 audio-stream objects connected by 39 AudioConnection instances:

    ComponentCount
    AudioSynthWaveform9
    AudioSynthWavetable2
    AudioSynthNoisePink1
    AudioMixer48
    AudioFilterBiquad4
    AudioEffectEnvelope3
    AudioEffectDelay1
    AudioEffectFreeverbStereo1
    AudioOutputI2S1
    Total audio-stream objects30
    Audio connections39
    The graph combines synthesis, filtering, envelopes, mixing, multi-tap delay, stereo reverb and I2S output. The codec control object is not included in the counts.

On my rather old ESP32 Gen 1, the audio graph uses a little over 70% of Core 1, typically around 74%, with brief peaks of approximately 79%.

The ESP32 version requires PSRAM for the reverb. Make sure PSRAM is available and enabled on your board.

I would expect a Teensy 4.x to run this patch more comfortably, but that's only an expectation — I haven't measured it on a Teensy yet. The ESP32-S3 and ESP32-P4 have also not been tested with this example so far.

I've prepared a separate Teensy 4.x version for this forum post, using the SGTL5000 Audio Shield. It is deliberately not part of the ESP-beatsy repository. My Teensy hardware is currently disassembled, so I haven't been able to compile or test that version yet. Please consider it an untested adaptation rather than a confirmed working sketch.

The attached ZIP contains the compact wavetable tables used by the example, derived from the New Vintage Dreams SoundFont, which is released under CC0 1.0.

Links:

Use Earphones.

I hope someone finds the example useful or simply enjoys listening to it. And thanks again to Paul and all the contributors for making this kind of experimentation possible.
 

Attachments

  • NeonNoir_Teensy_SGTL5000.ino
    12.4 KB · Views: 33
  • NeonNoir_Wavetable_Tables_CC0.zip
    3.2 KB · Views: 43
Last edited:
A new example: DrumComputer (wavetables - sounds good ;) . Running this on the Teensy should be straightforward now (adapt codec, remove recording feature, finished.)
I just converted the recording to MP3 with ffmpeg.

Code

Recorded MP3

@Paul Stoffregen, you can use the examples (or all the “new” ones from my repo) for your library.
 
Last edited:
I've added a Filter calculator for FIR Filter: <- click here ;)

Edit: Also: Biquad, EQ Chain

Screenshot 2026-10-15 131135.png
 
Last edited:
1793451795747.png


The tools now contain:
- Biquad Calculator
- EQ Chain
- FFT Window Lab
- FIR Calculator

Audio Tools :
- .wav-record repair (ESP wav record only),
- .wav To Sketch (Resampler: 80-tap, 512-phase windowed-sinc FIR, with anti-alias filtering)
- Advanced MIDI 2 Sketch (requires changes for player)
- SF2 SoundFont to AudioSynthWavetable:



1793465197957.png

If you want to try: Free SF2 is here (a v1 compatible bank is 128, percussion)
 
Last edited:
Back
Top