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 sp_TopicIcon
CEnvelopeDetector::detect - misunderstanding - please help
No permission to create posts
November 9, 2018
2:31 pm
Avatar
Pajczur
Member
Members
Forum Posts: 4
Member Since:
February 13, 2018
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.

November 9, 2018
4:49 pm
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
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

November 10, 2018
5:54 pm
Avatar
Pajczur
Member
Members
Forum Posts: 4
Member Since:
February 13, 2018
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.

November 12, 2018
11:40 am
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
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

November 16, 2018
4:10 am
Avatar
Pajczur
Member
Members
Forum Posts: 4
Member Since:
February 13, 2018
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:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 43

Peter: 41

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 527

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 552

Posts: 2168

Newest Members:

Steve Duell, Cal, LamebrainEddy, SteveThackery, rawbirdtoe, Bill, hill william, NAUN_SONAR, sufy, Diane

Moderators: W Pirkle: 261

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 261