basic drum machine questions

Jun 9, 2009 at 4:29am

basic drum machine questions

I want to build my first drum machine, but i need some advice to get started.

can i build a drum machine that triggers wav samples? example: i have cut up some drum hits from rap cds. let’s say i have a bass drum, snare, ride, and tom wav sample. can i set up each sample individually in a matrixctrl and have the matrix set up as a 16step sequencer? what about the idea of generating random parts of a wav sample into the matrix controller. example: imagine a wav sample of somebody screaming for 40 seconds. now imagine your typical 4/4 rock beat, but everytime the bass drum would normally hit, you would have a differant random snipplet of the vocal wav sample hit. i’m thinking about controlling the wav sample with a groove object. is it possible to make a drum machine like this? If anybody can give me a few leads to put me off in the right direction, it would be greatly appreciated.
or if anybody has a drum machine that uses wav files already built, can you send it over so i can analyze how it was built?

#44305
Jun 9, 2009 at 7:28pm

Here is a project of mine that demonstrates 3 different kinds of drum machines (go into the examples folder within the Sequencing folder. Check out the example “Many Drums”. Other examples in other folders also implement the use of a drum machine):

Go to this page and click the “Musical Legos” link:

http://www.music.mcgill.ca/~kkapla/projects/

Each patch is thoroughly explained with comments and neatly patched. It was created for Max 4.6, so there might be some issues when trying to open the examples in 5, but hopefully not. I’m at work so I can’t check right now, but let me know if there’s any problems.

#159344
Jun 9, 2009 at 11:52pm

How can i get this wav sample into the matrixctrl in row 0?
i would like to control the beginning and end points of the sample. I figured a counter object would work. but i don’t know what to do next. anybody have any ideas?

– Pasted Max Patch, click to expand. –
#159345
Jun 10, 2009 at 1:48am

Not sure what your specific question is about controlling start and end points, there are so many ways.

matrixctrl is a max object and as such does not handle audio – what it does is creates lists that tell matrix~ which inlets and outlets to connect, a bit like a patch-bay

– Pasted Max Patch, click to expand. –
#159346
Jun 10, 2009 at 7:50am

though aesthetically pleasing, a quality i dislike about the matrixctrl is that its size is stationary and that it’s hard to distinguish groupings. if you use the multislider, you can color groups of sliders and change the length of the sequencer with minimal effect on the gui:

– Pasted Max Patch, click to expand. –
#159347
Jun 11, 2009 at 2:47am

use matrixctl to trigger the groove of each sound.

I use the message getcolumn n, where n is the step number which is coming from a counter being triggered by a metro. Then unpack it and send to each groove~ 0 – nothing happens, 1 – sample plays. (Or 1 could trigger an envelope to play a continuous sample or synth).

playing random segments of the wav should be easy enough using the start and end point inlets of groove~ however it would be much more rhythmically musical to use info~ to get the total time of the buffer and divide into segments. That way a random number generator will only need several steps to decide between rather than 100′s or 1000′s if you use the ms input with the start and end point.

You’ll just need a bit of maths to do this and need to use [expr] and or [if] to avoid getting divide by zero errors which throw the maths off.

And yes Multislider would be much better to use if you wanted to sequence parts of the sample on different steps.

#159348
Jun 11, 2009 at 8:44am
ComfortableInClouds wrote on Wed, 10 June 2009 02:50
though aesthetically pleasing, a quality i dislike about the matrixctrl is that its size is stationary and that it’s hard to distinguish groupings.

you can stretch the matrixctrl with patching_rect commands, and by default it won’t give you more columns and rows when you expand it. this is new in 5 I think. But you can tell it not to stretch when resized, plus give it new # of rows/columns. So it’s more flexible than it might seem, but since it uses pitcures, it’ll look a little strange when you stretch.

A nice alternative could be a new kind of matrixctrl, which uses just pure colors and has a grid overlay for cells. Possibly the grid could be colored on a row-by-row basis, or in other rectangular groupings. (though you could always have a floating panel over those areas too.) Kind of getting into the realm of jit.cellblock now, but preserving the click or dial actions that matrixctrl provides.

#159349
Jun 11, 2009 at 3:41pm

thanks for all of the tips. i am on the right path and i can build an interesting drum sequencer now. but i can’t post the results.secret.

#159350

You must be logged in to reply to this topic.