Parameterized Random Rhythm Generation, part 2

I needed to build out the control capabilities of the drum generation, so I started with the capabilities that I defined in the last post, and started deciding how I wanted the physical interface to work. I didn’t really want to make any modifications to how the gloves worked. This means I had four (well, five) “gate” signals and three linear signals.

I wanted to be able to control every separate parameter individually, so I decided to combine those individual signals into the control signals. I decided on four different parameters I wanted to control this way:

  1. Adding or removing a drum
  2. Adjusting the tempo
  3. Changing the density (that is, number of probable hits per bar)
  4. Changing the FX on the drums

I decided to map each of these to one finger. My experience has been that I have the most fine-grained control over my index finger and least over my pinky, so I decided to order those parameters by how often I think I’ll want to modify them and assign them in that order. What I ended up with was:

  • Pinky: Adjusting the tempo. This is something I wanted to be able to do easily, but not often, because it would only be between “songs”. I wanted to be able to adjust between about 80 and 160 BPM, with 120 right in the middle, so I decided to map tempo to pinky on + y-axis, with y = 0 to 80 and y=1 to 160.
  • Ring: Adding or removing a drum. This is also something I wanted to be able to do, but not too often; I decided to map this to ring finger + a change in the z-axis; a positive change would mean adding a new drum, while a negative change would mean removing one.
  • Middle: Changing the density. This could change multiple times within a single song pretty easily. I decided to map this to the Z-axis as well because I’ve discovered I have the most fine-grained control over the way the BNO-055 chip interprets that.
  • Index: FX. These are going to need to change the most often, so I decided to add two different effects banks, bitcrushing and reverb. I mapped rate and bit depth to y and z respectively, and reverb amount to x.

Here is the code that demonstrates this… and here’s what it sounds like. It’s actually pretty sweet.

Further, I wanted to be able to freeze the controls and let the beat continue, so that I could switch over to using the noise-style controls. I thought a lot about the best way to do this and I couldn’t come up with a way, using the existing infrastructure, that I was happy with, so I decided to add a new element. I’d been thinking about this for a while and I wanted to be able to switch between different synth patches, so I thought this was a good time to do that.

I have a bunch of electronics components on hand, particularly a whole bunch of 3.5mm jacks and patch cables. I also have a largish plastic box with a rigid lid that I was keeping some of those components in. So, I decided to drill a bunch of holes in and wire up a patching bank for this.

box

Anyway, this is what it looks like, and this is the full code. It could definitely be cleaned up a little bit, but it does everything I wanted (except triplets — that’s coming next, I added an option for it into the plastic box with patch cables).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: