Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 04-23-2014, 05:18 AM   #1
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default Question on the JS: volume utility plug-in

I've got a quick question on the JS: volume utility plug-in:

What is the function of the "max volume" slider?

I've searched on Google but have been unable to find this answer so if there are any Reaper Ninja's with the answer, it would be most appreciated!
;-)
Attached Images
File Type: jpg volume-utility-screenshot.jpg (28.6 KB, 297 views)
siddhu is offline   Reply With Quote
Old 04-23-2014, 05:23 AM   #2
dub3000
Human being with feelings
 
dub3000's Avatar
 
Join Date: Mar 2008
Location: Sydney, Australia
Posts: 3,955
Default

Just checked out the source code.
The max volume setting hard-clips to that level. Which is kinda weird.

Also in the plugin: looks like the plugin smoothly ramps volume changes across an audio block. Weird.
dub3000 is offline   Reply With Quote
Old 04-23-2014, 05:27 AM   #3
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
Default

it works as a very crude limiter, I guess it's a safety measure, since that plug does +150 db!
James HE is offline   Reply With Quote
Old 04-23-2014, 05:34 AM   #4
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

Quote:
Originally Posted by dub3000 View Post
Also in the plugin: looks like the plugin smoothly ramps volume changes across an audio block. Weird.
It's a form of parameter smoothing to keep it from causing "zipper noise" and other artifacts when automating or modulating the volume.

I changed mine so that the volume slider defaults at 0 instead of +6db because it was bothering me. I often use it for cheap easy way of routing signal between different channels.
ashcat_lt is offline   Reply With Quote
Old 04-23-2014, 05:45 AM   #5
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default

Quote:
Originally Posted by James HE View Post
it works as a very crude limiter, I guess it's a safety measure, since that plug does +150 db!
So you basically want to keep the "max volume" well above any boosts that may be done with the volume adjustment - right?

For example, if I'm using the volume adjustment to boost 6db, then set the max volume to 12db.
siddhu is offline   Reply With Quote
Old 04-23-2014, 06:06 AM   #6
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

if the input is above the max value, it will have clipping even if you turn gain down...

increase the max to 100 db and forget about it...
slider2:100<-100,100,1>max volume (dB)

you don't want it to ruin all the floating 64 bit Reaper's audio engine with some hard clipping by this plugin.
heda is offline   Reply With Quote
Old 04-23-2014, 06:58 AM   #7
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default

Quote:
Originally Posted by heda View Post
if the input is above the max value, it will have clipping even if you turn gain down...

increase the max to 100 db and forget about it...
slider2:100<-100,100,1>max volume (dB)

