multitrack-score

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Multitrack score

Play "Ode to Joy" through the default audio device from the repository root.

CGO_ENABLED=0 go run ./internal/test/synth/multitrack-score

Add -out ./ode-to-joy.wav to render a stereo WAV without opening a device. By default, the lead uses generated PCM. To replace the opening lead with a mono or stereo file that the codec package can decode, use -sample ./clip.wav -root-hz 220.

Listen for the bass and percussion under the melody, then the sustained notes and stereo movement in the middle. The final note releases into a rest, where its tail fades before the score ends.

Coverage checklist

Feature Public API Passage and check
Duration and overlapping tracks NewSequencer, Track, Note The lead, bass, and drums share a start and overlap. The WAV test checks melody and drum events at their expected frames. The sequencer test checks concurrent track output.
Rests, release tails, and score end Silence, ReadFrames Rests separate notes. The final rest exposes the tail. The WAV test checks the audible tail and exact file length. Synth tests check EOF, a zero-track score, and a zero-duration score.
PCM mix and clipping NewSequencer, audio.NewMixer The full arrangement mixes several simultaneous tracks. Synth tests compare signed, unsigned, and floating-point clipping to the device mixer.
Continuous and scheduled sine NewTone, Sine.NewVoice A continuous sine supplies the low pad in the last three bars. A scheduled voice plays the bass throughout.
Voice controls TriggerAt, ReleaseAt, RetriggerAt, SetGainAt, SetPitchAt, SetPanAt, FadeAt, CutAt The sequencer triggers and releases the notes. Bass notes retrigger near zero, change gain, pitch, and pan, then fade and cut. Exact control events are checked in the synth tests.
Pitched PCM and one-shot drums NewPCMInstrument, PitchHz, PitchSampleStep, LoadPCMInstrument Opening bars play pitched one-shots. The 808-style and 909-style kicks alternate every two bars. The WAV test checks the melody and both kick attacks and tails. The file-loading test checks decoded frames and loop points.
ADSR and source offsets NewADSR, Trigger.OffsetSourceFrame The lead releases during attack in bar 3. Bars 5 and 6 start the clip at a source offset. Synth tests verify both boundaries.
Tick modulation PointEnvelope, TickVoice.ScheduleTick The faster ticks in bars 5 and 6 drive the pan and vibrato. A tick envelope shapes the 909-style kick volume. The WAV test checks stereo motion. Synth tests check pitch, pan, volume, and tick ordering.
Sample loops SampleLoop, LoopForward, LoopPingPong, SustainLoop Bar 4 holds a forward loop, bars 5 and 6 use bidirectional loops, and the last bars release sustain loops. Synth tests check sample order and release across read sizes.

Documentation

Overview

Command multitrack-score plays or renders a short sequenced arrangement.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL