Danny Wyatt Posted February 5, 2022 Share Posted February 5, 2022 How to have a certain velocity range trigger a certain note? For example from 1 to 63 it's C1 and from 64 to 127 is D1. I would like to use the Scripter as a solution, because I have a new electronic drum kit and since I already have other scripts for other things I would like to have a single script for everything. Thanks! Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted February 5, 2022 Share Posted February 5, 2022 velocity range of what input note? Quote Link to comment Share on other sites More sharing options...
Danny Wyatt Posted February 5, 2022 Author Share Posted February 5, 2022 velocity range of what input note? Let me explain what I'm looking for: I bought a new electronic drum kit and the ride cymbal is not triggering the Drum Kit Designer ride's bell, so I want to have for example 1 to 100 to trigger D#2 (Ride Out) and then from 101 up to 127 to trigger F2 (Ride Bell). That way I can just hit the cymbal harder to make it trigger the bell sound. Using that script I will also be able to use the snare pad to trigger D1 (Snare Center) if it's 1-100 and then trigger E1 (Snare Rimshot) if it's 101-127. So basically the default notes are D#2 for the ride pad and D1 for the snare pad. Hope that helps Quote Link to comment Share on other sites More sharing options...
Solution Dewdman42 Posted February 6, 2022 Solution Share Posted February 6, 2022 I don't have time to test it, but try this: var pitch1 = MIDI.noteNumber("C1"); var pitch2 = MIDI.noteNumber("D1"); var last = pitch1; function HandleMIDI(event) { if(event instanceof NoteOn && event.pitch == pitch1) { if(event.velocity > 100) { event.pitch = pitch2; last = pitch2; } else { last = pitch1; } } else if (event instanceof NoteOff && event.pitch == pitch1) { event.pitch = last; } event.send(); } Quote Link to comment Share on other sites More sharing options...
Danny Wyatt Posted February 7, 2022 Author Share Posted February 7, 2022 I don't have time to test it, but try this: var pitch1 = MIDI.noteNumber("C1"); var pitch2 = MIDI.noteNumber("D1"); var last = pitch1; function HandleMIDI(event) { if(event instanceof NoteOn && event.pitch == pitch1) { if(event.velocity > 100) { event.pitch = pitch2; last = pitch2; } else { last = pitch1; } } else if (event instanceof NoteOff && event.pitch == pitch1) { event.pitch = last; } event.send(); } It worked as expected. Thank you so much for sharing it! Quote Link to comment Share on other sites More sharing options...
MidiSlave Posted June 14, 2022 Share Posted June 14, 2022 That's really helpful! I used this method to split velocity ranges to play closed hi hat and Hi Hat Edge/Shank for any velocity above 100, giving me much more expression using my very cheap eKit.. But how do add one more range? ...say between velocity of 80 -100 to produce another note. So that I can achieve something like... F#1 0-80 = F#1 (Tight) F#1 80-100 = F#2 (Closed) F#1 100-127 = F#3 (Edge) @Dewdman42🤝🙏 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.