• Marina Victoria Pascual

A7 - Drum Beat in p5.js

I decided to create a short drum beat using Drumbit, in order to then recreated in code. So I record each of the samples I wanted to use and then split the recording using Audacity (Turns out that exporting the files as mp3 is much better for Tone.js in p5).

In order to recreate the rhythms of each instrument, I used the matrix method we learnt in class. But instead of dividing the time by 4 notes, I divided it by 16 so that I could access the subdivision on the bar.

This is a screenshot of the beat layout I created in Drumbit. (I ended up changing my sequence a little bit in the code)

And here's a link of this running sketch in p5.

​© 2019 by Marina Victoria Pascual.