edna.examples

aeriths-theme

Example

A tune from Final Fantasy VII
[:piano {:octave 4, :tempo 74} [1/8 #{:e :f# :-a :-d} :a 1/2 #{:f# :+d}] [1/8 #{:-e :e :+c} :a 1/2 #{:e :c}] [1/8 #{:e :f# :-a :-d} :a :+d :+c# :+e :+d :b :+c#] [1/2 #{:-e :c :a} 1/2 #{:e :c}]]

dueling-banjos

Example

Put different pieces in a set to make them play simultaneously
#{[:guitar {:octave 3} 1/16 :r :r 1/8 :g :r :d :r :g :g :d] [:banjo {:octave 3} 1/16 :b :+c 1/8 :+d :b :+c :a :b :g :a]}

intro-1-single-notes

Example

Here are all twelve notes
[:piano :c :c# :d :d# :e :f :f# :g :g# :a :a# :b]

intro-2-attributes

Example

Hash maps let you change the attributes of everything that comes after them. Here are all the attributes you can change: :octave - The octave (default is 4) :length - The note length (default is 1/4) :tempo - How fast or slow notes are played (default is 120) :pan - How far left/right the note is panned in your speaker (default is 50) :quantize - The percentage of a note's full duration that is heard (default is 90) :transpose - Moves all notes up or down by a desired number of semitones (default is 0) :volume - The volume (default is 100) :key-signature - A set of notes with accidentals -- either a sharp (#), flat (=), or natural (_) -- whose purpose is to set the default accidental for that note when it doesn't include one (default is #{}) :play? - Whether or not to play (default is true) Read more about attributes here: https://github.com/alda-lang/alda/blob/master/doc/attributes.md
[:piano :c :d {:octave 3} :c :d]

intro-3-octave-shorthand

Example

You can change an individual note's relative octave with a + or - inside the keyword. If you want to change by more than one octave, just put a number after.
[:piano :c :-c :+2c]

intro-4-length-shorthand

Example

A shorthand way of changing the note length is simply to write the number.
[:piano :c :d 1/2 :e :f]

intro-5-chord

Example

A chord is just notes in a set
[:piano #{:c :d}]