code of music final
A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
final project: circular live quantized sequencer
for my final project, i built a circular live quantized sequencer in p5.js using p5.sound. the sketch is based around an 8-step sequencer where each row is mapped to a different sound, and each key on the keyboard places a hit into the pattern.
the main interaction is simple: pressing q w e r a s d f adds sounds to the sequencer, but instead of triggering immediately, the sounds are placed on the next step. this keeps the interaction automatically quantized, so the user can perform with the sequencer without needing perfect timing.
i originally had the sequencer laid out as a rectangular grid, but i changed it into a circular interface so it would feel more like a clock. each ring represents a different sound, and each slice around the circle represents a step in time. this made the visual structure feel more connected to rhythm because the beat literally moves around the circle.
i also added a backing audio loop underneath the sequencer. the triggered sequencer sounds sit slightly quieter than the main track, so they feel like small rhythmic decorations or gestures on top of the song instead of overpowering it. backspace clears the sequencer pattern without restarting the song, which makes it easier to keep performing while changing the texture.
one of the more important visual changes was adding a soft fft-reactive flow field. instead of using fft to draw a literal waveform or a ring of dots, i wanted the sound analysis to create a subtle atmosphere around the sequencer. the sketch analyzes bass, mid, and treble energy, then uses that information to affect tiny pastel particles. when the audio is quieter, the particles move gently. when the audio becomes more active, the particles become brighter, larger, and more animated.
my goal was to make the sequencer feel soft, playful, and performative rather than mechanical. i wanted it to still function like a musical tool, but visually feel more like a small interactive music object.
questions i asked chatgpt while working
how can i turn my rectangular 8-step sequencer into a circular sequencer?
how can i make backspace clear the pattern without restarting the song?
how can i make sure all the sequencer sound files play at the same volume?
how can i line up the q w e r a s d f labels with the first tick so the interface is easier to understand?
why am i getting a getStepAngle is not defined error?
how is fft actually being used in the sketch?
how can i make the fft visuals feel more like a sparse, beautiful flow field instead of dots around the clock?
how can i make the particles respond to bass, mids, and treble?
how can i turn down the sequencer sounds so they sit better underneath the main track?
what i learned
this project helped me understand quantization more clearly because the key press does not directly equal the sound. instead, the key press changes the sequencer’s pattern, and the clock decides when the sound happens. that separation between input and playback is what makes the interaction feel musical and synchronized.
i also got a better sense of how fft can be used indirectly. instead of only visualizing the audio spectrum literally, fft data can control motion, brightness, size, and density. that made the visuals feel more integrated with the sound, while still keeping the sequencer as the main focus.
overall, this project became a small performance system: part sequencer, part song interface, and part reactive visual instrument.













