Positional sensing
Moderators: MattKingUSA, khz, muldjord, deva
- deva
- Established Member
- Posts: 285
- Joined: Sun Oct 23, 2016 10:15 am
- Has thanked: 3 times
- Been thanked: 31 times
- Contact:
Re: Positional sensing
So far we have only used different notes for different positions, but somehow using after-touch events or other midi CCs seems like a better way to do it I think.
Did you have something specific in mind?
Did you have something specific in mind?
Re: Positional sensing
> So far we have only used different notes for different positions
I didn't know that, thank you for the information.
> or other midi CCs seems like a better way to do it I think
Roland drum modules do it this way. Actually that was to only way I knew so far.
> Did you have something specific in mind?
I am currently working on an open source e-drum trigger module based on the ESP32 micro controller (https://github.com/corrados/edrumulus). Right now I am using my Roland TD-20 module for drum sound generation. With the Roland module, I send a MIDI controller message 16 in the range of 1 to 127 before the MIDI note-on message to set the position.
If you say that you use different notes for the position, how many different positions do you support?
I didn't know that, thank you for the information.
> or other midi CCs seems like a better way to do it I think
Roland drum modules do it this way. Actually that was to only way I knew so far.
> Did you have something specific in mind?
I am currently working on an open source e-drum trigger module based on the ESP32 micro controller (https://github.com/corrados/edrumulus). Right now I am using my Roland TD-20 module for drum sound generation. With the Roland module, I send a MIDI controller message 16 in the range of 1 to 127 before the MIDI note-on message to set the position.
If you say that you use different notes for the position, how many different positions do you support?
- deva
- Established Member
- Posts: 285
- Joined: Sun Oct 23, 2016 10:15 am
- Has thanked: 3 times
- Been thanked: 31 times
- Contact:
Re: Positional sensing
I would love to add support for this in DrumGizmo.
What does the position midi message look like in its entirety? Is it an after-touch event for example? And how should the value be interpreted? For example 0 := center 127 := edge?
Or even better; Could you send me a midi file with some notes using this feature which can then be used during development?
What does the position midi message look like in its entirety? Is it an after-touch event for example? And how should the value be interpreted? For example 0 := center 127 := edge?
Or even better; Could you send me a midi file with some notes using this feature which can then be used during development?
Re: Positional sensing
> What does the position midi message look like in its entirety? Is it an after-touch event for example? And how should the value be interpreted? For example 0 := center 127 := edge?
What I do right now is:
- Ch 10: Controller 16 value [1-127]
- Ch 10: Note 38 on velocity [1-127]
- Ch 10: Note 38 off velocity 0
(https://github.com/corrados/edrumulus/b ... us.ino#L67)
I don't know how after-touch works but what I do is just to send the controller MIDI message right before the actual MIDI note on message. The value should be interpreted like: 1 := center, 127 := edge. As far as I known, the value 0 is not used.
What I do right now is:
- Ch 10: Controller 16 value [1-127]
- Ch 10: Note 38 on velocity [1-127]
- Ch 10: Note 38 off velocity 0
(https://github.com/corrados/edrumulus/b ... us.ino#L67)
I don't know how after-touch works but what I do is just to send the controller MIDI message right before the actual MIDI note on message. The value should be interpreted like: 1 := center, 127 := edge. As far as I known, the value 0 is not used.
Re: Positional sensing
> Could you send me a midi file with some notes using this feature which can then be used during development?
I have recorded and exported a short MIDI file of the TD-20 snare using positional sensing in Cubase: https://drive.google.com/file/d/1uYSV1k ... sp=sharing
I hope that the controller messages are correctly stored in the MIDI file.
I have recorded and exported a short MIDI file of the TD-20 snare using positional sensing in Cubase: https://drive.google.com/file/d/1uYSV1k ... sp=sharing
I hope that the controller messages are correctly stored in the MIDI file.
- deva
- Established Member
- Posts: 285
- Joined: Sun Oct 23, 2016 10:15 am
- Has thanked: 3 times
- Been thanked: 31 times
- Contact:
Re: Positional sensing
Great, thanks
If multiple drums are being played simultaneously, how should the control change event be interpreted? Does it simply only effect one note following it? Or should it now be "the position", meaning that all future hits to any drum should be using this position?
If multiple drums are being played simultaneously, how should the control change event be interpreted? Does it simply only effect one note following it? Or should it now be "the position", meaning that all future hits to any drum should be using this position?
Re: Positional sensing
I am no MIDI expert and therefore can just guess. I would assume that it only applies to the single note which is played right after the control message.
Re: Positional sensing
I am curious how you will implement the position support in DrumGizmo. We have 127 velocity and 127 position values available. So this would make about 16k different sounds. For the velocity you have implemented some smart algorithms to cross-fade the available samples. Is this now also required for the position? The question which comes up is: If I want to add samples for positional sensing for, e.g., my snare sounds in DrumGizmo, how many samples do I have to record to get a decent performance? Since it is a two-dimensional problem, should I record for each position (maybe support about 4-6 positions) all possible velocities?
Edit: Thinking a bit further: What about rim shots? With rim shots, the position also should be supported somehow.
Edit: Thinking a bit further: What about rim shots? With rim shots, the position also should be supported somehow.
- deva
- Established Member
- Posts: 285
- Joined: Sun Oct 23, 2016 10:15 am
- Has thanked: 3 times
- Been thanked: 31 times
- Contact:
Re: Positional sensing
I have a branch supporting adding a position to each sample in an instrument and the idea is to use a similar algorithm for selecting the samples in two dimensions (velocity, position) in a similar to how we select the samples today in one dimension (velocity).corrados wrote: ↑Sun Jan 24, 2021 5:54 pm I am curious how you will implement the position support in DrumGizmo. We have 127 velocity and 127 position values available. So this would make about 16k different sounds. For the velocity you have implemented some smart algorithms to cross-fade the available samples. Is this now also required for the position? The question which comes up is: If I want to add samples for positional sensing for, e.g., my snare sounds in DrumGizmo, how many samples do I have to record to get a decent performance? Since it is a two-dimensional problem, should I record for each position (maybe support about 4-6 positions) all possible velocities?
Once the code is done, we still need to record an instrument that supports it - but I can probably make a snare-drum as an example for you to play with.
I'm not sure if rim-shots should be simulated in that way. Hitting the rim of the drum, should simply make a click sound (rim-click). Hitting the rim and the snare somewhere close to the center (but any point really) should produce a rim-shot.
Just to be clear on the terminology:
- rim-shot: https://youtu.be/6nqrzoXccNk?t=45
- rim-click: https://youtu.be/yfU8eAfjtfk?t=51
Re: Positional sensing
The Roland TDW-20 does support positional sensing for rim-shots. And I personally think that it would improve the expressiveness of a snare if we would have that. Since the sound difference between a rim-shot where the head is hit in the middle does sound very much different on a real snare compared to a rim-shot where the head is hit at the edge. But this would again introduce another layer of complexity.I'm not sure if rim-shots should be simulated in that way.
But I have to admid that my edrum-library also does not yet support positional sensing in combination with rim-shots . But I definitely would like to add this feature in my library.
Re: Positional sensing
With a TD-50 here, I agree the positional sensing for rim shots is a good. (positional sensing on the head, not rim)
It's more expressive, also more natural and intuitive, a good positive feedback reinforcement interface, all of which is so important with digital interfaces, to make them feel more natural and organic like their analog counterparts.
Probably best to record the samples on an acoustic drum set with triggers installed, and record the trigger information along with each sample. I think you'll find new useful information that way (e.g., that rim velocity vs. head velocity is a cool dimension). For position I guess you'd use multiple triggers around the circumference of the head, and delta their time (or is it velocity?).
But are 3+ dimensions problematic because it needs too big a sample pool?
Thanks, looking forward to what you come up with!
It's more expressive, also more natural and intuitive, a good positive feedback reinforcement interface, all of which is so important with digital interfaces, to make them feel more natural and organic like their analog counterparts.
Probably best to record the samples on an acoustic drum set with triggers installed, and record the trigger information along with each sample. I think you'll find new useful information that way (e.g., that rim velocity vs. head velocity is a cool dimension). For position I guess you'd use multiple triggers around the circumference of the head, and delta their time (or is it velocity?).
But are 3+ dimensions problematic because it needs too big a sample pool?
Thanks, looking forward to what you come up with!
Re: Positional sensing
Actually one can easily implement positional sensing using CC-related parameters in any decent SFZ sampler (some sample banks even have support out of the box). on_loccN and on_hiccN opcodes have been there since SFZ v1 (dated pre-2005 at least).
Edit: you can even trigger multiple samples (like center, size and rimshot) and mix them in different proportions depending on CC value. smth like
Edit: you can even trigger multiple samples (like center, size and rimshot) and mix them in different proportions depending on CC value. smth like
Code: Select all
<region> sample="Snare-center.wav" on_locc82=0 on_hicc82=41 volume=0
<region> sample="Snare-center.wav" on_locc82=42 on_hicc82=83 volume=-6
<region> sample="Snare-center.wav" on_locc82=84 on_hicc82=127 volume=-12
<region> sample="Snare-side.wav" on_locc82=0 on_hicc82=41 volume=-6
<region> sample="Snare-side.wav" on_locc82=42 on_hicc82=83 volume=0
<region> sample="Snare-side.wav" on_locc82=84 on_hicc82=127 volume=-6
<region> sample="Snare-rimshot.wav" on_locc82=0 on_hicc82=41 volume=-12
<region> sample="Snare-rimshot.wav" on_locc82=42 on_hicc82=83 volume=-6
<region> sample="Snare-rimshot.wav" on_locc82=84 on_hicc82=127 volume=-0