Volume fade IN and OUT feature with velocity triggered sound samples

Rajiv Deo posted Oct 7, 10:39:

This is a great open source project!
Velocity based triggering of sound samples works quite well. Latency is also not too bad.
One small feature could enhance the utility of SamplerBox -
Let me explain -

velocity between 0 to 60 plays sample60
velocity between 61 to 80 plays sample80
velocity between 81 to 90 plays sample90
velocity between 91 to 127 plays sample127

Now If you hit the key with velocity 66 then two sounds should play - faded out Sample60 + faded in sample80

Simillar sound mixing for other velocities at 86, 96 etc.

This will ensure smooth acoustic transition to the listener.

Is this possible? Any ideas or pointers for modifying the code?

Many thanks in advance

HansEhv posted Oct 7, 19:16:

Hi Rajiv,
Please have a look at the Velocity=Accurate in the newer versions.
Active forks etc are discussed in http://samplerbox.org/forum/358

Rajiv Deo posted Oct 10, 13:27:

%%velmode = Accurate : scales the volume of a sample based on the velocity of the note played.

But I am really talking about MIXING two samples mapped to two velocities. Ideally the transition should follow bell curve for Fade in and Fade out on the two samples. Center of the velocity range plays only the sound mapped to that velocity. Left or right of that center mixes the sample mapped to earlier of previous velocity. If that is already possible can you please elaborate with an example?

HansEhv posted Oct 10, 22:33:

Hi Rajiv, this is not possible yet in any fork I'm aware of

Eriknie posted Oct 11, 08:39:

Although this sounds as a great feature, it wil not work.
When the levels of 2 almost identical samples are close in volume, they will most probably create a phasing soundeffect. This will happen when you play just between 2 velocity levels. When you play at the exacte velocity level of one sample, the sound will not be have the phase effect.
In your example:
when you play at velocity level 60 it will play sample60 clean
when you play at velocity level 80 it will play sample80 clean
when you play at velocity level 70 it will play sample60 at 50% level and sample80 at 50% level creating a phasing effect.

When playing this sound live it will sound sometimes phasy, sometimes less, sometimes not.

The accurate velocity level was introduced by me in my fork.
In the original fork it was implemented that the samples was played at the sampled level.
using your example:
when you play at velocity level 10 it will play sample60 at full level
when you play at velocity level 55 it will play sample60 at full level
when you play at velocity level 70 it will play sample80 at full level
assuming that the samples are recorded at the played level (so sample60 is low in volume than sample80)

Using Accurate velocity, all samples should be normalized in level and the following is done:
when you play at velocity 10 it will play sample60 at level 10/128 (128 is the max)
when you play at velocity 70 is will play sample80 at level 70/128

HansEhv posted Oct 11, 12:30:

Hi Erik
Nice to see you back.
Basic idea of the implementation has not changed in the existing forks as it works like a charm.
So this explanation fits all :-)


  (not published)
  I want to post as guest