Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Envelope Detector for Limiter in media player
Avatar
Atom7k
Member
Members
November 21, 2019 - 10:07 am
Member Since: August 5, 2016
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi there,

 

I haven't been around a while so if this is the wrong forum for my question I do apologize.

 

I am still new to audio programming and I need some advice.

Currently I am programming an application (for android) which contains a media player and for different reasons a limiter.

That beeing said I'd like to ask wether the attack/relaese time for the detecter could be 0. Since its a simple brickwall limiter it doesn't need to be very good in this first beta.

If these two can be 0 then the envelope would be the current input following the formula from the book? (currEnvelope = attackTime*(lastEnvelope−input) + input;) 

 

I know this sounds a littel odd but I'd like to know what the input exactly is. Since I have to write the media player myself this is very important. I figured it would be an inputstream. But if so what is it like if catching the current input with these algorithm. Is it like every single sample out of the 44.1 khz per second? 

(If this Topic is covered somewhere in the book I may have not seen it, I didn't have the time to read the whole thing yet. I do own the 2012 Edition)

 

If these thoughts were correct isn't there an easier way to implement the limiter? Like ignoring a detector since its the input itself. Computing it from there, letting it pass through the limiter computing and handing the stream to the media player so everything runs in real time?

 

I know its a lot but I am a little confused over all this new stuff

 

Kind regards

 

Tobi (Atom7k)

Avatar
W Pirkle
Admin
December 4, 2019 - 11:10 am
Member Since: January 28, 2017
Forum Posts: 375
sp_UserOfflineSmall Offline

Hi Tobi

My new 2nd Edition of the FX plugin book changes the structure of the detector to be correct for RMS (it was incorrect in the image in the 1st edition book, but correct in the project code) and to add some more functionality. The object is now called AudioDetector and is included in the fxobjects.h file which comes with all new RackAFX projects. You can also download just the fxobjects.h file if you want. This detector always works in LOG mode. 

I also use a simple limiter for squelching the massive amplification at self-oscillation for the Moog and other synth filters. In that case, I use the audio detector with the following:

Detect Mode: PEAK

Log Detect: true

Attack Time: 0.1 mSec

Release Time: 25 mSec

In theory you can use 0.0 for these times, but I like to make them slightly larger to prevent audible clicks or other over-limiting distortion. The times I use above were set for the self-oscillation of the Moog Ladder filter. The threshold of limiting is -0.5 dBFS, so just below the peak of 0.0. I found the settings above successfully limited the oscillation and produces pure sinusoids rather than square waves. In theory, this is a kind of nonlinear amplification and takes the place of waveshapers. 

The input to the detector is the audio stream. For stereo, you need two of them and two limiters attached. And, yes it operates on every sample from the audio input. 

Hope that helps,

Will

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

TheSmile: 43

Peter: 41

clau_ste: 39

JimmyM: 33

Gwen: 32

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 586

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 37

Topics: 607

Posts: 2394

Newest Members:

DanieleR, jimjulian, kbob, jim, Dan, Christian1, StefanHopman, haslo, tomr, Noah

Moderators: W Pirkle: 375

Administrators: Tom: 73, JD Young: 80, Will Pirkle: 0, W Pirkle: 375