❮❮ ❯❯  00:00:00:00
LEGEND   PersonSuitcaseTrainBicycle
CHAPTERS  (click to expand)
BOOKMARKS  (click to expand)
WORKSHOP GUIDANCE
  • Press = (equals) to open a cell's formula editor.
  • Blocks of cells can be selected and labelled (using the " key), then referenced in code as an array using the @ prefix and a subscript [n]:

    @Notes - the first labelled cell (or its .param value)
    @Notes[1] - the second cell (here, the first note)
    @Notes[2].pitch - the second note's pitch

  • Conditional expressions (i.e. if-then-else) use the following shorthand:

    condition ? X : Y

    If the condition evaluates to true (1.0 or more), X is executed; but if false (0.0), Y is executed. You can also use it when assigning (=) values, and to guard optional code (without an : else clause):

    .volume = @Persons > 5 ? 64 : 32
    @Busy == 1 ? .pitch = .pitch + 12

SOLUTIONS  (click to reveal)
▸ Making a broken chord

[03:000] = @Notes[1]
[04:001] = @Notes[2]
[05:002] = @Notes[3]
[06:003] = @Notes[4]
[07:004] = @Notes[5]

▸ Extending the chord

[06:005] = @Persons > 6 ? last : none
[05:006] = @Persons > 7 ? last : none
[04:007] = @Persons > 8 ? last : none

▸ Continuing the chord

[02:007].type = @Persons < 9 ? C : none
[07:008]      = @Notes[5]
[06:009,015]  = @Notes[4]
[05:010,014]  = @Notes[3]
[04:011,013]  = @Notes[2]
[03:012]      = @Notes[1]