An expressive, quasi-Ptolemaic semi-modular synthesizer
GitHub - gregrecco67/AudiblePlanets: An expressive, quasi-Ptolemaic semi-modular synthesizer.
Audible Planets (v1.1)
An expressive, quasi-Ptolemaic semi-modular synthesizer.


Demos

Audible Planets was chosen for the KVR Forums' "One Synth Challenge" in May 2024. Competitors submit tracks made using only one synth, and it's pretty impressive what they are able to accomplish under those constraints. Here's a playlist.
Demo Track by Riley Hutton - All sounds were generated by Audible Planets (excluding drums and transition FX).

Features

"Orbital Modulation" (OM) synthesis
Modulation matrix with monophonic and polyphonic modulation for most parameters
Built-in effects chains

Raison d'être
I wanted to know what Ptolemy's "equant" would sound like. More on that below.
Overview
Four bodies revolve with uniform circular motion, each around one of the others or, in the case of the first body, a fixed central point. Each body around which no other body revolves serves as an oscillator, producing sound. The interpretation of these terminal bodies as oscillators depends on their positions as viewed from a point that is either at the fixed center of revolution or nearby, at a point called the "equant," more in honor of Ptolemy than in strict adherence to his system (hence "quasi-Ptolemaic"). In the engine's fully modulated state (i.e., with the "Demodulate" knob turned all the way down), only the direction of a line connecting the equant to the terminal body matters to the sound, just as, in Ptolemy's system, the distances of the heavenly bodies are unknown. This system of sound generation closely resembles frequency modulation (FM) synthesis. The relative speeds of revolution of the various bodies have their analogues in the frequencies of so-called "carrier" and "modulator" (or "operator") waves in traditional FM synthesis. Accordingly, the interface allows both ("coarse") whole-number and ("fine") fractional variation of these relative frequencies, producing a wide array of timbres, from the pure and simple to the densely inharmonic. An animation of a simplified orbital model (only two planets, no equant) can be viewed here: click on the circles beside the "P2," "demod," and "mod" folders to show the second planet, the demodulated signal, and the modulated signal.

Gratitude
I'll speak later about some of the sources of inspiration for this project, but don't want to go any further without acknowledging that none of this would have been possible for someone like me—a humanist with an idea, not a software engineer—without the wealth of open-source tools, instruction, and advice provided freely by the community of professionals and enthusiasts. I'm especially grateful for the existence of the JUCE framework and for the many helpful extensions to it provided by Gin (which did a LOT of heavy lifting). Early prototypes were built in VCV RACK, which was a relatively easy way to get started with audio programming and boasts a vibrant community. As a novice who needs a lot spelled out, I got quite a lot out of Will Pirkle's teacherly books. Finally, mostly by lurking and poring over old posts, but sometimes by posing ill-formed questions and follow-ups of my own, I learned a lot on the Discord server for The Audio Programmer, mostly that other people who do this kind of thing regularly know a lot more than I am ever likely to.
Operation
Enough of that. How to use this thing?
Installation
The plugin is available in VST3, LV2 (both for Windows, Mac OS, Linux), and AU (for Mac OS only) formats, here. Since there is no installer, you will have to place the plugin file in the right place yourself. On Windows, place the VST3 file in /Program Files/Common Files/VST3. On Mac OS, place the VST3 file in ~/Library/Audio/Plug-Ins/VST3 and/or the AU file in ~/Library/Audio/Plug-Ins/Components. (You will need the AU component if you plan to run the synth in Logic or GarageBand.) On Linux, place the VST3 file wherever your DAW looks for it, which should include ~/.vst3 as a default. More info on default VST3 file locations here and LV2 locations here. On a Mac, you will need to take the additional step of authorizing the plugin to run, either from the Privacy & Security settings panel, or by typing xattr -dr com.apple.quarantine <file location> in a Terminal window.
Alternatively, you can build it from source:
git clone --recurse-submodules https://github.com/gregrecco67/AudiblePlanets.git
cd AudiblePlanets

Then, if on Mac OS:
cmake -B build -G Xcode .
cd build
open AudiblePlanets.xcodeproj

and compile the project in Xcode.
Or, on Linux (using Ninja):
cmake -B ninja-build -DCMAKE_BUILD_TYPE=Release -G Ninja .
cd ninja-build
ninja

