MIDI control of sample playback with note on/off
Hi everyone,
I'm trying to make a simple MIDI-controlled sample player. Sounds
should be selected and play back only when/as long as the
corresponding key is pressed. The buffers are created/loaded by
dropping a folder with soundfiles on the field in the "buffers"
subpatch. I'm using a Doepfer CTM64 in note on/note off mode to
trigger the samples.
It works fine as long as I simply push a button to play a sample and
let go of it to stop the playback. However, I'd like to be able to
play back one sample by pushing the corresponding button, and then
switch to another sample without pause by pushing another button. At
the moment that I let go of the first button playback stops, however,
for fairly obvious reasons, even to me.
The question is, how can I switch from sample to sample without
stopping playback when letting go of one button, while another button
is still pressed? Some way of letting the patch know that a certain
button is still pressed, even though another one is being released and
sending a note-off message?
I'd be very grateful for any suggestions... Thanks!
Patch pasted below (is it still okay to paste patches into list
messages like this?)
Alexandra
I did this a while back using csound~ and the loscil unit generator. google
the csound manual and look at sample playback.
On 2/16/07 8:31 AM, "|||||||||| ||||||||||" wrote:
> Hi everyone,
>
> I'm trying to make a simple MIDI-controlled sample player. Sounds
> should be selected and play back only when/as long as the
> corresponding key is pressed. The buffers are created/loaded by
> dropping a folder with soundfiles on the field in the "buffers"
> subpatch. I'm using a Doepfer CTM64 in note on/note off mode to
> trigger the samples.
> It works fine as long as I simply push a button to play a sample and
> let go of it to stop the playback. However, I'd like to be able to
> play back one sample by pushing the corresponding button, and then
> switch to another sample without pause by pushing another button. At
> the moment that I let go of the first button playback stops, however,
> for fairly obvious reasons, even to me.
> The question is, how can I switch from sample to sample without
> stopping playback when letting go of one button, while another button
> is still pressed? Some way of letting the patch know that a certain
> button is still pressed, even though another one is being released and
> sending a note-off message?
>
> I'd be very grateful for any suggestions... Thanks!
>
> Patch pasted below (is it still okay to paste patches into list
> messages like this?)
>
> Alexandra
Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson
|||||||||| |||||||||| wrote:
> I'd be very grateful for any suggestions... Thanks!
What you want it called polyphony, check out poly~ and the
examples/tutorials...
> Patch pasted below (is it still okay to paste patches into list
> messages like this?)
Yes, that way I could quickly check and verify that there is only one
groove~ object. You'd need either one groove~ per buffer~, or a poly~...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Stefan and others,
Thanks very much for the response. It made me realize, by looking
into poly~ among other things, that I could actually make something
that could play as many samples as I could hold down keys.
After working my way through the poly and poly~ tutorials and help
patches, I tried to put together a new version of my patch, using
poly~ to control 64 instances of my "polygroove" patch.
I tried to follow the logic in the tutorials. However, the way poly~
works is still hazy to me, and I can't get my patch to work right. I
don't know if the [poly 32] makes any sense, whether or not I need a
[thispoly~] or if where the [target] message is sent to is right.
Could someone maybe have a quick look at my patch and notice where I
messed up?
(Drop a folder on the field in the buffer subpatch to create buffers)
The idea is simple: My Doepfer CTM64 has 64 keys that send note on/
off messages. I'd like each of these buttons to trigger looped
playback of a particular sample, a different sample for each key. The
sample should keep looping until I let go of the key, and it should
be possible to play several samples at once by holding down different
keys simultaneously. 64 sounds at my fingertips...
Thanks for any hints!
Alexandra
This is the "polygroove" patch the [poly~] object refers to:
On Feb 16, 2007, at 8:11 PM, Stefan Tiedje wrote:
> |||||||||| |||||||||| wrote:
>> I'd be very grateful for any suggestions... Thanks!
>
> What you want it called polyphony, check out poly~ and the examples/
> tutorials...
>
>> Patch pasted below (is it still okay to paste patches into list
>> messages like this?)
>
> Yes, that way I could quickly check and verify that there is only
> one groove~ object. You'd need either one groove~ per buffer~, or a
> poly~...
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
Stefan and others,
Thanks very much for the response. It made me realize, by looking
into poly~ among other things, that I could actually make something
that could play as many samples as I could hold down keys.
After working my way through the poly and poly~ tutorials and help
patches, I tried to put together a new version of my patch, using
poly~ to control 64 instances of my "polygroove" patch.
I tried to follow the logic in the tutorials. However, the way poly~
works is still hazy to me, and I can't get my patch to work right. I
don't know if the [poly 32] makes any sense, whether or not I need a
[thispoly~] or if where the [target] message is sent to is right.
Could someone maybe have a quick look at my patch and notice where I
messed up?
(Drop a folder on the field in the buffer subpatch to create buffers)
The idea is simple: My Doepfer CTM64 has 64 keys that send note on/
off messages. I'd like each of these buttons to trigger looped
playback of a particular sample, a different sample for each key. The
sample should keep looping until I let go of the key, and it should
be possible to play several samples at once by holding down different
keys simultaneously. 64 sounds at my fingertips...
Thanks for any hints!
Alexandra
This is the "polygroove" patch the [poly~] object refers to:
On Feb 16, 2007, at 8:11 PM, Stefan Tiedje wrote:
> |||||||||| |||||||||| wrote:
>
>> I'd be very grateful for any suggestions... Thanks!
>>
>
> What you want it called polyphony, check out poly~ and the examples/
> tutorials...
>
>
>> Patch pasted below (is it still okay to paste patches into list
>> messages like this?)
>>
>
> Yes, that way I could quickly check and verify that there is only
> one groove~ object. You'd need either one groove~ per buffer~, or a
> poly~...
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
>
dear max people,
it is entirely possible i'm missing something, or being stupid, but i'm
having a little trouble with filtergraph~. in general, it does what i
want, especially simple params and nfilters messages (etc.).
but:-
(1) is there a way of figuring out which filter number is being operated
on by mouse actions? the right outlet only seems to respond to messages
like params and whichfilt, and seems at other times to output the highest
numbered filter. if i could do this, i could have the appropriate outlets
report what is happening, rather them reporting on the current
(possibly un-mouse-selected) filter.
(2) is whichfilt documented? (it seems that i must have an earlier version
of documentation, or certain filtergraph~ things have gone unsaid.) are
there other undocumented features of filtergraph~?
(3) is there a way of extracting from the object how many filters there
are? this is so i can constrain a number box connected to a whichfilt $1
or query $1 message.
for all this i've examined the filtergraph~ inspector, but that has left
me worse for wear. i'm sure someone must have messed with filtergraph~
hoping to achieve similar things. i'm not a newbie, but i suddenly feel
like one. perhaps it was the lunar eclipse last night.
thanks for any help anyone might offer, and i apologize if i've missed
something obvious.
peter
mac os 10.4.8, max/msp 4.6.2, dual 1.42ghz ppc g4.
beschaving@gmail.com wrote:
> I don't know if the [poly 32] makes any sense
No, as poly~ has its own voice allocation, look at the midinote or the
note messages to poly~
> whether or not I need a [thispoly~]
Depends on what you are doing, I usually have one in...
> or if where the [target] message is sent to is right.
The target message adresses an instance of poly~ concretely. it will
remain until you change it. If you do voice allocation with the midinote
message, you won't need it usually, but you might want a [target 0]
message to send info to all of the instances. You have to be careful
about message order, put up triggers to garantie the correct order...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
On Mar 5, 2007, at 1:20 PM, Stefan Tiedje wrote:
> beschaving@gmail.com wrote:
>> I don't know if the [poly 32] makes any sense
>
> No, as poly~ has its own voice allocation, look at the midinote or the
> note messages to poly~
OK, I put in a midinote message instead, but I still can't get the
patch to play
It seems to respond more or less correctly, but I can't get the
instances of my "polygroove" subpatch to play any sound
>
>> whether or not I need a [thispoly~]
>
> Depends on what you are doing, I usually have one in...
I put one in the subpatch
>
>> or if where the [target] message is sent to is right.
>
> The target message adresses an instance of poly~ concretely. it
> will remain until you change it. If you do voice allocation with
> the midinote message, you won't need it usually, but you might want
> a [target 0] message to send info to all of the instances. You have
> to be careful about message order, put up triggers to garantie the
> correct order...
>
I don't know what I'm doing wrong, I can usually get my patches
working when I read the help etc., but I'm a little stuck here. Maybe
I need more coffee.
Thanks!
Alexandra
the subpatch:
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
I didn't take the time to figure out your patch, but for a thread
last year, I made this very simple patch illustrating the use of poly~
It's called "StupidSynth", and it's currently the only thing here:
http://www.xfade.com/max/examples
-C
--
Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." - Brian Eno