advice on how to make a basic sampler

Jun 29, 2009 at 9:11pm

advice on how to make a basic sampler

I want to be able to assign samples to my midi keyboard but i am having a very difficult time understanding the tutorials on how to do this. example, i have 4 wav file samples. a bass drum , hi hat , snare, and tom. how could i assign these to my midi keyboard? i am guessing that a groove object is involved, but i got lost on how to make the connections with the notein object. does anybody have any basic advice on how i can accomplish this?

#44581
Jun 29, 2009 at 9:28pm

no max here right now, so can’t send a patch…something like that:

1. notein to take in midi and parse it
2. route for selective routing of the different note values
3. 4 different buffers preloaded with your samples
4. the output of the route triggers a set message to the groove object (to point to the right buffer) in case you want to be monophonic, otherwise use 4 groove objects (1 per buffer)
5. the output of route triggers playback of the samples with groove

6. you could also reverse the midi information, the first route to distinguish between noteon and off (via velocity) and to fire the proper play/stop message, the second one for the proper groove object.

noteoff stops playback, and noteon starts playing. so by keep the key pressed, the sample could go into a loop.

just some ideas….there are always other ways to do it in max…

#160343
Jun 29, 2009 at 9:50pm

this is what i have. i know the setup is wrong because it doesn’t work. am i in the right direction here?

– Pasted Max Patch, click to expand. –
#160344
Jun 29, 2009 at 10:06pm

two mistakes

1. you need to switch on the dsp (using the ezdac~ object below takes care of that)
2. the groove object is triggered with a constant signal representing the play speed

haven’t plugged in a midi keyboard, but if 1 2 3 4 are mapped to your respective keys, there should be a noteon message first (starting the sample), and after release a noteoff which disables the toggle and stops the loop.

clicking the toggle manually will tell you if the groove’s work, then all you need to find out whether you upper midi stuff works (use print etc. for debugging)

– Pasted Max Patch, click to expand. –
#160345
Jun 29, 2009 at 11:40pm

You have to forgive me for being slow. I’ve been doing max for about a month now. I used the patch that you have updated for me and still cannot get any sound from the midi keyboard. is a poly object necessary?

#160346
Jun 30, 2009 at 1:14am

I don’t like using groove~ for 1-shot style samples. Play~ is better suited for this. Learn how to use play~ and line~ together with the message object for sample playback.

Poly~ is good to use for this kind of thing, but its better to just make several instances of your patch if you are just getting started. Poly~ is a little tricky and if you don’t understand the basics of getting sampler working, your going to spend a long time troubleshooting with poly.

Here is a simple 4 voice sample player, where each sample is mapped starting at middle C. Try to have a good understanding of how each object in the patch functions and tailor it to suit your needs.

– Pasted Max Patch, click to expand. –
#160347
Jun 30, 2009 at 4:14am

thank you so much for helping me with a solution!So if i wanted to use groove, would i just place the groove object where the play object is? i like the groove object because i can move the loop start and end points around. i have never used the play object before. can you mess around with loop points with the play object?

#160348

You must be logged in to reply to this topic.