Logic script to max device midi choke cymbals e-drum
Hey everone,
I'm trying to get cymbal chokes to work in SSD5 from my Roland TD27 kit, i have found a Logic script that works (in Logic) off course :p but I want to create something similar in Ableton or max for live, can anyone help me out here?
Kr,
Wim
Script:
function HandleMIDI(event)
{
event.trace();
if (event instanceof PolyPressure) {
if (event.pitch == 49 && event.value == 127) { //left crash choked
MIDI.allNotesOff()
} else if (event.pitch == 57 && event.value == 127) { //right crash choked
MIDI.allNotesOff()
} else if (event.pitch == 51 && event.value == 127) { //ride cymbal choked
MIDI.allNotesOff()
}
} else {
event.send();
}
}
is sending all notes off really clever way to turn 1 midi note off ?
All notes off kills any sounding note on that channel
might work if only 1 shot samples are used
you can simply capture polypressure and if
160 49 127 then 144 49 0
Do you know how to capture this? I'm really a knoob at max for live...
you can use midiin and midiparse to simplify things.
Live dumb as it is does not have any midi channel routings,
so you don't need to bother about received midi channel.
But, wait I remember that that stupid piece of software blocked polypressure
so one could not use it at all.
At least that was true for Live 10.
I am not using Live and can't test that for you,
maybe that changed in Live 11 ?
Or still stupid ?
Can't say.
Midiwise it would be a very simple construct.
Here if polypressure received matches key 49 and value 127 it sends key 49 note off
That is in Max, NOT Live.

David Buttler developed set of Midi Externals to overcome that
miserable Midi restrictions in Live.
Maybe that could help you
https://www.theimpersonalstereo.com/max-externals
I remember that imp.midiin was capable of receiving polypressure, at least on Mac
If you manage to get imp.midi running in Live,
this would be patch to choke 3 notes from your list

Here is the patch.
I find that pp value should be adjustable, so that also lighter pressure
can be used if wanted.
In case you use Live 11, and it is polypressure capable,
you can use standard midiin object.
P.S. it makes me wonder why do you need polypressure to turn notes off,
woud key release not do the same ?
Hey,
Thank you so much for your time!! Live 11 is now capable of poly aftertouch. The patch doesn't seem to work, i'm afraid i'm obv missing a lot of knowledge, when i use midi monitor i also don't seem to receive anything when i choke the cymbals, but that is prob cause this doesn't see polytouch coming in...
I thought you want to choke the cymbals, not to recognise that they got choked.
Can you explain better what you are trying to do.
But in simple midi terms, just mentioning SSD5 or roland TD 27
does not not give any infos
ok sorry :) So i have a Roland TD27KV drum kit, it is native capable of choking, I have CY-12C crash, CY-13R ride and CY-18DR ride. I know connected it through usb midi to my laptop. Inside Ableton i'm running Steven Slate Drums 5.5. Everything works fine except for the choking. I've submitted a ticket to Slate but to no avail. So I started digging around, the script (apparantly) works in Logic so I'm trying to do the same in Ableton :)
It should be better to first get Roland's input recognised.
It should send Polypressure when cymbals get choked, if you don't
receive it in Live, than it is Live's problem.
Did you try the patch I posted in Max, without Live ?
The patch has imp.midiin at input, did you replace it with standard midiin object ?
here is added display of received midi notes and polypressure, aso midiin instead of imp.midiin
if you use it in max doubleclick on midiin object to select right input device - the Roland
wow! Ok started it just in max, when i hit the drums i see the midi coming in on the left, when i choke the cymbals I see the midi coming in on the right :) One is 52 0 the other 55 0 the big symbal is 53 0 :D
When I put it in Ableton i don't see the chokes coming in, i do however see poly when I play on top of the cymbals hmmm
Roland probably sends fast note on - note off and maybe same for
polypressure.
try this in Max, it will collect fast changes into list.
Can you tell me what a single cymbal sends when only played ,
and what when choked as well
So the cymbal has different trigger points, when i hit it once on the bottom i get 57 0
when i hold the choke (also on the bottom) I get 57 127 52 127
can you please talk midi notes and polypressure
I can't guess what you mean by that numbers.
It can't be that note is 52 0
Did you read your Roland manual and midi implementation ?
So that you know instead of trying to find out what it sends ?
Once I did midi translator for Roland TD-10 kit, and it was well complex
I have to leave the house and won't be able to reply till tomorrow.
You have to capture and list all midi messages Roland Kit sends in order
to try to play other Drum kits samplers or similar.
I remember that well from the past.
I'm away from home also, have to babysit :D
Well, the numbers i'm providing are the numbers that appear in the max patch, i'll see if i can dig deeper too!
*Edit, I found this post too, here you can see incoming ptouch, it looks likes it comes in on channel 10, maybe that's the issue?
https://www.logicprohelp.com/forum/viewtopic.php?t=155944
Are you back? :)
You only need to capture midi coming from the cymbal and analyse it.
Should not be a big deal, or ?
Take each cymbal that can perform choke and record
hits into midi file.
Play the cymbals so that you can easily reproduce what was hit when.
From that midi recording it woud be easy to mimic the choke to other drum sounds.
If Live gives you trouble with polypressure , record midi file in Logic, or in Max
So when i use midi monitor in Max I get this:

