Sanic Boom

Your first piece

Write, arrange, and export a short piece with built-in sounds

This tutorial uses built-in synths. You only need the desktop app.

Play one bar

Open a new file, paste the script, and press Play in the transport.

tempo 96, 4/4
play [C4 E4 G4 E4] |> sine |> gain(0.25)

The four notes fill one bar. sine supplies the sound, and gain(0.25) sets its level. The pattern repeats until you stop playback.

While the piece plays, replace the second note with _ and choose Evaluate. The underscore makes a rest. With Auto-evaluate on, you can make the same edit without pressing Evaluate. Playback updates according to the sync setting in the transport.

[C4 G4 E4]
Click the second step to swap E4 for a rest. Count four beats as the pattern repeats.

Give the piece an opening and an answer

Replace the script with this version:

tempo 96, 4/4

let opening = [C4 E4 G4 E4]
let answer = [A4:2 G4 E4]
let bass = [C2 _ G2 _]

section "Opening" 2
    play opening |> sine |> gain(0.22)

section "Answer" 2
    play answer |> sine |> gain(0.22) |> reverb(size: 0.45, mix: 0.18)
    play bass |> triangle |> gain(0.12)

Each section lasts two bars. The bass enters with the answer. The weight in A4:2 gives A4 twice the duration of each of the other notes in its bar.

Save and export

  1. Use File → Save to keep the source as a .sanic file.
  2. Choose File → Export Audio…, then select WAV.
  3. Choose Bars, set it to 4, and add a tail if you want the final reverb to decay. Choose Loop instead to export the complete section arrangement, or one combined pattern cycle if your script has no sections.

Open the resulting WAV to hear the piece outside Sanic. To look up a pattern operator, synth, or effect, start in the reference. To use an installed instrument or effect plug-in, see VST3.

On this page