The Joys of Cocoa (in 2024)
The McLaren Synth Kit presents audio synthesis as the construction of a graph of audio operators (voices) with the parameters of each type of operator determined by an associated model. Voices define the code that is run in the audio thread and models hold the values that are read from the audio thread. This separation allows the audio thread code to be ensured that maniplations on the models do not block. With models safely out of the audio loop, UI interactions with model properties is straightforward and can use Cocoa idioms for manipulating property values.
At least that was the intent. The McLaren Synth Kit was released without associated GUI controls, but we believed it would be straightforward to define controls for the various models.
But we had never fully defined a Cocoa-based application that rested on the Synth Kit. We finally put it all together in our newly released application called “Synth80”.
Synth80 is a two-oscillator multi-timbral polyphonic synthesizer. This application pulls together the following features.
- Cocoa bindings for linking Controllers to McLaren Synth Kit Models
- Document-based application for saving and restoring presets
- Undo/Redo facility
- Single Document Interface document-based application for the singleton Synthesizer window
This article summarizes some of the things we learned about using Cocoa this way while developing Synth80.
Focus on Data Structures
We found that we were able to focus on modeling data more than building GUI elements. The models for our synthesizer elements (envelopes, oscillators, filters, etc) were designed first, with controls added later.
Read More »The Joys of Cocoa (in 2024)