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
CEnvelopeDetector::detect - misunderstanding - please help
Avatar
Pajczur
Member
Members
November 9, 2018 - 2:31 pm
Member Since: February 13, 2018
Forum Posts: 4
sp_UserOfflineSmall Offline

Hello,

I am quite new in programming and I found one piece of code that I can't understand. The code is from book:

Will Pirkle - Designing Audio Effect Plug-Ins in C++ With Digital Audio Signal Processing Theory - 2012.pdf

 

there is method to detect envelope, and one line of that method (for RMS detection) is:

`fInput = pow((float)fabs(fInput) * (float)fabs(fInput), (float)0.5);`

 

So this is actually something like: (x*x)^0.5

So it's just `x`.

 

So in my opinion it doesn't make a sense, because it's exactly the same as:

`fInput = (float)fabs(fInput);`

 

Where I am wrong? Please help me, I try to figure it out for 2 days and can't find the answer.

Avatar
W Pirkle
Admin
November 9, 2018 - 4:49 pm
Member Since: January 29, 2017
Forum Posts: 325
sp_UserOfflineSmall Offline

First I'd like to know where you got your PDF version of the book?

How much did you pay for it?

Let me know and I'll tell you the answer to your question.

- Will Pirkle

Avatar
Pajczur
Member
Members
November 10, 2018 - 5:54 pm
Member Since: February 13, 2018
Forum Posts: 4
sp_UserOfflineSmall Offline

Hello Will.

Do you really asking me that? 🙂

If I say I stolen. Would you believe me? 🙂 Maybe I am joking.

 

Actually I don't have your book. I was looking in the google about Lagrange interpolation. And in some way I found that:

https://github.com/sethhochberg/SpaceyDelayer/blob/master/pluginconstants.h

 

And there is method `inline double lagrpol(double* x, double* y, int n, double xbar)`

I was looking further and when I pasted in the google that:

inline double lagrpol(double* x, double* y, int n, double xbar)

 

I found that:

https://books.google.pl/books?id=QddcxHLavrMC&pg=PA484&lpg=PA484&dq=calcCompressorGain(&source=bl&ots=NqtvzgB0pa&sig=jACpP0AfxeOlmLS-CrMDrwIV7MQ&hl=en&sa=X&ved=2ahUKEwj1up_Z8sreAhUBpCwKHbUiBvkQ6AEwAHoECAUQAQ#v=onepage&q=calcCompressorGain(&f=false

 

Sorry for that, it's not my fault I found that. I use JUCE framework for audio programming. But sometimes you digging in the internet and bam, you are on the side you shouldn't be. 

But if it's problem for you I will never back to that forum until I buy your book (maybe some time I will buy it, I've seen there some interesting subjects).

Actually I've already found the solution for my "audio dynamic processing" questions on other forum.

Avatar
W Pirkle
Admin
November 12, 2018 - 11:40 am
Member Since: January 29, 2017
Forum Posts: 325
sp_UserOfflineSmall Offline

The CEnvelopeDetector block diagram and code are incorrect in the 1st edition of the FX book. 

The RMS (square root) block was in the wrong location. If you check the CEnvelopeDetector code in pluginconstants.h you can see that the square root has been moved within the code. 

Yes, having my book copied and stolen by thousands of people does not make me feel like writing any more books in the future... I don't think that people understand this (note that this website, and RackAFX are free from advertisements - who do you think has to pay for this?)

- Will Pirkle

Avatar
Pajczur
Member
Members
November 16, 2018 - 4:10 am
Member Since: February 13, 2018
Forum Posts: 4
sp_UserOfflineSmall Offline

Hello, great thanks for your reply.

Yes I'm not real creator who sell his work, so I really don't understand your point of view - of course I know what you mean, but don't know all details regarding to that subject.

But I understand your pain. I would like to help you in any way, but don't know how. I will promise that if I find again somewhere your book I will report it to you.

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

JimmyM: 32

Gwen: 32

TheSmile: 30

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 558

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 36

Topics: 568

Posts: 2280

Newest Members:

Ray C., Jon R., Pat, Jan, Ben_1, shane, teknojunque, David Richter, Nick45, EEkros

Moderators: W Pirkle: 325

Administrators: Tom: 69, JD Young: 80, Will Pirkle: 0, W Pirkle: 325