Audio tutorial
We'll trigger a 4-note arpeggio when the user presses A. Audio in spriteCart is tracker-style ā patterns are 32 rows Ć 5 voices, each cell holds (note, instrument, volume, effect).
1. Open the starter cart
The starter triggers 0 play-pattern once on the first A-button press. The bundled SOND has one triangle instrument and one pattern (C-E-G-C arpeggio on channel 2).
variable started
0 started !
: update
1 cls
4 btnp if
started @ 0 = if
1 started !
0 play-pattern
then
then ;
2. Edit the pattern
Switch to the Sounds tab. The pattern grid is on the right. Click any cell to position the cursor, then type a note (ZāM = lower octave, QāU = upper). The Inst sub-column takes hex digits 0āF to pick the instrument; Vol takes a single hex digit for volume.
3. Compile + Run + press A
The pattern plays once. To play again, the cart's started variable gates the trigger ā change it to allow re-trigger or to loop.