Inspiration

The inspiration came fron developing equalisers and exploring the resonant frequencies of different sounds. We began to wonder, what would midi controllable resonance sound like?

What it does

Refract is a virtual instrument that allows synthesis by applying a bank of resonant filters to amplify frequencies in an audio clip using midi to control the resonant frequencies. It allows for adding additional harmonic bands at multiples of the resonant frequencies. This plugin can generate pitched sounds from noise or percussion.

How we built it

The core of this audio processor is a polyphonic synthesis engine designed around the principle of resonating a noise or input signal. It can output up to four voices at a time. Each voice features a dynamic filter bank composed of up to sixteen individual band-pass filters. These filters are tuned to the harmonic series of a given musical note, controlled with midi. These additional harmonics can be used to control the timbre. All sound parameters, including the envelope and mixing controls, are managed by a thread-safe parameter system to ensure stability when the user interface interacts with the high-priority audio processing.

Challenges we ran into

A significant challenge was maintaining filter stability at extremely high resonance settings. This required implementing a safeguard to slightly limit the maximum filter coefficient, preventing runaway feedback and preserving the integrity of the output signal. Another technical hurdle was effectively managing the audio processing logic to seamlessly switch between the internal noise generator and the external sidechain input within the strict constraints of the real-time audio thread. Ensuring a smooth and reliable polyphonic voice management system was crucial to avoid clicks or dropouts when multiple MIDI notes were played and released rapidly.

Accomplishments that we're proud of

We achieved a successful implementation of a switchable signal exciter, allowing the processor to function both as a synthesizer (using internally generated noise) and as an audio effect (using external sidechain input to excite the filters). This dual functionality significantly expands the tool's versatility. We are also proud of the stable, polyphonic control system, which reliably manages the activation, deactivation, and reuse of four distinct voices to ensure smooth playback without clicks or dropouts. The core accomplishment remains the dynamic tuning mechanism that allows the filter bank to instantly align to musical pitch.

What we learned

We gained valuable experience in digital filter theory, learning how to translate a desired pitch and resonance value into the exact coefficients required for an IIR band-pass filter at the current sample rate. We reinforced our understanding of the requirements for a stable polyphonic architecture and how to handle voice priority and stealing. Finally, we strengthened our skills in writing thread-safe audio code, relying on atomic variables as the robust bridge for all control communication between the control layer and the low-latency audio processing thread.

What's next for Refract

Check out Refract on Musehub! We plan to polish the UI further. We also plan to add more dynamic limiting to amplify resonance whie preventing the output from blowing up.

Built With

Share this project:

Updates