Finding a running max | General C++ Topics | Forum

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
Finding a running max
Avatar
Member
Members
July 6, 2016 - 4:48 am
Member Since: July 5, 2016
Forum Posts: 3
sp_UserOfflineSmall Offline

Is there a way to find the maximum output of one of my equations in real time or directly after playback is stopped?

I was attempting to find the highest and lowest envelope detector values but assigning logic to the detector did not work. So I started researching arrays and vectors. I'm not sure if I'm looking in the right place. Could someone point me in the right direction? Thanks in advance.

Avatar
Admin
July 20, 2016 - 8:01 pm
Member Since: January 29, 2017
Forum Posts: 689
sp_UserOfflineSmall Offline

Hi Clyde

You might want to check out the DSP mailing list from Columbia; recently there has been a long thread on just this, finding a running max in the most efficient way.

http://music.columbia.edu/cmc/music-dsp/

- Will

Avatar
Member
Members
July 26, 2016 - 2:58 am
Member Since: July 5, 2016
Forum Posts: 3
sp_UserOfflineSmall Offline

Thanks Will!

I signed up for the list. I was going back over your book and looked into when you first introduced the built in envelope detector. The envelope detector can be set to RMS, MS, and Peak. Would Peak hold the maximum value of the input signal?

Great book. It's helped me a lot.

Avatar
Admin
July 26, 2016 - 6:51 pm
Member Since: January 29, 2017
Forum Posts: 689
sp_UserOfflineSmall Offline

The built in CEnvelopeDetector will not hold the peak value for you, but you could certainly modify it to do that (remember: always subclass the built-in objects located in pluginconstants.h/PlugInObjects.cpp if you want to extend their functionality; do not modify the code in those files, as these files are updated with new functions and bug fixes (if any) in future updates of RackAFX).

You would need a variable to store the peak value and you would also want to reset this value on each call to prepareForPlay() so that your max tracks the current audio program material.

Thanks for the note about the book (feel free to leave a post on amazon.com if you'd like Wink)

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 768

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 842

Posts: 3347

Moderators: W Pirkle: 689