Hi Julius, Thanks for clearing that up! Is this a common optimization, or did you come up with it yourself? Was it tested/compared?
I'm looking forward to your feedback once you try the MBC. Greetings, Bart. studio magnetophon Bart Brouns Biesenwal 3 6211 GZ Maastricht 0031-6-22919561 [email protected] www.magnetophon.nl On 10 mrt. 2014, at 20:53, Julius Smith <[email protected]> wrote: > Greetings, > > Regarding: > > At 05:04 PM 3/6/2014, Bart Brouns wrote: >> 6) It's probably my ignorance, but the stereo compressor in effect.lib >> seems oddly implemented to me: >> compressor_stereo(ratio,thresh,att,rel,x,y) = cgm*x, cgm*y with { >> cgm = compression_gain_mono(ratio,thresh,att,rel,abs(x)+abs(y)); >> }; >> I would expect: >> cgm = >> min(compression_gain_mono(ratio,thresh,att,rel,x),compression_gain_mono(ratio,thresh,att,rel,y)); >> >> Are these equivalent? Is it an optimization? Am I nitpicking? > > I would say "optimization". The gain computation is relatively expensive > since it involves log and pow. The use of 'abs(x)+abs(y)' as the combined > input signal is based on the fact that the gain computation is based on an > amplitude-follower that works on the absolute value of the input signal. It > could also be max(abs(x),abs(y)), depending on the underlying goal and > assumptions, which would normally be equivalent to what you like since the > larger signal will control the gain computation and generate the smaller gain. > > I look forward to trying out your multichannel compressor the next time I'm > in a context that can use it. > > - Julius > > At 05:04 PM 3/6/2014, Bart Brouns wrote: >> Hello Fellow Faustians, >> >> First of all many thanks to the developers and documentation writers: >> due to their efforts, I was able to quickly write a plugin I had been >> dreaming about for years, while getting my first taste of functional >> programming. >> >> Here is a simplified version, to explain what I did: >> http://magnetophon.nl/sounds/magnetophon/Faust/MultiBusComp/MultiBusComp.four_mono_compressors-svg/process.svg >> The feedback loop goes into the side-chain of the compressor. >> >> This can be used in mixing and stem-mastering. >> Normally, when you put a limiter on the master output, the signal with >> the most energy (usually bass frequencies) will 'push away' all other >> signals. With this plugin -YOU- decide who wins the fight for the master >> bus. >> >> For more explanation and a usage example, see the attached .dsp file. >> >> Making a stereo version was a challenge and a version with an arbitrary >> number of channels per compressor even more so. Adding metering was near >> impossible for me. >> >> I probably went about the routing and metering functions the wrong way; >> I was hoping that by avoiding variables, I would get a block diagrams as >> easily readable as the mono version. >> >> Here is the full version, same as the the attachment: >> http://magnetophon.nl/sounds/magnetophon/Faust/MultiBusComp/MultiBusComp.eight-stereo-compressors-svg/process.svg >> >> >> I have the following questions: >> >> 1) Is there a better way to create the routing from the first link, but >> generalized to an arbitrary number of compressors and channels per >> compressor, as in the second link? Preferably one that produces a >> readable block diagram. >> What I did is depicted here: >> http://magnetophon.nl/sounds/magnetophon/Faust/MultiBusComp/MultiBusComp.eight-stereo-compressors-svg/MultiRouting-0xaadaae8.svg >> (line 129-159 of the attachment) >> >> 2) Would it be possible to change Faust so that "par(i,0,something)" >> works? If not, why, and is there a workaround? >> >> 3) Would it be possible to make a function similar to "attach" but with >> one input and no output, so you could tell the compiler to not optimize >> out something without having to make convoluted routings? >> >> 4) I can't figure out how to implement a meter for total gain reduction, >> generalized for any number of compressors and channels per compressor. >> In pseudo-code it is as simple as: >> add all input-signals, >> get that signals envelope, >> subtract it from the output-envelope, >> display value. >> In faust it gets very difficult (for me at least), because of the need >> for "attach" combined with the particular routing I need. >> >> 5) Are feedback loops always one sample, no matter how many calculations >> are done within it? Obviously excluding explicit delays... >> >> 6) It's probably my ignorance, but the stereo compressor in effect.lib >> seems oddly implemented to me: >> compressor_stereo(ratio,thresh,att,rel,x,y) = cgm*x, cgm*y with { >> cgm = compression_gain_mono(ratio,thresh,att,rel,abs(x)+abs(y)); >> }; >> I would expect: >> cgm = >> min(compression_gain_mono(ratio,thresh,att,rel,x),compression_gain_mono(ratio,thresh,att,rel,y)); >> >> Are these equivalent? Is it an optimization? Am I nitpicking? >> >> 7) Is there a better way to implement gaincomp_multi(Nr), line 92-112 >> >> 8) Up to 85 stereo compressors works, but 86 gives "Invalid Faust Code". >> Why is that? (line 49) >> >> >> Thanks for your attention, and enjoy MultiBusComp. >> >> Bart. >> >> >> >> ------------------------------------------------------------------------------ >> Subversion Kills Productivity. Get off Subversion & Make the Move to >> Perforce. >> With Perforce, you get hassle-free workflows. Merge that actually works. >> Faster operations. Version large binaries. Built-in WAN optimization and the >> freedom to use Git, Perforce or both. Make the move to Perforce. >> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk >> _______________________________________________ >> Faudiostream-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/faudiostream-users > > > Julius O. Smith III <[email protected]> > Professor of Music and, by courtesy, Electrical Engineering > CCRMA, Stanford University > http://ccrma.stanford.edu/~jos/ ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users
