When are artificial events inactive?
-
@ericchesek I still don't think you need to store multiple event IDs per note.
Just let the old notes continue to ring out and store the new IDs. .
-
@d-healey Then that defeats the purpose of choking, doesn't it?
Maybe a clear description of the phenomenon I'm trying to recreate will help explain what I'm trying to do. I don't know if many other drum samplers do this, but it really does improve the realism. I was able to script this in Kontakt, but I haven't quite cracked how to do it in HISE.
A drummer plays 5 notes on a floor tom in this order: hard, hard, soft, medium, hard.
-
The first hard hit makes the drum head vibrate with a large amplitude. There's a lot of kinetic energy.
-
Then a second hard hit comes and disrupts the sustain of the first hard hit. In the sampler, this would be equivalent to choking the first hard hit in a sampler with a quick fade time.
-
Now, because the drum head has so much kinetic energy, a soft hit does not disrupt the low frequency movement of the drum head. The soft hit stacks on top of the sustain of the hard hit.
This is a case when the soft sample does not choke the hard sample. Their sustains overlap. -
A medium hit will then disrupt the kinetic energy a little bit. This is a choke with a medium fade out time.
-
The final hard hit overtakes the energy of all the previous hits, so if any energy is left from the first four hits, this sample chokes all of their sustains. I no longer need event IDs from the first four notes once this one chokes them.
Finally, I can clear the event ID of the final hit once its sustain rings out to completion.
Consider how long a floor tom's sustain can be compared to how quickly a drummer can play those 5 notes. That is why this choke behavior is important.
-
-
@ericchesek How many velocity layers do you have?
-
@d-healey Up to 30 for some drums, but usually on the order of 8 to 16. I calculate the fade time for the choke length based on the difference of the previous note velocity and the current note velocity.
-
@ericchesek Ah ok, I was thinking that using one sampler per velocity might help, but not with that many layers.
So back to the original question. I think that as long as the note is still playing the event can be manipulated using its ID. You could quickly make a little test project to see if that's the case.
-
@d-healey This is true! I am currently manipulating the event when the note is still playing. Meaning the sampler sound is still ringing out regardless of the midi event length... lol the "note" terminology gets confusing.
I'm trying to check when the sampler sound is no longer playing (i.e. when the voice is no longer active) so that I don't have an array full of event IDs that no longer need to be manipulated.
I'll see if I can do something with a sine wave sampler so I can upload a snippet.
Thanks again, David.
-
@ericchesek said in When are artificial events inactive?:
@d-healey Then that defeats the purpose of choking, doesn't it?
Maybe a clear description of the phenomenon I'm trying to recreate will help explain what I'm trying to do. I don't know if many other drum samplers do this, but it really does improve the realism. I was able to script this in Kontakt, but I haven't quite cracked how to do it in HISE.
A drummer plays 5 notes on a floor tom in this order: hard, hard, soft, medium, hard.
-
The first hard hit makes the drum head vibrate with a large amplitude. There's a lot of kinetic energy.
-
Then a second hard hit comes and disrupts the sustain of the first hard hit. In the sampler, this would be equivalent to choking the first hard hit in a sampler with a quick fade time.
-
Now, because the drum head has so much kinetic energy, a soft hit does not disrupt the low frequency movement of the drum head. The soft hit stacks on top of the sustain of the hard hit.
This is a case when the soft sample does not choke the hard sample. Their sustains overlap. -
A medium hit will then disrupt the kinetic energy a little bit. This is a choke with a medium fade out time.
-
The final hard hit overtakes the energy of all the previous hits, so if any energy is left from the first four hits, this sample chokes all of their sustains. I no longer need event IDs from the first four notes once this one chokes them.
Finally, I can clear the event ID of the final hit once its sustain rings out to completion.
Consider how long a floor tom's sustain can be compared to how quickly a drummer can play those 5 notes. That is why this choke behavior is important.
@gorangrooves I'd love to hear your thoughts on this if you have a moment. You clearly know your way around drum instruments!
Is this something you've ever tried to approach? Maybe I'm thinking about it the wrong way.
-
-
@ericchesek you could empty the array when you confirm no notes are ringing.
In my experience, you can do this in a much simpler and practical way. You could split an instrument into 2 or perhaps 3 samplers, all placed within a single container. Each sampler takes care of a particular velocity range. The main thing is that the quiet notes don't choke the loud notes and this is particularly critical for decaying sounds, like cymbals.
You can set each sampler's max voices to 5 or 6, and adjust the fade out time of the sampler to something like 1500, then test to ensure natural playback and feel.
-
@gorangrooves That's a good idea too. David brought up a similar idea, but yours is a little different since it handles velocity ranges instead of individual velocities. Still not as clean of a solution as I'd like, unfortunately.
I wonder if I can do this all by changing the release control of an ADHSR module. That avoids the weirdness of not being able to modify an event ID once the note is killed I think. Not sure if the module operates on triggered samples independently though.
Is that something anyone has tried? -
@ericchesek you don't have to worry about note ids or any such thing. Just set the samplers' settings correctly.
When you specify maximum number of voices, that handles note chokes automatically. If it is set to 5, when 6th note is played, the 1st note is faded out based on your setting. You just tweak that to make sure the fade is unnoticeable.
You'll know you got it perfectly when you the instrument and everything sounds natural and normal.