Drum Machine Patch

May 9, 2012 at 10:54am

Drum Machine Patch

Hi Guys
Quite new to max so please be easy on me… I’m trying to develop a sample based drum machine type patch for a uni project, it had previously been working and has now stopped… I was wondering if anyone could have a look, or perhaps offer a simpler alternative. I would also like the possibility to trigger fx live on each… this is what I’ve got so far. Would love some help.

Thanks

– Pasted Max Patch, click to expand. –
#63440
May 9, 2012 at 5:25pm

Anyone have any thoughts?

#228722
May 9, 2012 at 11:57pm

first off I don’t know what it is that used to work but now doesn’t…you need to be more specific. Second if it IS a specific problem it is clearer if you post only the part of the patch which concerns it. Finally I would neaten up the whole patch as it will make it easier to trouble shoot and is helpful for people who want to look over your work. I had to tidy it up in order to make sense of what was going on :)

I think your problem if I’m right is that the [preset] object has saved the states of you [gswitch] objects. This is causing a conflict with your system for recalling the preset at the start of the next bar. You can get around this by using a normal [switch] object instead.

Also from perusing your patch, you have an extraneous counter object in your tempo patch. You should look into [textbutton] as it is more flexible and pleasant ;) than using message boxes connected to message boxes. You will also need to look at [trigger] at some point.

enjoy!

#228723
May 10, 2012 at 2:38am

Here’s some general advice for a beginner.

If you’re patching in an organized way it’s very rare that you’ll have to cross cords. Audio chords can cross a bit more because they aren’t subject to execution order. If you can’t see clearly what your code is doing and in what order it’s doing it, you need to rethink things. Believe it or not, most of your code should look like columns of objects.

look into the following objects they will help you quite a bit:
p
v
s
r
t
zl.mth
pvar
poly~ (When you’re ready for it)

Also knowing how to create abstractions helps immensely.

#228724
May 10, 2012 at 2:53am

PS I know this doesn’t help you with your patch and I probably sound like an asshole but it’s good advice. You need to code for your future self. So that in a week, when it stops working, you don’t look at it and go “what… the… f*&%?”

#228725
May 10, 2012 at 5:48pm

Hi Guys.
Any chance you can explain in laymans terms how to order my patch without using cords?

#228726
May 10, 2012 at 5:49pm

Also I can’t find many of the above objects in the max helpfile..

#228727
May 10, 2012 at 5:53pm

Aw friend.. I said you won’t need to *cross* cords. In other words ordganize yourself before you start patching

#228728
May 10, 2012 at 6:18pm

Also,

p is short for patcher
v is short for value
s is short for send
r is short for receive
t is short for trigger
zl.mth is part of the zl object.
pvar
poly~

you can type p instead of patcher into an object box and it does the same thing. same for value, send, receive, and trigger.

These are objects that help keep the spaghetti from happening.

#228729
May 10, 2012 at 6:28pm

So is there no way for me to tidy it up at this stage? I’m also having difficulty getting max to interpret my midi keyboard. I have midiin- which is obviously the raw data, and also tried midi parse… It is for a sub bass patch and i’m a bit confused. Apologies for all the questions.

#228730
May 10, 2012 at 6:43pm

I’d start patching again. Listen if you can find a way to fix it and it works… go for it. But what I’m saying in a friendly way is that no one on this forum can trace how that patch works.

I did notice in your patch that there is a “scale” patcher which has a bunch of inlets but nothing connected to them… maybe that’s the problem?

#228731
May 10, 2012 at 6:44pm

as for midiin–>midiparse it should work. have you double clicked midiin to make sure you’re listening to the right port?

#228732
May 10, 2012 at 6:55pm

THERE IS AN NICE PDF BY PETER ELSEA CALLED “SOLVING PROBLEMS” WICH IS CLOSE TO WHAT AUDIOMATT MENTIONED. I SEARCH FOR THE LINK TO THE PAPER BUT COULDNT FOUND IT. MAYBE SOMEONE ELSE CAN POINT YOU TO THE RIGHT LINK.
HERE ARE THE ELSEA TUTORS I FOUND:

ftp://arts.ucsc.edu/pub/ems/MaxTutors/

GOOD POINT TO START:
ftp://arts.ucsc.edu/pub/ems/MaxTutors/Notes%20on%20Program%20Design.pdf

CIAO, J

#228733
May 10, 2012 at 7:04pm
#228734
May 10, 2012 at 7:17pm

Haha, yes that is a bit of a mess! Its hard to help when you have to unpick a tangle of patch cords to see what’s going on. Here’s something I had lying around that is a drum machine that might give you some ideas, but that is also very tidy and annotated. After all, going back to a patch after a while I often look at it and think ‘what the hell is going on here?’. By the way, I should have used groove~ instead of sfplay~, but I made it a while ago when I didn’t know any better!

– Pasted Max Patch, click to expand. –
#228735
May 10, 2012 at 7:20pm

@Luke

or 2d.wave~

LOLz

#228736
May 10, 2012 at 7:33pm

I’ve been playing with Jitter for too long!

#228737
May 10, 2012 at 11:25pm

Hi there Luke. Lovely and tidy, apologies for my lack of knowledge on this topic. I do a Music Technology course and this module really is not my forte, so sorry for any ignorance on my behalf!

1. Where are your components in your patch, Luke?

2. Any recommendations for MIDI control of a matrix?

3. I wish to add a sub-bass patch, and some random sound triggers. I’m intrigued how to link it all together in one patch?

Once again, apologies for my infancy in this topic but I thought you guys would be the best to ask!

Thanks again.

#228738
May 11, 2012 at 7:00am

1. what do you mean?
2. well, there’s a load of matrix based midi controllers about, or you could use something like TouchOSC for iOS or Android
3. ever played with a TB-303? sure you can find a VST or an emulator and it might give you some ideas

#228739
May 11, 2012 at 12:25pm

I meant like the cables, components, links etc?
2. I’ll try the touch osc thanks±
3. Yeah I have a few VST emulators… 303 might be a bit too aciddy for what im looking, perhaps a warm moog sound.

Most important thing I need to know right now I think is if i have a drum matrix in my patch, and a sub bass, and something else… how do i link it all together when controlling or are they all in separate modules with separate midi controls?

#228740
May 11, 2012 at 12:47pm

1. The patch cords? They are hidden when in locked mode, but you should see them when the patch is unlocked. You can hide or unhide things from the locked patch from the objects menu or with the shortcuts shown there.

3. I was thinking more of the controls of a 303 in that it has step sequencer controls and if you turn on two steps next to each other it makes one long note if you have it set that way, or two short notes if set another way (was it portamento or something?) etc.

Its up to you how you control these things, maybe you want the ability to select note from keyslider for each step of the drum sequencer, maybe you want these things to randomly play themselves within a certain key that you have constrained them to, maybe you want them to respond to presses on an xy pad from TouchOSC but in time to your sequence etc etc. Whatever you do, you want a master timing system, ie one master metro that everything is running to so everything is in sync

#228741

You must be logged in to reply to this topic.