On Windows, using Visual Studio, just open the folder and wait for it to parse the CMake file. The CMake project defaults to producing a standalone version of the plugin, too, but on Windows at least, the performance is poor. If you don't want it or any other particular format built, just remove the entry from the FORMAT line in juce_add_plugin in CMakeLists.txt. The project is configured to copy the plugin to the right place after building it.
Presets
Presets can be viewed either as a flat list, by clicking on the current preset name, or in a browser that divides them by author and category, by clicking on the folder icon to the left of the current preset name. In case you want to install any manually, on Windows, the folder location should be %HOMEPATH%\AppData\Roaming\com.void-star\Audible Planets\programs. On Mac OS, it should be ~/Library/Application Support/com.void-star/Audible Planets/programs. On Linux, it should be ~/.config/com.void-star/Audible Planets/programs. Some older example presets are available in this repo, which I'm leaving up mostly for anyone using version 1.0. That said, if you come up with any patches you'd like to share, please feel free to make a pull request on that repo or just message me here on Github.
Pages
The synth has two pages: "Main" and "Effects." The Main page contains the main controls for sound generation and modulation. The Effects page contains the built-in effects arranged in one or two chains.
Main Page
The four revolving bodies are controlled by the four panes of the OSC section. Their relative speeds can be adjusted with the "Coarse" and "Fine" controls, or an absolute frequency can be set with the "Fixed" control. With the "Tones" knob set to minimum and the "Saw" switch set to "Off," the motion of the body is uniform and circular. In this mode, adjusting the relative starting points of the various oscillations (with the "Phase" control) can change the sound a lot. When "Tones" is turned up, the motion of the body is no longer uniform and circular, but is modulated with extra whole-number multiples of the main frequency. The "Saw" switch turns the motion into a diagonal sawtooth wave. Both enrich the spectrum of the oscillator, but have different effects on the final sound depending on the level of the "Demodulate" control, which effectively determines the amount of phase modulation. The "Sidechain" switch (in "Global" )changes the motion of the first oscillator to a semicircular projection of whatever audio is piped in. In addition to these ways to enrich the individual "spectrum" of each oscillator, there is a general "Blend" control in the "Timbre" section, which takes the interpretation of the bodies' positions as phases, not of a pure sine wave, but of a mix of sine, saw, and square waves. The presence of "Spread," and "Pan" controls for each oscillator indicates that the orbital algorithm described in the overview above is computed for multiple voices over two channels, and slight variations in position and frequency between the latter can bring movement, width, and depth to the sounds produced. Each orbit's radius can be modulated by one of the four envelopes.
In the Timbre section, in addition the "Blend" control, there's one that modifies the position of the equant, the point from which the motions of bodies are observed. The function of the "Demodulate" knob has already been described, but I will add that in many cases, turning it up tends to mellow the sound, removing the sideband frequencies produced by the phase modulation introduced by the orbital algorithm, making it function more like a rudimentary additive synth. Furthermore, since the size of all the orbits is variable, the audible planet or planets may pass very close to the equant, or even through it, resulting in sharp corners and/or discontinuities (and some unavoidable aliasing). This could (and can) be avoided by making the outer orbits smaller, but that also reduces their contribution to the overall sound. The "Squash" control flattens the outer orbits along perpendiculars to their orbits about the equant, as seen below.

This brings them farther from the center without diminishing their effect as much as reducing their radii would, since the modulated portion of the signal depends only on the angle about the center (or equant, if displaced). That said, if you begin with a configuration where epicycles are sufficiently small, increasing the "Squash" factor will introduce new harmonics, sharpening the sound. Finally, the "Algorithm" control switches between different arrangements of the oscillators, with different "terminal" bodies. In many cases, the first algorithm (1-2-3-4) is the harshest, and the last the least harsh (since the modulation is less compounded), but the effects vary depending on the relative sizes of the orbits and other factors, so it's worth trying out different algorithm settings as you're trying to dial in a sound.
The controls in the "Global" section include controls for monosynth and legato modes, glissando and portamento at an adjustable rate, velocity sensitivity, pitchwheel range, and overall volume. There's also a dedicated per-voice filter, with cutoff, resonance, and key tracking controls, and a variety of common filter types.

