WORKSHOP GUIDANCE
  • Press the blue MIDI button to send a MIDI CC that unmutes Channel 6.
  • In this last step, we'll write a little block of code that is called upon by several cells, to create a randomly-generated tribal drum pattern. Similar in concept to functions, this shows how to write longer, reusable code.
  • Rather than enter single lines of code (formulas) for individual musical properties, we now want to enter blocks of code into the cell. A cell has been labelled  Random . The code in this cell is called from every cell of the drum part (using the code "@Random.run()"). Go to the labelled cell, open the formula editor (=) and press Tab to switch to code editing mode.
  • In the space provided, enter the following two lines to respectively generate a random pitch and volume, within given ranges:

    .pitch = rnd(C-2, C-3)
    .volume = rnd(0, 64)

  • Lastly, we'll add code to  Touch  to couple the Y axis of the XY pad to also control tempo - so that both the volume and speed of the music can be manipulated to add tension. This cell is called whenever there is a MIDI CC message, so long as there's a "01" in the cell's parameter:

    Touch           01

    To vary the tempo, simply add the code:

    .tempo = 100 + @Y