Convert midi CC event to notes

Moderators: MattKingUSA, khz, muldjord, deva

Post Reply
User avatar
deva
Established Member
Posts: 287
Joined: Sun Oct 23, 2016 10:15 am
Has thanked: 3 times
Been thanked: 32 times
Contact:

Convert midi CC event to notes

Post by deva »

Hi James,

I tried to distil the question. Let me know if I missed something.

Hedon wrote: Tue May 07, 2024 12:26 am

<snip/> can't figure out how to accommodate Alesis' CC Midi notes. Alesis uses Midi note 22 for the pedal ("chicka chicka") and CC Midi *008 for the hi-hat functions of closed vs half-open vs open; and CC Midi *049 for Crash 1 and "choke"; and CC Midi *057 for Crash 2 and "choke".

I've got a sort-of workaround for the hi-hats, by selecting Midi note 009 for the open hi hat, leaving note 008 for the closed hi hat. But this loses the half-open function. I can't figure out a workaround for the choke notes on the cymbal. I'm playing an Alesis DM10 MKII Pro, which is about 7 years old now, so I can't imagine I'm the first to experience this; but I can't find anything online, on the DG website, or this forum. Maybe I'm just missing it?

Ideally, does DrumGizmo accept continuous controller (CC) notes? If so, how do I notate that on the midi.xml file? Or if there's another workaround, please advise. I'd REALLY like to be able to stay completely within my DAW to complete drum tracks, and DrumGizmo and Crocellkit seems like my best shot to do so. How can I get my existing Alesis kit to work with DG midi mapping? Or can't I?

In short; DrumGizmo currently only supports CC aftertouch events, which is used for choking cymbals, but I'm afraid I don't know if this is how the Alesis does it. We have a branch with support for position information as well, also using a midi CC event, but no others.
If you are in any way familiar with software development you could try modifying the source in the place where the mapping happens to enable more features from the Alesis kit.
You can find the relevant sources in the src/audioinputenginemidi.cc file.

If you want to give it a go and need help, feel free to reach out, I'll be glad to help :-)

Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

I should also mention, that you are not running the latest version of DrumGizmo, since 0.9.20 was released almost two years ago - not that it fixes your issue though, but it might help stability or other things ;)

User avatar
deva
Established Member
Posts: 287
Joined: Sun Oct 23, 2016 10:15 am
Has thanked: 3 times
Been thanked: 32 times
Contact:

Re: Convert midi CC event to notes

Post by deva »

I just split the last question into its own topic since midi CC conversion is a very relevant discussion and not as such related to the specific DrumGizmo 0.9.19 version.

User avatar
bluebell
Established Member
Posts: 1955
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 123 times
Been thanked: 128 times

Re: Convert midi CC event to notes

Post by bluebell »

deva wrote: Sat May 11, 2024 1:32 pm

I just split the last question into its own topic since midi CC conversion is a very relevant discussion and not as such related to the specific DrumGizmo 0.9.19 version.

It should be possible with https://das.nasophon.de/mididings/

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
Impostor
Established Member
Posts: 1442
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 155 times
Been thanked: 383 times

Re: Convert midi CC event to notes

Post by Impostor »

deva wrote: Fri May 10, 2024 5:11 pm

H
Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

User avatar
funkmuscle
Established Member
Posts: 2847
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 143 times
Been thanked: 34 times

Re: Convert midi CC event to notes

Post by funkmuscle »

Impostor wrote: Sat May 11, 2024 6:14 pm
deva wrote: Fri May 10, 2024 5:11 pm

H
Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

Thanks but I have no clue on how to use. For instance, the SSD Drums sampler comes with midi grooves and they have a list of maps for EZ Drummer and many others. I need to know how to convert or create SSD grooves mapping to fit DG's kits.

User avatar
Impostor
Established Member
Posts: 1442
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 155 times
Been thanked: 383 times

Re: Convert midi CC event to notes

Post by Impostor »

funkmuscle wrote: Sat May 11, 2024 8:51 pm
Impostor wrote: Sat May 11, 2024 6:14 pm
deva wrote: Fri May 10, 2024 5:11 pm

H
Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

