# [sdiy] Analysis modues, memory access patch cables

cheater cheater cheater00social at gmail.com
Sun Jan 29 16:23:39 CET 2023

```Modules that *measure* the incoming signal in some way are definitely
the next step in the evolution of synthesis. You could also have
trigger modules, which send out a trigger if something special
happens. Some possible measurements you could take include:
- roughness, as you mentioned. Send trigger if below or above a certain value.
- loudness (i.e. envelope follower). Send trigger if zero for longer than t.
- frequency (i.e. audio to pitch). Send trigger if can't find it
longer than t; or send trigger if settled longer than t.
- slope (how quickly the sound falls off from fundamental); send
trigger of too bright or send trigger if too close to sinewave
- self-correlation (if you already have the pitch of the signal, how
similar are the subsequent cycles?); send trigger if it goes
under/over certain value; send trigger if a jump was expected (eg a
saw core reset) but didn't happen
- loudness at specific frequencies (eg low / mid / high) - basically
vocoding. you could also say this is a measure of the distribution of
incoming signal samples vs frequency, i.e. how many values (in %) of
the incoming signal are in a certain frequency bin. You could also
sample wave cycles into the various bins and use them for something.
- distribution of voltage values, i.e. how many (in %) values of the
incoming signal are at a specific voltage. basically the classical
distribution of a time series.
- bayesian predictor: given the history of the signal, predict the
immediate next value, or a value that's t seconds into the future (t
is probably much less than 1 second)
- bayesian probability: given the history of the signal, evaluate how
probable the current signal was
- state machine analyzer: analyze the incoming signal as generated
from a state machine. guess the state machine. predict next output
value / evaluate probability of latest input value (like bayesian
predictor / probability)
- predictive transformer based predictor / analyzer (basically a
simplified version of the GPT algorithm)
- FFT edge finder: look at the FFT of the sound coming in, do a curve
fit using f(x) = x, x^2, x^3, x^1/2, x^1/3, exp(x), and log_e(x), and
output what the current slope is of the curve, what the slope is
between the curve at the start and end of the window, and how concave
the curve is (i.e. the signed (pos/neg) area between the curve and the
2nd slope). Also output the certainty of your curve fit. The window is
rolling, and output evaluated at every sample.
- polyphony analyzer: how polyphonic is the current sound?
- chord analyzer: what is the current chord root? what is the current
chord type? Output trigger if can't find chord / can find chord.
- ???

The vocoder idea to store wave cycles suggests to me that it would be
nice to have patch cables that can carry instantaneous access to wave
data for subsequent modules. I.e. if you have a vocoder that collects
waveforms into its internal memory and sorts them into low/mid/high
frequency bins, patch a cable from e.g. low, to an oscillator, and
that oscillator has access to all those wave cycles, and can then play
them e.g. like a wavetable (scan the index from 0 to 255 or whatever)
or probabilistically (play the various waveforms depending on some
random cycle)

The "vocoder storing a wave" could be broken up into two modules:
1. a vocoder that classifies the current input wave cycle as
low/mid/high freq, and on top of what a vocoder normally does, it
outputs the wave via a digital cable, including its low/mid/high
classification, to another module
2. a module that stores the waves and provides them on a digital
output, and contains memory to store past incoming values

then, the second module could provide a vco the memorized values, and
the vco could make sense of them on its own. the vco could then play
back the waves. the waves are still stored on the storage module, and
at every instant, when the vco needs a waveform, it asks the storage
module to send it over. obviously this would require a high speed

the vco could could then decide which waves to play back based on
whatever parameter is attached to the waves. imagine something like a
database table (eg sql) where one column contains the waveform, and
the next column contains its low/mid/high classification.

obviously the classification could be something else, e.g. the
roughness value, or anything else you've managed to analyze from the
waveform. or there could be multiple classifications, eg vocoder band
+ roughness + bayesian probability analyzer, and then eg you can have
a vco knob that goes from (low roughness + low probability) to (high
roughness + high probability) while also randomly cycling through
vocoder bands at every cycle.

at that point various set theoretic tools known from sql become
available too (JOIN, INNER JOIN, WHERE, <. >, AND, OR, ...)

Just letting my creativity run free

Best regards

On Sun, Jan 29, 2023 at 11:05 AM David Huss <dh at atoav.com> wrote:
>
> Roughness as a measure is described by Zwicker and Fastl in their 1990 book: Eberhard, and Hugo Fastl. Psychoacoustics: Facts and Models
>
> Afaik there is also an ISO standard for sound roughness.
>
> What such a broad measure as roughness would mean for synthesis, who knows. You would have to pick your poison there.
>
> I think there is a lot of potential in the inverse tho: a module that spits out a CV with the perceived roughness of incoming audio.
>
> On January 29, 2023 6:39:17 AM UTC, cheater cheater via Synth-diy <synth-diy at synth-diy.org> wrote:
> >BTW here's a bunch of sounds of varying roughness to listen to:
> >
> >"Rating EAS Alarms From Different Countries!"
> >
> >sadly someone's talking over them but you can hear enough.
> >
> >On Sun, Jan 29, 2023 at 7:37 AM cheater cheater
> ><cheater00social at gmail.com> wrote:
> >>
> >> Is it possible to define roughness so that a sound can be said to have
> >> a specific amount of roughness at a specific frequency? It appears to
> >> me that some sounds seem to sound "rough" at high frequency parts of
> >> their spectrum and other sounds at low frequency parts, or others yet
> >> at mid freq parts.
> >>
> >> Maybe a spectral envelope of roughness vs frequency could be produced
> >> (kind of like level vs frequency which is just the normal audio
> >> spectrum of a sound)
> >_______________________________________________
> >Synth-diy mailing list
> >Synth-diy at synth-diy.org
> >http://synth-diy.org/mailman/listinfo/synth-diy
> >Selling or trading? Use marketplace at synth-diy.org
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org
```