The partially open circles found in the LFO, envelope, and MSEG panel headers, as well as in the "Mod Sources" section pictured above, are sources of modulation. The single-line versions are "mono" and the double-line versions "poly," which is to say the latter are different for each voice (or currently playing note). To use any of them, click and drag from the source to the destination, or just click on it to activate "Learning" mode: it will turn white, and while the synth is in this mode, you can assign modulation from that source just by dragging on the knob for the parameter you want to modulate. Press 'ESC' or 'L' to exit this mode. Almost any knob can have its setting modulated, and that goes for the controls on the Effects page, too. When a parameter is modulated, a small orange circle appears in the upper-right corner of the control. Clicking and dragging it (or using a mouse scroll wheel while hovering) will increase or decrease the modulation amount, in a positive or negative direction, or both, and a right click will allow you to select which mod source to edit or delete. More spacious sets of modulation controls are available in the "Mod Matrix" section. Right-clicking the small circle will give the option to remove any or all of the modulation sources attached to it, or to switch to editing the value of a different source. Small white dots on the periphery of the control indicate the modulated value or values of the parameter for whichever voices are active. Many controls accept text input, and all can be adjusted with high precision by dragging while holding down the control key.
In addition to the main "orbital" model, two additional sound sources for the sake of layering are available: an auxiliary oscillator and a rudimentary sampler. Finally, a "Macros" section allows modulation of several parameters at once by one knob, which can be assigned to respond to a MIDI CC message. Just click "Learn" beneath the knob, and then activate the control you want to assign to it on your MIDI controller. A CC number will appear below the knob to indicate the assignment was successful. Click on the "Clear" button below it to remove the assignment.
Effects Page
The "Effects" page contains slots for up to eight built-in effects, arranged in one or two chains ("A -> B" or "A || B"), each with its own gain control, applied before the signal enters the chain. Ordering the effects chains differently can open up a lot of possibilities. Since the effects parameters can be modulation destinations, there's a mod sources panel on this page, too, as well as a modulation matrix panel, showing the currently active modulations, and offering controls to bypass, adjust, or delete them. In combination, the effects on this page can add a lot of boost, especially when modulated with sources that can constructively interfere. A built-in limiter is accordingly always on and meant to keep the levels below 0 dB, but be careful nonetheless.
Motivation / Inspiration
This began as a sort of recreational programming task. I learned about Ptolemy's system and wanted to understand one of the features that made it so successful for so long (millennia). Many people who know nothing else about Ptolemy know about his use of epicycles. But epicycles predate his system. What he added was a way of making the model better fit the variations in motion that gave the "planets" their name, by use of what he called the "equant" point. As I pointed out above, the equant doesn't have to be at the center of the main circle (the "deferent"), with the result that the planet's motion appears even more accelerated or decelerated at certain points in its trajectory than it is by the mere interaction of deferent and epicycle alone. (In Ptolemy's system of planetary motion, the equant and center of observation function differently, but with a similar effect.)
The particular two-fold question I wanted to investigate was this: "If the sine wave is the projection of uniform circular motion onto a line, what wave would be produced if we were to observe regular circular motion off-center, from the perspective of something like the equant point? And what would it sound like?" It's not just a vertically displaced sine wave (a DC offset). When the planet is closer to the equant, it also appears to move faster, and slower when it's farther. This means there is a sort of temporal "wave shaping" going on: part of the sine wave is accelerated and part slowed down. If you've played with sound waves geometrically like this, you might not be surprised to learn that, sonically, that reshaping results in the same fundamental frequency and the appearance of higher harmonics. In more complex cases, the equant may affect different harmonics differently.
In the pictures below, you can see the effect of the position of the equant on the wave shape. The first picture shows a simple sine wave: I've turned all but oscillator 1's volumes to zero and the "Demodulate" knob to 1.0. The second shows the sound with the equant above the center, the third with it below. In both cases, the wave has lost its symmetry, one side is a steep ascent, the other a correspondingly lengthened decline.



I don't think there exists another synth with an "equant" control, but I have to admit that, in the end, its usefulness is limited. Its effect tends to get lost when the interplay of other parameters produces sawtooth-like wave shapes, but when starting from purer tones, it can impart a (somewhat?) distinctive character to the sound. The big surprise for me was how consequential it would turn out to be to either ignore or include the orbiting bodies' distance from the observer in the way the model produces sound (as controlled by the "Demodulate" knob). Some clues as to why this is so can probably be gleaned from examining the model.
Another sort of oblique inspiration was this cover of the NYT "Science Times" from April 24, 1979. Just seeing familiar notation allegedly representing the "music of the spheres" was intensely provocative and the image stayed with me, as well as the idea that, somehow, people were using computers to investigate it and actually generate sound. I was a fan of Isao Tomita's take on Holst's "The Planets," which surely somehow contributed to my interest.

A complementary inspiration is the world of FM synthesis. I didn't set out to create a synth that works via frequency modulation or phase modulation, but that's what interpreting the orbits as sound waves has led to. I joked with some friends that "Orbital Modulation" could be a marketing-friendly term for this "innovative new form of synthesis." In truth, you could probably make most of the sounds possible here (and many more) with any capable FM synth. But what I think I've accomplished by way of novelty is to expose a lot of musically or sonically relevant controls for adjustment and modulation in an arrangement that is easier to use than some.
In playing the synth, I find a lot of single controls (especially the equant, demodulation, and individual oscillator volume and phase controls) have a kind of significant threshold, where a lot of change happens in a small range. The controls expose a lot of "edges." Connecting these parameters with the MIDI Polyphonic Expression (MPE) modulation sources or others opens up a lot of possibilities. I hope that makes it easy to make sounds that are more or differently expressive and dynamic, and to find the sweet spots. If you've made it this far, thank you for reading. I'd be interested to hear what you think of it all. Happy music-making and "safe journeys, space fans, wherever you are."
