Thanks again for the detailed explanation.
After thinking about it more, I realized that the most important part of my request is not necessarily stateful processing.
The “magnetic attraction” example from my original post was only one possible use case.
What I am primarily interested in is giving users mathematical control over the frequency placement of individual partials.
Conceptually, I imagine something like a Frequency Formula or Ratio Formula that allows users to define where each partial is placed.
For example, expressions such as:
h**1.02
could create stretched harmonic series,
while:
h + 0.1*sin(h*0.5)
could create subtle inharmonic structures.
Or conditional expressions such as:
(h > 8) * (h**1.03) + (h <= 8) * h
could affect only higher partials.
Ideally, this Formula would support the same operators, functions, and conditional expressions that are already available in the current Formula system.
One thing I find particularly interesting is the possibility of working in both ratio space and frequency space.
For example, it could be useful to access values such as:
ratio (the current frequency ratio of the partial)
and:
partialFreq (the actual frequency of the partial in Hz).
These two representations are related, but they are useful for different types of sound design.
Ratio-based operations are very natural for things such as:
- stretched harmonic series
- inharmonic spectra
- microtonal frequency mappings
- harmonic structure design
Frequency-based operations are useful for things such as:
- formant attraction
- resonance attraction
- fixed-frequency harmonic quantization
- spectral alignment to arbitrary frequency sets
Another interesting possibility would be a helper function such as:
snap(value, targetSet, amount)
which attracts a value toward the nearest element in a user-defined target set.
For example:
snap( partialFreq, harmonicSeries(55, 70, 82.4), 0.8)
Here, harmonicSeries() would generate a target frequency set from one or more fundamentals.
For example:
harmonicSeries(55)
could generate frequencies such as:{55, 110, 165, 220, 275…}
while:
harmonicSeries(55, 70, 82.4)
could combine multiple harmonic series into a single target set.
This could attract partials toward the combined harmonic structures of multiple fundamentals, enabling chord-like spectral designs.
Another use case could be:
snap( partialFreq, {800, 1200, 2500}, 0.8)
which could attract partials toward a formant structure or resonant frequency set.
With:
amount = 0 the original value remains unchanged.
With:
amount = 1 the value fully snaps to the nearest target.
Values between 0 and 1 would smoothly interpolate between the original and snapped positions.
Because the target set is user-defined, the same mechanism could potentially be used for:
- harmonic quantization
- chord-based spectral attraction
- microtonal systems
- formant structures
- resonant frequency sets
- Colour Bass style spectral design
- experimental inharmonic spectra
To me, the exact implementation is less important than the capability itself.
Whether this takes the form of a Frequency Formula, a Ratio Formula, or some combination of both, I think giving users mathematical control over partial frequency placement would open up a huge range of new sound design possibilities.