Jump to content

Electronic Drum Kit Midi Issues


Bdiazmusic
Go to solution Solved by romainbessuges,

Recommended Posts

I'm running an Alesis Crimson kit directly into the latest version of Logic Pro. In the module, it lets you adjust what midi note each trigger is sending, (ex. open hat = 46,) but I can't program it to send a closed hat sound. Open hats are triggering fine, as well as the sound of closing the hats via pedal, but when the pedal is down and the hats are played, there is no sound. Midi monitor shows that data is sending, so I believe that the problem is the way Logic is interpreting the data. Any ideas??
Link to comment
Share on other sites

  • 2 years later...

I have the same exact issue. It turns out that Logic do not receive events when the HiHat of the Alesis e-drum pedal is closed. But MIDI monitor do! How weird is that?

 

logic.png

 

With factory settings, Alesis Advanced Drum module send a G#-2 note for both closed and hi-hat sounds. No sound in Logic for both of them. I was able to change the MIDI note in the drum module to E5 and as a result Logic sees it. But my guess is that the closed hi hat sound still sends a G#-2 note... that Logic can't handle.

 

What do you think?

Link to comment
Share on other sites

Ok, that means that the G#-2 notes are assigned to something in Logics controller assignments. Open the controller assignments window and hit the closed hihat, the assignment should get highlighted, delete it.

EDIT To be able to see any assignments, you need to uncheck the 'Bypass All...' first.

Link to comment
Share on other sites