that midi file contains ONLY polypressure.
on Midi channel 1, and keys 49 51 52 53 59
no midi notes.
Is that all roland is sending if you hit cymbal with the stick and then grab it
- choking it ?
you have to capture all possible midi events coming out of SINGLE Cymbal,
in set order, like :
hit once each part of the cymbal that sends different note, or produces different sound
on Roland Internal Samples.
Then hit and grab cymbal in same order as above.
Record any other output of that cymbal, I saw TD 27 has bow or something else.
Then you make a list with all one cymbal sends, and only then one can start
with conversion to other drum plugins.
Repeat the procedure for each cymbal separately.
------------
Contents of midi file you sent:
6088 160 49 127;
6088 160 55 127;
6494 160 49 0;
6494 160 55 0;
8699 160 57 127;
8699 160 52 127;
9147 160 57 0;
9147 160 52 0;
10079 160 51 18;
10079 160 59 18;
10079 160 53 18;
10092 160 51 36;
10092 160 59 36;
10092 160 53 36;
10108 160 51 57;
10108 160 59 57;
10108 160 53 57;
10139 160 51 74;
10139 160 59 74;
10139 160 53 74;
10212 160 51 92;
10212 160 59 92;
10212 160 53 92;
10228 160 51 112;
10228 160 59 112;
10228 160 53 112;
10244 160 51 127;
10244 160 59 127;
10244 160 53 127;
10423 160 51 110;
10423 160 59 110;
10423 160 53 110;
10438 160 51 91;
10438 160 59 91;
10438 160 53 91;
10514 160 51 64;
10514 160 59 64;
10514 160 53 64;
10527 160 51 35;
10527 160 59 35;
10527 160 53 35;
10542 160 51 17;
10542 160 59 17;
10542 160 53 17;
10558 160 51 0;
10558 160 59 0;
10558 160 53 0;
---------------
first number in a line is time in ms, 160 is polypressure status byte on midi channel 1
last 2 are key number and pressure value.
I marked all events that are executed together.
here is a list of polypressure kay-value pairs in order they were recorded.
1, 49 127 55 127;
2, 49 0 55 0;
3, 57 127 52 127;
4, 57 0 52 0;
5, 51 18 59 18 53 18;
6, 51 36 59 36 53 36;
7, 51 57 59 57 53 57;
8, 51 74 59 74 53 74;
9, 51 92 59 92 53 92;
10, 51 112 59 112 53 112;
11, 51 127 59 127 53 127;
12, 51 110 59 110 53 110;
13, 51 91 59 91 53 91;
14, 51 64 59 64 53 64;
15, 51 35 59 35 53 35;
16, 51 17 59 17 53 17;
17, 51 0 59 0 53 0;
------------
I can't help you further with this without infos I asked for.
You should also check what midi channel TD 27 is sending on,
best would be to record midi in Max using seq object,
it records exactly what it receives, included midi channel.
It can store recorded events as text file which makes it much easier to analyse.
here is simple seq recorder:
Please separated midi file per cymbal.
I don't have that unit and can't guess what are you stroking at
you have to use all parts of the cymbal that make difference.
In midi file you just sent I see that besides notes and polypressure also some controler values are sent.
I will have a look at those and give you the list of sent midi items per cymbal
You did not manage to save as text ?
I have to load the midi files, resave them as text etc ....
ow sorry, do you want me to redo and save as txt?
here is Ride list in coll format, index is event recorded time in ms
4723, PP 59 0 CC 88 64 NoteOn 59 124;
4830, NoteOff 59 64;
5657, PP 53 0 CC 88 64 NoteOn 53 44;
5760, NoteOff 53 64;
6230, PP 51 0 CC 17 0 CC 88 64 NoteOn 51 61;
6340, NoteOff 51 64;
6792, PP 59 0 CC 88 64 NoteOn 59 127;
6900, NoteOff 59 64;
7617, PP 51 20 PP 59 20 PP 53 20;
7641, PP 51 38 PP 59 38 PP 53 38;
7665, PP 51 56 PP 59 56 PP 53 56;
7677, PP 51 77 PP 59 77 PP 53 77;
7685, PP 51 110 PP 59 110 PP 53 110;
7693, PP 51 127 PP 59 127 PP 53 127;
8172, PP 51 110 PP 59 110 PP 53 110;
8181, PP 51 91 PP 59 91 PP 53 91;
8241, PP 51 84 PP 59 84 PP 53 84;
8329, PP 51 67 PP 59 67 PP 53 67;
8378, PP 51 48 PP 59 48 PP 53 48;
8385, PP 51 28 PP 59 28 PP 53 28;
8413, PP 51 9 PP 59 9 PP 53 9;
8421, PP 51 0 PP 59 0 PP 53 0;
------------------------------------
I have replaced midi status bytes
169 = PolyPressure on midi channel 10 to PP
153 = Note On on Midi Channel 10 to NoteOn
137 Note Off on Midi Channel 10 to NoteOff
185 CC change on Midi Channel 10 to CC
---------------
You can try to analyse midi flow , according to what you played.
3 notes get sent 51, 53 and 59
PP with value 0 and CC# 84 value 64 is sent before each Note On
and in addition CC# 17 value 0 gets sent before Note On 51.
Note Off is sent +- 100 ms later
Lines with only PP inside show that indentical values are sent for all 3 Note Numbers
depending on pressure applied.
--------------
Only unknown is what would events look like if you manage to grab cymbal
faster than Note Off gets sent out, what if you hold the cymbal and change pressure while
playing it, etc.
That would all make some difference to Roland's internal Sounds.
Now you need to decide how to deal with this infos,
which note or notes to use to trigger some different Drum Set,
if PP > 0 should be used to turn corresponding note off etc.
It could be that some drum kits offer Choke Cymbal Samples
on different keys, which you would then try to use instead.
In that case I see only one option - to transpose "normal" cymbal note
if Cymbal is held (PP > 0) before hitting it.
See it as sort of gate
if PP = 0 then note 55 = 55
if PP > 0 (or higher threshold) note 55 = 99 for example
no need to resend the midi files.
But I want you to be able to record into seq, to save as text and to have a look inside
and understand the events sent.
You can load that text file in Max or in any text editor.
Then you can record and test all possible strokes and understand better what gets sent.
Well, you can assign midi notes to steven slate drums for chokes (see image) you also have the midi learn function, biggest problem off course is that ableton doesn't see polypressure coming in so the script or m4l device should translate the incoming poly pressure to (prob 127) on the midi notes below

