Squirrel Tutorial

Let's compose some music first. Here's the song (found sheet music on google and typed it out)

edcd eee2 ddd2 egg2 edcd eeee dded c1

It's "Mary Had a Little Lamb."

Now let's make the file for squirrel:

.TRACK 0 .CHANNEL 0 T69 V31 L4 P15,15 .CHANNEL 1 O5 @0 edcd eee2 ddd2 egg2 edcd eeee dded c1

Let's test it:

mml2pce mml/mary.mml huc squirrel.c

Great. It sounds very boring. Let's take a closer look.

.CHANNEL 0 set things up for the song & defaults for the real channels T69 the song's tempo... make sure to choose one that makes you feel good. V31 master volume (loud) L4 default note-length--in this case, notes are quarter notes unless otherwise specified. P15,15 stereo panning--in this case, equally loud on both left and right .CHANNEL 1 this is the channel where some music notes will live O5 octave 5, i guess @0 set an instrument edcd eee2 ddd2 egg2 edcd eeee dded c1 these are the notes in the song

Let's make it more interesting by adding another channel.

.CHANNEL 2 O4 @0 cg<g>g cg<g>g cg<g>g cg<g>g cg<g>g cg<g>g cg<g>g cg<g>g

...which we can clean up using a loop like this:

[8 cg<g>g]

A bit better(?) but still sounding pretty plain. Let's tweak the instruments/envelopes, add a bit of progression with a second-round harmony, and loop it.

Here's the final song:

.TRACK .CHANNEL 0 T69 V31 L4 P15,15 foo=edcd eee2 ddd2 egg2 edcd eeee dded c1' the melody bar=cg<g>g' the backup .CHANNEL 1 AAA O5 @28 @E5 random instrument and envelope... trial and error until you give up and pick one. [2(foo)] loop the melody twice /AAA/ this loops to the start of this channel .CHANNEL 2 BBB O4 @20 @E13 [7(bar)]cge2 now with artificial flavor [7(bar)]cgc2 /BBB/ .CHANNEL 3 CCC O3 @22 @E4 [8r1](foo) rest for the first loop and then come in on the second round /CCC/

And that's a song.
mary.mml
mary.pce