Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 539 Bytes
// Volume Trim
//
// Simple volume adjustment between -48 and +48 dBfs for
// non-destructive edits or gain staging between plugins.
//
// author: chokehold
// url: https://github.com/chkhld/jsfx/
// tags: utility gain volume trim
//
desc: Volume Trim
slider1:0<-48,48,0.01> Trim dB
in_pin:left input
in_pin:right input
out_pin:left output
out_pin:right output
@init
function dBToGain (decibels) (10.0 ^ (decibels / 20.0));
@slider
trim = dBToGain(slider1);
@sample
spl0 *= trim;
spl1 *= trim;
You can’t perform that action at this time.