View Single Post
Old 04-03-2019, 04:22 AM   #442
danerius
Human being with feelings
 
Join Date: Oct 2018
Posts: 43
Default

Quote:
Originally Posted by mrelwood View Post
Ok, you're already at a good start! The idea is interesting and I have no idea how it would sound. Let's make this happen!

What the Maximizer does is it writes the current sample value to "buffer[bufpos]". At launch both are at zero, so the memory slot written to is 0+0. Near the end of the code a one is added to "bufpos", so the next sample goes to mem slot 0+1, etc. Once "bufpos" is larger than "bufSize", "bufpos" goes back to zero.

At this point we have as many samples stored as the "bufSize" determines. Now you just average the samples starting from "buffer[0]" to "buffer[bufSize]" and put out the result.

In order for the result not to come out a full "bufSize" too late, the plugin must set the PDC. In the Maximizer the "bufSize" is adjustable, so it is in the "@slider" section.

Let me know if you were able to follow what I wrote and let's find out what kind of assistance you need next.
Hi

I had a shot at demystifing the Zero Maximizer and this is what I came up with. Ive commented at each section with what I presuming its doing + the bit where I have very little idea of whats happening. Needless to say I havent tried running this. Its simply not finished

Thanks and regards /danerius


//The slider sets number of samples to be stored and averaged
//They need to be odd numbers to set a correct midpoint.
slider1:3<1,101,2>LowPass (Number/Samplerate)

in_pin:left input
in_pin:right input
out_pin:left output
out_pin:right output

//"buffer" zeros current memory slot
//"pdc_delay" sets a midpoint for samples to be averaged
//"buOffs" resets the stored samples and restarts the averaging
@slider
buffer = 0;
pdc_delay = slider1 / 2;
bufOffs = bufSize + 1;

//"bufPos" is the input for samples to store. ie the left channel
//The second line here is where I get confused. I copied the bits that looked
//like something that could work. And left out what looked like maximizing related
//bits of the code. But theres no reference to the slider value. So Im more than
//certain it wont work.
@sample
buffer[bufPos] = spl0;
(bufPos += 1) > bufSize ? bufPos = 0 ;

//
danerius is offline   Reply With Quote