Expand amplitude range

Discussion on the SFZ implementation and opcodes available in the ARIA engine.

Moderators: eric_telemaque, davidv

Posts: 100
Joined: Wed Oct 15, 2014 2:05 pm

Expand amplitude range

Postby pljones » Sun Mar 12, 2017 6:20 pm

OK, it's probably because it's nearly midnight and I've been staring at dB values for days -- but I can't figure out how to expand the range of amplitude for a note hit.

It's also hard to think of a simple example that doesn't over simplify the situation.

Let's say five samples: -5dB, -6dB, -7dB, -8dB, -9dB. Not a great range. I'd like to be able to have 5 equally wide velocity layers triggering these:
lovel=001 hivel=025
lovel=026 hivel=052
lovel=053 hivel=076
lovel=077 hivel=101
lovel=102 hivel=127

As a starting point, I'd turn off velocity to amplitude tracking at <group> level. That gives my 127 velocity range a 4dB aplitude range.

Without setting something per <region>, is there something I can do at <group> level that would expand the amplitude range?

Posts: 100
Joined: Wed Oct 15, 2014 2:05 pm

Re: Expand amplitude range

Postby pljones » Mon Mar 13, 2017 5:21 am

Hm. Is it as simple as this comment?

Code: Select all

<curve> curve_index=99 v1=<n> v127=1
<group> amp_veltrack=0 amplitude_oncc131=100 amplitude_curvecc131=99

With <n> adjusted from 1 (no change to curve) to some other number less than 1 to increase the curve? I think I'll give that a go... Looks like I liked it last time I asked :).


I'm adding this so I've got the notes available to Google next time :).

Set up:
- need to make sure Sforzando player volume is at 0dB and pan centred

Code: Select all

<control> set_cc7=127 set_cc10=64
<global> volume_cc7=0 pan_cc10=0

- then, for testing, turn of velocity tracking and ensure amplitude is 100%

Code: Select all

<group> amplitude=100 amp_veltrack=0

I add "volume=3" to the above because in this case I have a mono sample and the stereo output mixes it to -3dB peak if I don't.

Testing now gets me a 0dB reading, as expected, on my loudest sample. Replacing that with the quietest sample gets me -15dB.

Right, I want a drop of three times that. First, I'll add a flat velocity curve to make sure that doesn't break anything.

Code: Select all

<curve> curve_index=99 v1=1 v127=1

and add "amplitude_oncc131=100 amplitude_curvecc131=99" to the group. That seems to do what I'd expect -- nothing :).

Now, I want -30dB at velocity 1. 30 = 5 * 6. 2^5 = 32. 1/32 = 0.03125. So v1=0.03125. Spot on - quietest sample is now at -45dB at velocity 1 and loudest still at 0dB at velocity 127.

Next, I want the peak volume to be -30. I want to remove the volume=3 fix for mono and drop the amplitude (volume opcode not to be used at group level in this mapping). So I'm after -27dB. 27 = 4.5 * 6. 2^4.5 = 22.627417. 100 * 1/22.627417 = 4.42. And again, spot on, loudest sample is now -30dB at velocity 127, quietest is -75dB at velocity 1:

Code: Select all

<curve> curve_index=99 v1=0.03125 v127=1

<group> amplitude=4.42 amp_veltrack=0 amplitude_oncc131=100 amplitude_curvecc131=99
<region> sample=../samples/percussion/pn9tambourine/hnd/hit/pn9tambourine_hnd_hit_001.wav

Return to “SFZ Programming”

Who is online

Users browsing this forum: No registered users and 1 guest