A basis for all other effects (+ gates)
The code below shows the core objects, messages and other items that will form the foundations of our 4 effects buttons. The cycle and random objects mean that banging the sequence will cycle between as many possibilities as we program in, for example, randomly cycling between 4 effects.

We quickly noted down what each of the 4 buttons should do (besides tempo as this has already been done), as you can see in the screenshot below.

We also decided to put a gate in the subpatch [p comparison]. As the screenshot below shows, we originally had the coding coming straight from the sliders. [p comparison] neatens thing up, and is where the signal of the piezo sensors is being sent to. We used a gate because…

We also considered the ‘speedlin’ and ‘change’ objects to slow down the rate at which the sequences would bang, but never used these in the end. It’s good we had multiple options for tackling the same problem, just in case!