Drag to add a new voice to the sequence.
Polyphonic Sequencer is the natural progression from
Smooth Sequencer. I adapted the original
logic to a Voice
class, which can "sing" a maximum of one note
at any point in the sequence. Naturally, then an array of Voice
s represents a sequence where multiple notes can be played in polyphony
across the sequence.
I then adpated code from Scales which allowed 2 things:
Since we can quantise the pitch, It seemed sensible to also allow quantisation of time. This was much simpler than pitch quantisation. We begin by breaking up the length of the sequence into a number of time steps (16 in this case). Then, at any point along the sequence, instead of accessing the current note we access the note that's at the start of the current time step! In practise this means that when we play a sequence, notes may only change, begin or end at the beginning of a time step.