The source machine is the first stage in each SquiggleBoyVoice and is responsible for generating (or forwarding) the raw signal before filtering and amplitude shaping.
Each voice currently supports four source machine modes:
DualWaveShapingVCO.hpp.PhysicalModelingSource.hpp.SampleSource in DualSampleSource.hpp.The primary sound source is the Dual Wave Shaping VCO (DualWaveShapingVCO), which consists of two complex wavetable oscillators (VectorPhaseShaperInternal) that can modulate each other.
The core of each oscillator is a randomly generated, constantly morphing additive wavetable (MorphingWaveTable).
m_morphHarmonics), which determines how many harmonics are included.The oscillators use Vector Phase Shaping (VPS) to distort the read phase of the wavetable. This is controlled by two parameters per oscillator:
The Dual Wave Shaping VCO contains two such oscillators (VCO 0 and VCO 1):
detune). VCO 1 runs at baseFreq * offsetFreqFactor / detune.m_crossModIndex.fade).BitRateReducer) for digital degradation.The Thru source machine allows external audio to be routed through the voice’s filter and amp sections. It is currently a simple pass-through for external signals, allowing the synthesizer to act as a polyphonic filter bank and envelope shaper for outside audio.
The Physical Modeling source machine (PhysicalModelingSource) is a noise-driven resonant source built around a damped comb. The chain is:
CombFilterWithOnePole) with delay compensation.This source owns a UIState that implements TransferFunction, so the visualizer can draw the combined pre-comb SVF and comb response in the Source bank.
The Sample source machine (SampleSource) reads from one AudioBufferBank per voice. The bank is assigned in the Voice Config grid and points at a directory under the Smart Grid One samples/ root.
.wav files in the selected directory.SampleBankPosition scans across the loaded WAV files. Even segments select a single file; odd segments linearly blend adjacent files.PhasorPlayHead, which reads a selected Theory of Time loop through GetIndirectPhasor(...).SampleStart and SampleLength define a wrapped window inside the normalized sample domain.SampleReadSpeed selects quantized reverse, stopped, and forward rates from -4x through 4x.GrainManager<AudioBufferBank>, reusing the grain/resynthesis path used by the phase-vocoder components.Directory navigation and loading are asynchronous:
IoTaskThread.DirectoryExplorer handles folder traversal and selection.Yes) builds a new AudioBufferBank and swaps it into the selected voice during acknowledgment.LoadAudioBufferBankFromDirectory tasks for each saved relative sample directory.The JUCE voice config page now displays:
The Source visualizer bank includes SampleTrioWaveformVisualizerComponent for Sample voices. It draws min/max waveform buckets for the active trio’s three sample banks, highlights the active start/length window in each voice color, and overlays the current read-head position.
Parameters are tagged with which source and filter machines they apply to (see Encoder System). When a source machine is selected, only matching source-specific controls are connected (e.g. VCO harmonic/phase controls for Dual VCO, comb/damping controls for Physical Modeling). This keeps the interface focused on controls relevant to the active machine.
Sample-specific Source bank controls are only visible for Sample voices:
SampleLoopIndex: chooses which of the six Theory of Time loops drives the read head.SampleStart: normalized start position of the playback window.SampleReadSpeed: quantized read speed, including reverse and stopped playback.SampleLength: normalized wrapped length of the playback window.SampleBankPosition: position across the WAV files loaded in the selected bank.