Thanks but I have no clue on how to use. For instance, the SSD Drums sampler comes with midi grooves and they have a list of maps for EZ Drummer and many others. I need to know how to convert or create SSD grooves mapping to fit DG's kits.

I think you're in the wrong thread..

Hedon
Established Member
Posts: 22
Joined: Tue Nov 27, 2018 7:09 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Convert midi CC event to notes

Post by Hedon »

Impostor wrote: Sat May 11, 2024 6:14 pm
deva wrote: Fri May 10, 2024 5:11 pm

H
Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

Thanks for the info Impostor! But my question is similar to funkmuscle. I know the MIDI note being sent from my module, and I know the note expected to receive for the trigger. But just can't seem to figure out how to convert the "sent" note to the "trigger" note. Can't find a manual, tutorial, or video anywhere. If this isn't the right thread, can you point me (us?) to the correct one?

Hedon
Established Member
Posts: 22
Joined: Tue Nov 27, 2018 7:09 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Convert midi CC event to notes

Post by Hedon »

funkmuscle wrote: Sat May 11, 2024 8:51 pm
Impostor wrote: Sat May 11, 2024 6:14 pm
deva wrote: Fri May 10, 2024 5:11 pm

H
Alternatively you should be able to use some of the midi to midi plugins from x42. I think there is one among them that can translate CCs into notes and vice versa, but I'm not 100% sure though...

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

Thanks but I have no clue on how to use. For instance, the SSD Drums sampler comes with midi grooves and they have a list of maps for EZ Drummer and many others. I need to know how to convert or create SSD grooves mapping to fit DG's kits.

funk....DG has multiple kits available for download. I have the Crocell and DRS kits. When you download the zip files and extract them, there are XML files for the kit and the midimaps, labled midimap.xml etc... i think that's what you're looking for. For instance SSD might map tom1 to note 50, but DG maps tom1 to note 48. there's your conversion. copy all notes in lane 50 to lane 48, then delete all in lane 50. repeat as necessary.

OR....easier solution, IMO.....modify the midimap.xml file to match the SSD map. rename as midimap-SSD.xml and pull that map into DG whenever you want to use an SSD groove (with no changes to the SSD notes).

User avatar
funkmuscle
Established Member
Posts: 2847
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 143 times
Been thanked: 34 times

Re: Convert midi CC event to notes

Post by funkmuscle »

Hedon wrote: Mon May 13, 2024 12:59 am
funkmuscle wrote: Sat May 11, 2024 8:51 pm
Impostor wrote: Sat May 11, 2024 6:14 pm

Yep:
https://github.com/x42/midifilter.lv2
CC2Note -- translate control-commands to note-on/off messages

Thanks but I have no clue on how to use. For instance, the SSD Drums sampler comes with midi grooves and they have a list of maps for EZ Drummer and many others. I need to know how to convert or create SSD grooves mapping to fit DG's kits.

funk....DG has multiple kits available for download. I have the Crocell and DRS kits. When you download the zip files and extract them, there are XML files for the kit and the midimaps, labled midimap.xml etc... i think that's what you're looking for. For instance SSD might map tom1 to note 50, but DG maps tom1 to note 48. there's your conversion. copy all notes in lane 50 to lane 48, then delete all in lane 50. repeat as necessary.

OR....easier solution, IMO.....modify the midimap.xml file to match the SSD map. rename as midimap-SSD.xml and pull that map into DG whenever you want to use an SSD groove (with no changes to the SSD notes).

There is a strong possibility that this may be a genius idea! I will definitely check this out tomorrow as it's mother's Day and the food and the beer just kind of went down well so I'm a little too comfortable to think right now but I will definitely look at this tomorrow. Thanks so much.

User avatar
Impostor
Established Member
Posts: 1442
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 155 times
Been thanked: 383 times

Re: Convert midi CC event to notes

Post by Impostor »

Hedon wrote: Mon May 13, 2024 12:52 am

Thanks for the info Impostor! But my question is similar to funkmuscle. I know the MIDI note being sent from my module, and I know the note expected to receive for the trigger. But just can't seem to figure out how to convert the "sent" note to the "trigger" note. Can't find a manual, tutorial, or video anywhere. If this isn't the right thread, can you point me (us?) to the correct one?