Ideally I want to be able to play DKD and maybe EZDrummer. I was able to reproduce the closed hi-hat sound with a custom script, be I fear I will have to code the HiHat pedal management (F# if pressed down and A# if open).

 

function HandleMIDI(event) {

 

// if it's a G#-2

if (event instanceof Note && event.pitch == 8) {

event.pitch += 34; // F#

event.trace();

}

event.send(); // send original event

}

Link to comment
Share on other sites

Yes, for DKD you'd have to transpose it to F#1. Since your pedal seems to send cc4, I'd try inserting a Modifier midi fx on the channel strip to modify cc4 to cc1, then in the DKD gui do this:

(Or maybe the V-drum preset does this by default, could be you don't even need the modifier)

1915936518_DKDcc1Mapping.thumb.png.1b50a43981f30b9c485ef2ccfa138baf.png

Link to comment
Share on other sites

Ok I went quite far this morning, after unsuccessfully trying to map the G#-5 and the Modwheel.

 

I ended up creating a Swift Command Line App in Xcode that runs in the background and patches in realtime the MIDI messages that come from my Crimson 2 Kit. I used a fantastic library cold MIKMidi that saved me a great deal of time.

 

ok.png

 

As a result, I got two MIDI sources when the program is running (my drum kit and the virtual MIDI source I create). I need to untick the drum kit in Logic to avoid duplicate events.

 

I struggled with the ModWheel / HiHat thing, but was not able to make it work. Using the GM + Modwheel Input Mapping did not produce results, even after I "patched" the CC4 to CC1 in my program. I created a TRUE/FALSE variable in my program that stores whether the HiHat pedal is closed or not, and I alter its value depending on the CC4 event. To be frank, it's working but not very satisfying to play with. I lack all the subtlety of the HiHat pedal and the half-closed sounds.

 

Anyone here knows how to correctly rewire the CC1 events for them to be well understood by Logic DKD? If anyone has a V-Drum drum kit or a working GM+ModWheel setup, could you please make a screenshot of a MIDI Monitor displaying closing and opening the HH? It would allow me to reverse-engineer the protocol and integrate the logic in my program.

 

For the nerds and the curious, here's what the code looks like:

import Foundation
import MIKMIDI

let virtualMidiDevice = VirtualMidiDevice();
virtualMidiDevice.enabled = true

let availableDevices = MIKMIDIDeviceManager.shared.availableDevices
let matchingDevices = availableDevices.filter { (MIKMIDIDevice) -> Bool in
   return (MIKMIDIDevice.model! == "Alesis Crimson II");
}
let crimson:MIKMIDIDevice = matchingDevices[0]

var hihatClosed:Bool = true;

let connectionToken = try MIKMIDIDeviceManager.shared.connect(crimson) { (sourceEndpoint:MIKMIDISourceEndpoint, command:Array<MIKMIDICommand>) in
   
   let patched:Array<MIKMIDICommand> = command.map { (singleCommand:MIKMIDICommand) -> MIKMIDICommand in
   
       if(singleCommand is MIKMIDINoteCommand){
           let noteCommand = (singleCommand as! MIKMIDINoteCommand);
           // Remap the HiHat
           if(noteCommand.note == 8){
               return MIKMIDINoteCommand(
                   note: hihatClosed ? 42 : 46,
                   velocity: noteCommand.velocity,
                   channel: noteCommand.channel,
                   isNoteOn: noteCommand.isNoteOn,
                   midiTimeStamp: noteCommand.midiTimestamp
               )
           }
           if(noteCommand.note == 22){
               return MIKMIDINoteCommand(
                   note: 44,
                   velocity: noteCommand.velocity,
                   channel: noteCommand.channel,
                   isNoteOn: noteCommand.isNoteOn,
                   midiTimeStamp: noteCommand.midiTimestamp
               )
           }
       }
       
       if (singleCommand is MIKMIDIControlChangeCommand) {
           let controlChangeCommand = (singleCommand as! MIKMIDIControlChangeCommand);
           if(controlChangeCommand.controllerNumber == 4){
               hihatClosed = controlChangeCommand.controllerValue > 30;
               print("HiHat pedal change, is closed?", hihatClosed, controlChangeCommand.controllerValue)
               return MIKMIDIControlChangeCommand(controllerNumber: 1, value: controlChangeCommand.controllerValue);
           }
           
       }
       
      return singleCommand
   };

   let packet = MIKMIDIPacketCreateFromCommands(command[0].midiTimestamp, patched)
   virtualMidiDevice.send(packet: packet.pointee)
   MIKMIDIPacketFree(packet)
   
}

CFRunLoopRun()

 

And the VirtualMidiDevice class I use :

 

//
//  VirtualMidiDevice.swift
//  MIDIBar
//
//  Created by Joshua Breeden on 11/6/16.
//  Copyright © 2016 Joshua Breeden. All rights reserved.
//

import Foundation
import CoreMIDI

class VirtualMidiDevice {
   private var midiClient = MIDIClientRef()
   private var midiSource = MIDIEndpointRef()

   var enabled: Bool = false {
       didSet {
           if enabled {
               MIDIClientCreate("Alesis Crimson II Patched" as CFString, nil, nil, &midiClient)
               MIDISourceCreate(midiClient, "Alesis Crimson II Patched" as CFString, &midiSource)
           } else {
               MIDIClientDispose(midiClient)
           }
       }
   }

   func send(packet: MIDIPacket) {
       var packets = MIDIPacketList(numPackets: 1, packet: packet)

       MIDIReceived(midiSource, &packets)
   }
   func send(data: [UInt8]) {

       var packet = MIDIPacket()
       packet.data.0 = data[0]
       packet.data.1 = data[1]
       packet.data.2 = data[2]
       packet.length = 3
       packet.timeStamp = 0

       var packets = MIDIPacketList(numPackets: 1, packet: packet)

       MIDIReceived(midiSource, &packets)
   }
}

  • Like 1
Link to comment
Share on other sites

Another breakthrough in my reverse engineering of Logics DKD. I figured out the articulation IDs I need to pass. I my Foot pedal course is 0-127, I will reduce it to a 1-7 range and try to pass the articulation ID that matches my hi-hat pedal opening. Does anybody know how what MIDI event I have to send to tell Logic to change the alteration of the note?

 

articulationID.png

Link to comment
Share on other sites

  • Solution

OK I GOT IT WORKING!

Investigating into Articulation ID was a dead end and I went back and tried to reverse engineer v-drums. I managed to create a DKD and set its Input Mapping to V-Drum. Then I created a MIDI region and wrote some F#2 hi-hat 8th notes. By cycling through MIDI automation, I did find a setup where 0-127 values would change the hi-hat openness: its Command 1 on Channel 10.

Going back to MIDI Monitor, I pressed the Alesis Hi-Hat and noticed that it was sending a Command 4 on Channel 1. So I added a condition in my code and patched the CC command accordingly. It almost worked the first time... I quickly noticed that my foot motion was reversed in the DAW (Open = Closed). So I just added a little "value = 127 - value" and BOOM, it worked !

 

To say that I'm delighted with the result is an understatement. Playing with DKD without having to tweak Logic with MIDI scripts or disable all the Control Surfaces mapping

 

I'm currently working on a GUI that I will eventually release after I battle test the script. Let me know if you're interested in testing it.

Link to comment
Share on other sites

I think you are right. To summarize my findings, I believe that you could process manually. You would need to :

• remap G#-5 to F#2 (remember Alesis Crimson sends G#-5 even if you tell it not to!)

• remap CC4 channel 1 to CC1 channel 10

• invert te CC1 value (127 - value)

But in my case, I find it more convenient to just have one program running in the background that translates my drum kit signals. This way I can have it working just fine in DKD, SSD, Superior Drummer, etc. and it is not a Logic / Logic Project specific configuration.

Link to comment
Share on other sites

  • 7 months later...
What if you're simply programing the drums by "hand", without an electronic kit? EZ drummer (post rock exp.) has 5 different open hihat articulations. the script editor in Logic Pro has 1 articulation. Is there a way to have all five open hihat articulations assinged to Logic's piano roll? Also, EZ Drummers' velocity range is wider than Logic's. Is there any way to get Logic to recognize this wider velocity range soming from the EZ Drummer software? Thanks for any advice!
Link to comment
Share on other sites

  • 3 months later...
But in my case, I find it more convenient to just have one program running in the background that translates my drum kit signals. This way I can have it working just fine in DKD, SSD, Superior Drummer, etc. and it is not a Logic / Logic Project specific configuration.

 

@romainbessuges Would you be willing to share your program? I'm having the exact same problem while trying to use an Alesis Crimson II edrum kit with MainStage. I'm on Mid-2015 MacBookPro MacOS 10.14.6 Mojave 16GB RAM 1TB SSD. Perhaps you can post it to Google Drive folder for download?

Link to comment
Share on other sites

  • 1 month later...
I think you are right. To summarize my findings, I believe that you could process manually. You would need to :

• remap G#-5 to F#2 (remember Alesis Crimson sends G#-5 even if you tell it not to!)

• remap CC4 channel 1 to CC1 channel 10

• invert te CC1 value (127 - value)

But in my case, I find it more convenient to just have one program running in the background that translates my drum kit signals. This way I can have it working just fine in DKD, SSD, Superior Drummer, etc. and it is not a Logic / Logic Project specific configuration.

 

Hi romainbessuges, would you be able to share the final version of this script or the GUI for me to test? I just got the Alesis Crimson 2 hoping to play and record myself in Logic Pro X and it's a bummer to find out it doesn't work and there is apparently no straightforward fix for this issue.

Your help would be much appreciated!

Link to comment
Share on other sites

You don't need a script for that. Have you experimented with the different input mapping settings in DKD ? What's not working ?

 

Yeah, I tested a lot of different stuff yesterday.

It seems the issue is that the Crimson uses the same note for open and close hihat.

I can change the note used in in the Crimson module, but for some reason it only changes the open hihat and the pressing/splashing of the pedal.

The closed hihat with the pedal continuously pressed doesn't change (G#-2 in my case).

GM, GM + Wheel or V-Drum setting doesn’t change that at all.

I have found what seems to be a solution but it was too late in the night, so I’ll need to test it better.

I used the Modifier MIDI FX and I found a very specific value there where it seems to make it work as expected (Scale 200% and Add 78).

Link to comment
Share on other sites

  • 1 month later...

I am attaching the solution for Alesis Crimson II and DKD (testing with SoCal).

Choose input-mapping V-Drum in DKD

Add plugin script to "midi fx" of track.

Put the following code there, instead of everything that appears in the script editor window

var pedal_vpol=false;
function HandleMIDI(event){
if (event instanceof ControlChange && event.number == 4){
	event.number=1; 	
	pedal_vpol = (event.value==127)?true:false;
	event.value = 127-event.value;
}

if (event instanceof Note && event.pitch == 8 && pedal_vpol) {
	event.pitch += 34; 
}
//event.trace ();
event.send (); 
}

and Run Script.

In the alesis settings (menu, trigger) hit the hi-hat and tune the midi note to 46.

 

That's all. This is how the open and semi-closed and closed hat works for me.

Link to comment
Share on other sites

  • 1 year later...

ok it's march 29th 2023, aka "the future" 

Just paid way too much for a kit that won't work as a standard midi drum kit controller right out of the box. Alesis Strike Pro. There's no resources or updates that will make it work either. Using Logic pro / macbook pro / ventura. I really just want to be able to use my frekin hi hat. specifically would like to use it on DMD.

Please tell me someone has figured out a way to fix this without hacking into some mothership via coding/script...

I'm desperate but don't have all the time in the world. Honestly, I'd like to send this puppy back but I don't have the 10 hours it would take to box it all back up. 

 

Any help would be greatly appreciated !!!!!!!!!!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...