Jump to content

Using Velocity to switch note (E-drums Ride)


Recommended Posts

Hello there,

 

I would like to use my e-drum (Alesis DM8) Ride cymbal (2 zones) to have two sounds in the same area.

 

Like: When I strike the Ride Tip with a velocity greater than 90 the midi note would change and I would get a Bow sound. Something like:

 

If C3 Velocity >= 90 then Midi Note = C#3 with the same velocity.

 

I would be really grateful if someone could help me with it!

 

Thank you!

 

Cheers!

Link to comment
Share on other sites

I got it!

 

Use with moderation! ;)

 

//************************************************
// Alesis DM8 Velocity Note Switching (Ride Cymbal)
//************************************************

function HandleMIDI(event)
{

event.send();

// If Ride Tip is played harder then velocity 90
if(event instanceof NoteOn && event.pitch == 51 && event.velocity >= 90) {
   
       var note = new NoteOn; //create a NoteOn object
       
                  
       note.pitch = 25; //Ride Shaft
       
       note.send(); //send note on            
}     
// If Ride Tip is played harder then velocity 110
if(event instanceof NoteOn && event.pitch == 51 && event.velocity >= 115) {
   
       var note = new NoteOn; //create a NoteOn object
                  
       note.pitch = 79; //crash 2
       
       note.send(); //send note on            
}                         
event.trace();
event.send();

}

 

Cheers!

Link to comment
Share on other sites

Kudos to you for showing the effort. Meanwhile, Atlas is right, a Transformer between Physical In and SequencerIn would have achieved just that, with the difference that the C#3s will be recorded, whereas the Scripter solution is post recording, and thus all cymbal velocities would be recorded as C3 and only changed on their way out. No audible difference, mind you, but could be confusing when trying to edit those C#3 notes later...
Link to comment
Share on other sites

intergalactico, the script you posted would duplicate the notes...'

 

Try this:

 

//************************************************
// Alesis DM8 Velocity Note Switching (Ride Cymbal)
//************************************************


function HandleMIDI(event) {

 // If Ride Tip is played harder then velocity 90
 if(event instanceof NoteOn && event.pitch == 51 && event.velocity >= 90) {                   
       event.pitch = 25; //Ride Shaft
 }     
 
 // If Ride Tip is played harder then velocity 110
 if(event instanceof NoteOn && event.pitch == 51 && event.velocity >= 115) {            
       event.pitch = 79; //crash 2        
 }                         
  
 event.trace();
 event.send();

}

 

What Atlas suggested about a transformer object in the environment could also easily work for live playing. One advantage of the environment is that it will effect the change BEFORE hitting the sequencer in order to record the changed note numbers into regions as you record. The Scripter script only makes the change after the sequencer at the last instant before going to the instrument.

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...