If you're looking for a midi transformer then qmidiroute may be of use? It may be available in your repo, else github. It's a very simple application.

But for your use-case, simply editing the drummaps is probably the smartest thing to do.

x42
Established Member
Posts: 38
Joined: Sun Apr 29, 2012 2:59 pm
Has thanked: 4 times
Been thanked: 6 times

Re: Convert midi CC event to notes

Post by x42 »

I've investigated the issue with @Hedon.

There are no "CC Notes" per se. A CC is used to indicate the how much the Hi-Hat pedal is pressed.
A note event is still sent when the hat is hit with a stick.

So a stateless CC-to-note plugin does not work here. I whipped up a simple script [1] that keeps track of pedal press level and maps note events depending on that. It's a simple proof of concept.

It does not yet trigger a HiHat-foot sound. I think that should happen if the CC value changes to 0 (pedal fully pressed). The hard part is to calculate the velocity of that, and also to queue a note-off event some time later.

As for cymbal chokes: Those are done using Polyphonic Aftertouch (same note as the cymbal that's hit), decreasing velocity. I don't see how this can be mapped, and drumgizmo would need to directly support that (probably cross-fade to the choked cymbal sound).

[1] https://github.com/Ardour/ardour/blob/m ... studio.lua

Hedon
Established Member
Posts: 22
Joined: Tue Nov 27, 2018 7:09 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Convert midi CC event to notes

Post by Hedon »

Been a few days since my last post, but things unfolded behind the scenes, and just wanted to post a solution for the next folks with this issue, and attribute credit to those who solved the problem.

Long story short....For reasons I don't completely understand, @x42 indicates that his tool CC2NOTE will NOT do what was suggested by others. He indicated the solution would come from either mididings (previously mentioned in this thread), or a Lua script within Ardour (if using Ardour, which I am!).

@x42 offered to produce a script if I would provide the CC Notes from my specific modules. The script he wrote for hi-hat open/close sounds for an Alesis DM10 MKii Pro module is located here: (please note this is specific to the module referenced)
https://raw.githubusercontent.com/Ardou ... studio.lua

I downloaded the script, placed in the correct directory for Ardour to recognize, refreshed my "lua script window", and then inserted his script as a plugin immediately BEFORE the DrumGizmo plugin. Works like a champ....so there's the template! Note this is hi-hat open & close function ONLY....still no pedal notes, and still no choke on cymbals. Not sure if modifying this script to add those "note functions" will suffice, or whether separate scripts are needed for each function....but there's a verified working template for anyone who knows what they're doing with MIDI notes and Lua scripts! (I am NOT that guy, LOL)

@x42 talked about differences between MIDI notes, CC Notes, "after touch" events, static states, dynamic states....most of it going over my head. But indicating that if notes were provided, and DrumGizmo devs wanted to collaborate/cooperate, it's a relatively easy matter to script. As the main(?) dev for DG, wondering what @deva thoughts are on the matter?

FWIW, I think DG does an EXCELLENT job providing midmaps and making them EASILY modified by the user. I don't think it's practical (or even a good use of resources) to produce scripts for every drum module that implements CC Notes (not all e-drums do; many just provide a separate note). Is there a way for DG to implement CC NOTES within, and provide the mapping, as well as syntax? To be altered by an end user, like myself, as needed? What is POSSIBLE? What is PRACTICAL?

While that is being sorted and/or discussed, just wanted to give a HUGE shout-out to @deva and @x42 for their help in getting me this far! Very much appreciated...THANK YOU!

EDIT: @x42 posted while I was typing this up. Flip our posts, and mine will make more sense.

User avatar
Impostor
Established Member
Posts: 1442
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 155 times
Been thanked: 383 times

Re: Convert midi CC event to notes

Post by Impostor »

Hedon wrote: Wed May 15, 2024 4:54 pm

CC Notes from my specific modules.

As x42 already mentioned "cc notes" do not exist. There's midi note on/off messages, and then there's midi cc (continuous controller or control change) messages. Notes usually trigger a sound, while a cc can be used to control some parameter. In your case, this parameter would be "hihat openness". A parameter controlled by cc messages keeps its current value until it is changed by a new message.

Post Reply