I thought you told me that Live 11 does receive Poly Pressure
You have no chance even if Live does receive Poly Pressure to use midi learn.
The way roland sends PP - value zero before Note On, you need quite clever
gating and routing system,
basically PolyPressure must be the master gate.
But let's first clear that about Live 11 and PP.
Did you try imp.midiin external ?
no, doesn't work, i read on the site of imp that you have to disbale midi ports in windows (i tried to disable td27 from controllers in device manager but also to no avail)

Did you download imp.midi external ? That screenshot suggests
that it can't be found, and not that it can't be loaded.
Ok , so you are on windows, Live 11.
Is Roland Composite Midi Device or does it have dedicated Midi Driver ?
In case it has dedicated Midi Driver,
you can use it's input in Live and some other app like Max Standalone at same time.
If nothing else works, then one can get midi input to Max, do whatever conversion
and send midi to Live using some Virtual Midi Drivers.
That all is tested stuff.
But all that only in case Live is still dumb stupid in version 11, and can't receive PP
Just talked to someone running Live 11 - stil stupid,
no PP inside.
imp.midiin works just fine also on Windows
ok, i've downloaded the imp externals, i already have rtmidi, now need to figure out how to get these to work together :)
You should try to get Roland Midi Input directly into Live using imp.midi
It would be better to avoid using Max Standalone, that is worst case scenario.
I would start by disabling Roland input into Live Tracks in Preferences,
making test Device using imp.midiinfo and imp.midiin
to confirm midi input.
just make sure to have imp.midi externals in search path
or in same folder as the device.
Select Roland as input and ...
OMG IT WORKS!!!!! Not the last amxd you send but the first one, in max (in Ableton) i have to disable the td27 midi input) I installed the externals in the library and mapped the midi (like for example 57) to the choke inside of SSD5. I will need to refine it and do all the mappings but with all the tools you provided i should be able to manage it. I have to leave on vacation in a few days but will get back to you when it's done. Thank you soooo much for all the help and patience!! When I'm finished I'll create a clean package in max for live and post it on the site, i'll let you know when I'm ready! Greetings and love from Belgium!
Ok, that's fine, but also last amxd should work.
If you think you can manage to translate roland's choke into SSD5, all ok.
If not, what I guess, you will need some extra work.
In the meantime enjoy the holidays, when I get a bit time, I will post
details about other captured cymbals from the midi files.
What you could do is to record what I suggested -
hold the cymbal to output PP > 0 and play it still holding the cymbal.
Makes me wonder how that midi string gets put together.
great, will have a look at it, thanks !
Hi Guys, i was following your dialogue, as i am standing in front of the same problem, to get cymbal chokes working in the combination of TD 27 and Superior Drummer 3 in Ableton. Unfortunately my skills with Max4Live are exactly 0. I don't know if it is impolite, to aks for your help by giving me access to the device you've built in the end for my use. Of course i will make a donation. ;-) I am able to install and use tools, but no programming at all. best wishes, Sebastian
Hi Wim, after i couldn't manage to get it work in the past i switched to Reaper for a couple of years, but now i am back in ableton and still facing the problem of the cymbal chokes. I try to ask you again, if you could make your solution as a download? This would help a lot, as i am still not able to follow your constructions....all the best, Sebastian
Superior drummer 3 can use polypressure to choke cymbals.
You just need to go into midi settings and check if that is enabled, assigned or not.
Then see if set values there match what your Roland is sending