you don't want it to ruin all the floating 64 bit Reaper's audio engine with some hard clipping by this plugin.
You mean directly on the plug-in window or the code?
siddhu is offline   Reply With Quote
Old 04-23-2014, 07:40 AM   #8
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by siddhu View Post
You mean directly on the plug-in window or the code?
oops... installed a new portable installation and now I see that default is slider2:0<-150,150,1>max volume (dB

it was much less when I had the issue... 150 should be enough now... just don't touch the code. Set it at 150 if you don't want clipping and don't touch it. Just use the adjustment first slider.

Use another plugin later for good limiting if needed.
heda is offline   Reply With Quote
Old 04-23-2014, 08:10 AM   #9
EricM
Human being with feelings
 
EricM's Avatar
 
Join Date: Jul 2009
Location: Ljubljana, Slovenia
Posts: 3,801
Default

One of those default things in reaper that just make little sense,
+6 boost and a hard limiter at 0, just no

I've immediately changed mine to -6 dB starting value as I usually
want to attenuate the signal, which also lets me leave the fader
at unity, so I can automate with better precision, as reaper envelopes
tend to become pretty useless below certain range.

Also completely removed the limiter code, which leaves you with
a simple yet useful gain control plug.

Code:
desc: volume adjustment
slider1:-6<-40,24,1>adjustment (dB)

@slider
  adj1=2 ^ (slider1/6); 
  doseek=1;

@block
doseek ? (
  dadj=(adj1-adj1_s)/samplesblock;
  doseek=0;
):(
  dadj=0;
  adj1_s=adj1;
);

@sample
spl0=spl0*adj1_s;
spl1=spl1*adj1_s;
adj1_s+=dadj;
*green color = starting value, *red color = max slider value (for those who are new at coding)

e
__________________
Shoelace 4 Theme | SoundCloud/erXon
EricM is offline   Reply With Quote
Old 04-23-2014, 10:11 AM   #10
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

I changed it too.

Remember to save it with a new name, otherwise it will be overwritten by future Reaper updates.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-23-2014, 10:55 AM   #11
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

Quote:
Originally Posted by siddhu View Post
So you basically want to keep the "max volume" well above any boosts that may be done with the volume adjustment - right?

For example, if I'm using the volume adjustment to boost 6db, then set the max volume to 12db.
Kinda depends on where the original signal is peaking, no? I mean, if it's hitting at -18dbfs, and you add 6db, then the output will peak at -12dbfs, so why would you need to change the limit?
ashcat_lt is offline   Reply With Quote
Old 04-23-2014, 11:27 AM   #12
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default

Quote:
Originally Posted by ashcat_lt View Post
Kinda depends on where the original signal is peaking, no? I mean, if it's hitting at -18dbfs, and you add 6db, then the output will peak at -12dbfs, so why would you need to change the limit?
What your saying makes perfect sense and that's what I was thinking. However as I'm only now just starting to seriously work in Reaper, I want to make sure I don't just use my "assumptions" about how things work, but get it confirmed so I have a deeper understanding of this incredible software.

I've been using Ableton for many years and work using a hybrid setup with lots of analog outboard so the utility tool in Ableton is essential for my way of working. Hence my request for clarifications! ;-)
siddhu is offline   Reply With Quote
Old 04-23-2014, 12:40 PM   #13
Jeffsounds
Human being with feelings
 
Jeffsounds's Avatar
 
Join Date: Feb 2013
Location: Northeast Michigan
Posts: 3,460
Default

Quote:
Originally Posted by DarkStar View Post
I changed it too.

Remember to save it with a new name, otherwise it will be overwritten by future Reaper updates.
I only saw one way to save it (CTRL+S) and it overwrote the original... Where is "Save As?"
__________________
"TV has become nothing more than a Petri dish where this country grows its idiots." -Dr. John Becker
My First CD On Spotify - Side O' The Highway
Jeffsounds is offline   Reply With Quote
Old 04-23-2014, 01:56 PM   #14
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by EricM View Post

Also completely removed the limiter code, which leaves you with
a simple yet useful gain control plug.
thanks. I'll use this for gain control
It is very useful for me to have a gain control as the first fx in the chain to control input level if needed.
heda is offline   Reply With Quote
Old 04-23-2014, 02:19 PM   #15
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default

Quote:
Originally Posted by EricM View Post
One of those default things in reaper that just make little sense,
+6 boost and a hard limiter at 0, just no

I've immediately changed mine to -6 dB starting value as I usually
want to attenuate the signal, which also lets me leave the fader
at unity, so I can automate with better precision, as reaper envelopes
tend to become pretty useless below certain range.

Also completely removed the limiter code, which leaves you with
a simple yet useful gain control plug.

Code:
desc: volume adjustment
slider1:-6<-40,24,1>adjustment (dB)

@slider
  adj1=2 ^ (slider1/6); 
  doseek=1;

@block
doseek ? (
  dadj=(adj1-adj1_s)/samplesblock;
  doseek=0;
):(
  dadj=0;
  adj1_s=adj1;
);

@sample
spl0=spl0*adj1_s;
spl1=spl1*adj1_s;
adj1_s+=dadj;
*green color = starting value, *red color = max slider value (for those who are new at coding)

e
So this code can be copied pasted into the code window (overwriting the original code) to remove the limiter?
siddhu is offline   Reply With Quote
Old 04-23-2014, 02:41 PM   #16
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by siddhu View Post
So this code can be copied pasted into the code window (overwriting the original code) to remove the limiter?
no, better create an empty file called gain or whatever, put it in the effects folder and paste the code in it.
heda is offline   Reply With Quote
Old 04-23-2014, 02:45 PM   #17
siddhu
Human being with feelings
 
siddhu's Avatar
 
Join Date: Apr 2014
Location: Paris
Posts: 58
Default

Quote:
Originally Posted by heda View Post
no, better create an empty file called gain or whatever, put it in the effects folder and paste the code in it.
Wow - that's pretty cool how you can just "create" a plug-in!
siddhu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.