Files
Cagire/docs/emitting.md

1.1 KiB

Emitting Sounds

The core of Cagire is emitting sounds. Every step script builds up sound commands and emits them to the audio engine.

The Sound Register

Before emitting, you must select a sound source using sound (or its alias s):

"kick" sound
"kick" s       ( same thing, shorter )

This sets the current sound register. All subsequent parameter words modify this sound until you emit or clear it.

Emitting

The . word emits the current sound:

"kick" s .     ( emit one kick )
"kick" s . . . ( emit three kicks )

Use .! to emit multiple times:

"kick" s 4 .!  ( emit four kicks )

Clearing

The clear word resets the sound register and all parameters:

"kick" s 0.5 gain . clear "hat" s .

This is useful when you want to emit different sounds with independent parameters in the same step.

Words

Word Stack Description
sound / s (name --) Set sound source
. (--) Emit current sound
.! (n --) Emit current sound n times
clear (--) Clear sound register and params