8-Channel I Ching: Form & Speed — User Guide
Generates eight independent chance-based variations of one source. Six binary line throws per variation control slice reversal and form a binary code that maps to playback speed; optional Cage-inspired chance operations add silence, boundary jitter, pitch shifts, and variable slice counts.
What this does
The script creates eight independently generated transformations of the selected Sound. For each channel it throws six binary line states, reads those states both as a Yin/Yang reversal pattern and as a six-bit numerical code, reforms the source from slices, applies a hexagram-code-derived speed factor with Praat's overlap-add Lengthen, and finally routes the eight working channels into the selected output format.
What is the I Ching relationship here?
The six generated binary lines are displayed as a hexagram and are also mapped to the corresponding King Wen number. The audio algorithm does not use the King Wen number to calculate speed. Speed is driven by the separate binary code of the six lines. The line throws are fair 0/1 random choices; this is a compositional chance procedure based on hexagram structure, not a full reconstruction of a traditional divination method.
- Eight variations: one independently thrown six-line pattern per channel; repeated hexagrams are allowed.
- Form: Yin lines reverse slices; Yang lines leave slices forward.
- Speed: the six-bit code maps continuously onto the active speed range.
- Chance extensions: optional channel silence, slice-boundary jitter, per-Yin-slice pitch shift, and variable slice count.
- Output: octophonic, stereo-pair stems, quad-group stems, four-channel fold-down, or stereo odd/even mix.
- Reproducibility:
Random_seed = 0uses an unpredictable generator; a positive seed produces a repeatable random sequence.
Quick start
- Select exactly one Sound in Praat.
- Run
8-channel_I_Ching.praat. - Choose a Preset. Custom uses the values shown in the form; the named presets replace deviation and speed bias.
- Use Random_seed = 0 for a new unpredictable result, or a positive integer for reproducibility.
- Leave the optional Cage-inspired operations off for the basic six-slice form/speed process, or enable them selectively.
- Choose the required Output_format.
- Enable Draw_visualization and Play_result as needed.
Hexagrams & chance
Six line throws
Binary code and King Wen identity
Repeated hexagrams
The eight hexagrams are generated independently, so they are not forced to be unique. The Info report explicitly notes repeated pairs when they occur.
Seed behaviour
A positive Random_seed calls Praat's predictable seeded generator before any chance decisions. Seed 0 initializes the generator safely and unpredictably. The same positive seed and the same settings reproduce the script's sequence of hexagram throws and optional random operations.
Form transformation
Standard six-slice mode
With Variable_slice_count off, the source is divided into six equal temporal regions. Slice s uses line s. A Yin line reverses that slice; a Yang line leaves it forward. The slices remain in their original slice order.
The processed slices are joined with Concatenate with overlap. The requested Slice_crossfade is limited to at most 40% of the shortest valid slice. If there is only one valid slice or the overlap is zero, ordinary concatenation is used.
Variable slice count
When enabled, a separate chance draw chooses a slice count from 4 through 12. The six hexagram line states are then cycled across the slices:
The one-to-one relationship between six lines and six slices therefore applies only when the slice count is six.
Multichannel sources
Source slices retain the source channels during slicing and reversal. After recombination, a multichannel result is converted to mono before the channel-specific speed stage. This conversion is an ordinary channel average; there is no cancellation-safe strongest-channel fallback in this script.
Speed mapping
Active speed range
The resulting speedFactor is converted to a Praat time-scaling factor:
Lengthen (overlap-add) uses the user-set Min_pitch and Max_pitch. This is intended to change duration while retaining pitch approximately; suitability depends on the source and the pitch range supplied.
Presets
| Preset | Deviation | Bias | Resulting script range |
|---|---|---|---|
| Custom | Form value | Form value | Computed from the entered values |
| Subtle | 0.05 | 0 | 0.95–1.05× |
| Moderate | 0.20 | 0 | 0.80–1.20× |
| Extreme | 0.50 | 0 | 0.50–1.50× |
| Chaos | 1.00 | 0 | 0.10–2.00× |
| Slow Drift | 0.20 | -0.15 | 0.65–1.05× |
| Fast Drift | 0.20 | +0.15 | 0.95–1.35× |
| Micro-variations | 0.02 | 0 | 0.98–1.02× |
Sampling frequency
After the speed stage, every working channel is resampled with precision 50. With Override_sampling_frequency on, the target is Target_sampling_frequency; otherwise the source sampling frequency is used.
Optional chance extensions
Silence by chance — 4'33" homage
Each channel receives a separate six-bit chance throw. The channel is replaced by silence when:
Because the throw has 64 discrete states, the effective probability is quantized. The Info report prints the exact number of qualifying states and the actual percentage for the chosen threshold.
Jittered slice boundaries
When enabled, each slice start and end is independently displaced by up to Boundary_jitter × nominal_slice_duration. The parameter is clamped to 0–0.45. Boundaries are then constrained to the source domain.
This can omit source material, overlap source regions, and create unequal slice lengths. It is not a time-bracket system: after extraction, the slices are still joined consecutively.
Indeterminate pitch shift on Yin slices
Only reversed Yin slices are eligible. For each such slice a fresh six-bit draw determines a shift value across:
The value is passed to Praat's Shift pitch (PSOLA) using Min_pitch and Max_pitch. This is a pitch shift; it is not pitch inversion around an axis.
Variable slice count
A separate chance operation chooses 4–12 slices. The six primary line states are cycled when the number of slices differs from six.
Output formats
Because the eight speed factors create different durations, all eight working channels are explicitly zero-padded to the duration of the longest channel before output routing.
Stage 1: shared gain
The largest peak across the eight working channels is measured, and one shared gain is applied to every channel so that the largest reaches 0.95. Relative levels between channels are therefore preserved.
| Output format | Objects | Routing | Final normalization |
|---|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | out1–out8 = Ch1–Ch8 | Shared-gain stage only |
| 4 stereo pairs | 4 × stereo | Ch1|Ch2, Ch3|Ch4, Ch5|Ch6, Ch7|Ch8 | Shared-gain stage only |
| 2 quad groups | 2 × 4-channel | Ch1–Ch4 and Ch5–Ch8 | Shared-gain stage only |
| 4-channel fold-down | 1 × 4-channel | 1=Ch1+Ch5, 2=Ch2+Ch6, 3=Ch3+Ch7, 4=Ch4+Ch8 | Finished object peak-scaled to 0.95 |
| Stereo mix | 1 × stereo | L = odd channels; R = even channels | Finished object peak-scaled to 0.95 |
Preview playback
For a single output object, Play_result plays that object. For the multi-object stem formats (4 stereo pairs and 2 quad groups), the script creates a temporary stereo monitor mix with odd channels on the left and even channels on the right, plays that monitor, then removes it. The monitor is not one of the returned output objects.
Parameters
| Parameter | Default | Actual role |
|---|---|---|
| Preset | Custom | Named presets replace deviation and bias; Custom uses the form values. |
| Deviation_range | 0.20 | Half-width of the nominal speed range. Negative values are clamped to 0. |
| Speed_bias | 0.0 | Moves the centre of the nominal speed range. |
| Random_seed | 0 | 0 = unpredictable; positive integer = reproducible chance sequence. |
| Min_pitch | 75 Hz | Lower pitch argument for overlap-add and optional PSOLA shift; must be below Max_pitch. |
| Max_pitch | 600 Hz | Upper pitch argument. |
| Override_sampling_frequency | on | Chooses target resampling rate instead of restoring the source rate. |
| Target_sampling_frequency | 44100 Hz | Resampling target when override is on. |
| Slice_crossfade | 0.005 s | Requested slice overlap; capped to 40% of the shortest valid slice. |
| Silence_by_chance_4_33 | off | Enables an independent chance silence decision per channel. |
| Silence_probability | 0.05 | Chance threshold, clamped to 0–1 and realized on 64 discrete states. |
| Jittered_slice_boundaries | off | Randomizes extraction boundaries; does not create timeline gaps. |
| Boundary_jitter | 0.15 | Maximum boundary displacement as a fraction of nominal slice length; clamped to 0–0.45. |
| Indeterminate_pitch_shift | off | Applies a separately drawn PSOLA shift to each Yin slice. |
| Pitch_shift_centre | -0.5 | Centre of the optional shift range passed to Praat. |
| Pitch_shift_spread | 0.4 | Half-width of that range; negative values are clamped to 0. |
| Variable_slice_count | off | Chooses 4–12 slices by a separate chance draw. |
| Output_format | 8-channel octophonic | Selects the routing/output-object layout described above. |
| Draw_visualization | on | Draws the current 8 × 8 analysis/process figure. |
| Play_result | on | Plays the output or, for multi-object stem formats, the temporary stereo monitor. |
Visualization
The v0.5.1 figure is an analysis/process display and is independent of the chosen output format because it reads the eight working channels before cleanup.
Implementation notes & edge cases
- Non-zero Sound start time: if the selected Sound does not begin at time 0, the script first extracts the full source into a zero-based working Sound so slice boundaries remain correct.
- Unequal durations: speed processing intentionally produces different channel lengths; they are padded to the longest before combining.
- Slice validity: jittered boundaries are constrained to the source, and slices of 1 ms or less are discarded.
- Fallback: if no valid slices remain for a channel, the working source is copied instead of leaving the channel undefined.
- Silenced channels: silence still passes through the subsequent speed/resampling stage, remaining silent while acquiring the channel's calculated duration.
- Source stereo image: the eight algorithmic channels are mono-derived; the original multichannel spatial image is not preserved.