Is There a Way to Auto-Sort Single Cycle Waveform Samples?

What I want is a way to sort and arrange batches of 128 or 256 single cycle waveforms by harmonic content from dullest (sines) to brightest (saws + noise) so that it will make sense when I make them into wavetables later.

I was having limited success using Ableton’s new Sound Similarity Search feature, but it’s just not specific enough for this particular task.

Surely there’s an application or synth that can handle this, right? Maybe a wavetable synth that can sort a folder? Or one of the wavetable librarian apps? I haven’t been able to find a way to do this but it’s definitely not a unique problem, right?

Thank you for your time,

Dylan aka ill.Gates

You’d need to define, mathematically, how you would measure brightness, since even in the simplest case there are two variables (which harmonic, and the relative volume of the harmonic to the fundamental) and you’re taking about brightness as if it’s a single variable.

Sorry not trying to be a smart@@ss, I just really don’t know how to measure ‘brightness’ even though it might seem to be intuitively obvious.

I’m making a script to do it with Python now, but I’m not an experienced dev so I’m probably making rookie mistakes.

so far this is what GPT and I came up with:

Explanation of the Script

  • Feature Extraction: For each waveform, we compute:
    • Spectral Centroid: Indicates the “brightness” of the sound.
    • Spectral Flatness: Measures how noise-like a sound is.
    • Zero Crossing Rate: Number of times the signal crosses zero amplitude.
  • Composite Score: Weights are assigned to each feature to compute a single score representing the waveform’s complexity.
  • Sorting and Selection:
    • Waveforms are sorted based on the composite score.
    • We select 256 waveforms evenly spaced along the sorted list to capture the full range from simple to complex waveforms.

I’m still getting some random sounding insertions within the gradients though…

You’re way ahead of me … I’m out :slight_smile:

1 Like