Old 01-29-2018, 09:23 AM   #81
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by mschnell View Post
Hmm. I did not yet look into the code, but I suppose the analyzer should include a gain control that works in a way that the average gain of the EQ filters is zero. OTOH I don't understand why the algorithm would tend to add gain, if the reference spectrum is taken in the same way as the target spectrum. In fact the GEQ parameters are just the (logarithmic) differences of the two and hence zero for identical signals.
Hi Michael, I think every test I've made, the SM added gain. Keep in mind, when using songs for source and target, they are usually fairly hot, around -1.0dB or more. So it doesn't take much to put the results over zero.

of course if there are more filters adding then there are subtracting, I think all EQs will add to the level. unless they have "makeup gain".
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 01-29-2018, 01:50 PM   #82
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

It's bad habit of the users (including myself) to set EQs in a way that they add (average) gain. For best results, they should be set not to.
Obviously an automatic EQ should know better.
Of course the max gain might increase, anyway.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-29-2018 at 11:03 PM.
mschnell is offline   Reply With Quote
Old 01-29-2018, 02:36 PM   #83
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
One thing I know we definitely need is an output control, so far SM nearly always adds gain and we need to be able to adjust that.
Done! I've added a gain control to the main page (only works if you have correction active):



Existing projects should work fine (it defaults to 0dB) but existing presets won't update the gain value (it will stay as whatever it was before) because it's a new slider. You can double-click to return it to 0dB, though.

Quote:
Originally Posted by mschnell View Post
Obviously an automatic EQ should know better.
So, I considered this - however, for a lot of use-cases I think you don't want it to automatically reduce the gain.

Also, it's not actually clear from the correction curve what "zero overall gain" would be - for example, if the curve is cutting everything below 1kHz and boosting everything above it, that will be an overall cut if your input is low rumbles, but an overall boost if your input is birdsong.

We could figure this out, but with this gain control it's hopefully easy enough to dial it in by hand.
geraintluff is offline   Reply With Quote
Old 01-29-2018, 04:44 PM   #84
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by geraintluff View Post
Done! I've added a gain control to the main page (only works if you have correction active):
Great geraintluff, so it can only work after you've hit "Correction"? Is there any way it can work after it's been frozen with "Freeze". If not, during Correction will still be a step ahead,

Quote:
Existing projects should work fine (it defaults to 0dB) but existing presets won't update the gain value (it will stay as whatever it was before) because it's a new slider. You can double-click to return it to 0dB, though.
Aah, so it's a slider that you put a knob image on. I do that in Kontakt scripting too, because in Kontakt, it's the only way you can use custom knobs.

May I ask where you get your knobs? I've been using JKnobMan to make my knobs, it's great for doing that.

Quote:
We could figure this out, but with this gain control it's hopefully easy enough to dial it in by hand.
Yes I would actually prefer to do it manually.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 01-29-2018, 07:53 PM   #85
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
Great geraintluff, so it can only work after you've hit "Correction"? Is there any way it can work after it's been frozen with "Freeze". If not, during Correction will still be a step ahead,
It should work when the correction's been frozen, yeah. It will just not have any affect if you've just hit "reset".

Quote:
Originally Posted by Tod View Post
May I ask where you get your knobs? I've been using JKnobMan to make my knobs, it's great for doing that.
It's not an image, it draws it using a few different circles and arcs. It's one of the themes for a UI library that I wrote (originally for PadSynth). I haven't added support for custom dial/slider images, but one day...
geraintluff is offline   Reply With Quote
Old 02-05-2018, 10:37 AM   #86
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by geraintluff View Post
It should work when the correction's been frozen, yeah. It will just not have any affect if you've just hit "reset"..
Hi geraintluff, and thankyou, the Gain adjustment works quite well.

Is there a chance you could give me the center frequencies for each filter when there's 30 of them at .33 bandwidth selected?
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-05-2018, 11:49 AM   #87
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
Is there a chance you could give me the center frequencies for each filter when there's 30 of them at .33 bandwidth selected?
For the detection: https://gist.github.com/anonymous/86...bfb54bd7b298e4

The correction is done differently, as a stack of high-shelf filters: https://gist.github.com/anonymous/a6...fda6b5a2ad337c
geraintluff is offline   Reply With Quote
Old 02-05-2018, 01:18 PM   #88
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by geraintluff View Post
For the detection: https://gist.github.com/anonymous/86...bfb54bd7b298e4

The correction is done differently, as a stack of high-shelf filters: https://gist.github.com/anonymous/a6...fda6b5a2ad337c
Okay thanks geraintluff, got it. I've done quite a bit of experimenting and been collecting profiles. I've found it's really important to have the right profile.

Thanks again, and I'm excited to see how all this turns out, I'll be willing to help with what I can do.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-09-2018, 11:21 AM   #89
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 63
Default

Apologies earlier thread drift if it were excessively excessive. Some sub-topics of room correction vs somewhat-related sub-topics about song/track spectrum matching?

My usual wild guessing-- Though auto-room correction "done right" would be a non-trivial task-- Song/Track spectrum matching "done right" just looks like a tougher problem.

To my limited knowledge there have been some non-trivial efforts related tio song/track sprectrum matching but have not studied on it. For example the program har-bal-- https://www.har-bal.com/ I read the manual in the past but never tested the software. Some folks like it, some do not. As with most thangs I suppose.

Simple thought experiment-- We create or otherwise acquire a simple tasty little jazz melody+chords solo song arrangement. Mark the score legato and then record three different tracks of this exact same arrangemen. Each track is played note-for-note identical--
Track 1: Excellent performance on a premium-quality Banjo
Track 2: Same legato performance on Pedal Steel Guitar
Track 3: Same performance on Soft-Hammer Vibes

Attempting to apply a static track x spectrum to some other track y, some combinations might "almost work". Possibly apply the Soft-Hammer Vibes spectrum to the Banjo or Steel Guitar track. Would the sound more-resemble "weird EQ" rather than spectrum matching? Dunno.

But perhaps disappointing to apply the Banjo or Steel Guitar static spectrum to the Vibes track. The Vibes track may not contain enough high harmonics to match the Banjo spectrum even with extreme EQ boosting.

Track/Song spectral matching perhaps most successful applying spectrums of similar songs or tracks. The spectrum of an Eagles country rock song perhaps most-successful applied to some other country-rock arrangement with similar instrumentation and playing style. Apply the Eagles spectrum to a classical string quartet or an electronic dance mix perhaps less successful.

An idea I played with some years ago but never had time to try to perfect, would analyze in "two dimensions", applying the analysis via a multi-band dynamic EQ rather than a static EQ applied to the entire target song. Perhaps a little more-successful for spectral matching but I wouldn't expect fabulous results except by occasional happy accident.

Thusly-- I suspect dynamic EQ of fewer bands would promise better success than numerous bands or the hundreds of bands in an FFT analysis, but it is a wild guess.

For analyzing the source and destination songs, for sake of example perhaps we decide to try 10 one-octave bands, though maybe more bands could work just as good or better. We analyze the song and create an amplitude histogram of each band. Pick some time window for each measurement and possibly overlap the time windows. Maybe 100 ms time windows, with 50 percent overlap? Or maybe some other window size would be better.

After analysis, maybe we sort each band's histogram into a 1 dB sized table-- Maybe we find that the 1 kHz band of song A spends 10 percent of the time at -12 dB and 5 percent of the time at -13 dB, etc. All of the 1 dB sized bin percentages adding to 100 percent of course.

But the 1 kHz band of song B spends 15 percent of the time at -12 dB and 9 percent of the time at -13 dB, etc.

So we could use the histogram differences between Song A and B to create dynamic EQ settings for the 1 kHz band which would cause Song B to match the amplitude histogram of Song A. So each adjustment band would get different dynamic EQ threshold and ratio settings, whatever are necessary to enforce the source band histogram onto the target.

Years ago I did some dynamics processors which presented to the user typical threshold and ratio knobs, but the actual processing was done via a "gain mapping table". IIRC my gain table lookup was interpolated within a table 32 gain settings for each 6 dB span, For input range of -96 to +24 dB, that would be about 640 gain table entries. It was done that way to exploit "at that time" fast float-to-integer bit-mangling to locate the correct table entry index "pretty quick". I've read that nowadays on faster CPUs that low-level approximation float/int bit-mangling tricks can tend to be slower than doing it "the right way". But anyway something like 32 gain table entries for each 6 dB dynamic range seems fine enough to smoothly interpolate between the entries for a smooth dynamic range mapping.

So if the user interface has knobs for threshold and ratio, when the user changes a knob it just fires a loop that fills out 640 entries in the gain-mapping table, and then during processing the dynamic processor just measures envelope amplitude and interpolates within the table to decide what gain to apply, sample-by-sample. So you could have "rather complicated" gain-curve rules in filling out the gain table, because the compressor doesn't have to solve those complicated rules calculating gain for each sample. It just follows the complicated math 640 times to write the gain curve into that gain array.

I'm just saying, if a gain-table approach is used in the multi-band dynamic EQ for the gain calculations, then we probably don't have to go thru a bunch of brain damage writing code to turn an A/B amplitude histogram into complicated multiple threshold and ratio rules to run each band of the dynamic EQ.

We can probably use fairly simple mapping code to fill out each band's gain table so that for instance the target's 15 percent of the time at -12 dB (at 1 kHz) would get gain mapped to result in the source's 10 percent of the time at -12 dB (at 1 kHz).

With such "two-dimensional" dynamic spectrum matching, PERHAPS we could more-successfully force some generic "eagles-type country rock mix" to sound closer to a source Eagles song template? Though it probably still would fail miserably applying the Eagles template to a string quartet or funk tune.

In the earlier thought experiment of the exact same solo arrangement recorded on Banjo, Steel Guitar and Vibes-- Possibly applying the Banjo two-dimensional amplitude histogram to the Steel Guitar or Vibes would at least make the Steel or Vibes a little more percussive and "banjo-ey" in timble. And possibly applying the Steel Guitar spectral histogram to the Banjo would make the Banjo track have more sustain and less percussion, and an overall spectrum more similar to the Steel Guitar average spectrum?

The Steel Guitar would be more legato and brighter than the VIbes, so possibly this method would add sustain and brighten up the Vibes track's timbre, though maybe the VIbes wouldn't have sufficient high harmonics to make a proper spectral match even with extreme settings.

Applying the Vibes histogram to the Steel Guitar would probably darken the Steel Guitar track and cut its sustain a bit, making it maybe a little closer to the nature of vibes. Of course it would still sound like steel guitar and not vibes, so far as I could guess.
jcjr is offline   Reply With Quote
Old 02-09-2018, 12:32 PM   #90
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by jcjr View Post
Apologies earlier thread drift if it were excessively excessive. Some sub-topics of room correction vs somewhat-related sub-topics about song/track spectrum matching?

My usual wild guessing-- Though auto-room correction "done right" would be a non-trivial task-- Song/Track spectrum matching "done right" just looks like a tougher problem.
Aww yiss. This is absolutely my jam.

So firstly: Spectrum Matcher does in fact aim to detect something closer to the perceived spectrum, rather than total energy. It is in fact my... fifth sustained attempt? It's a problem I've kept coming back to for several years now. That doesn't mean I'm an expert though - Spectrum Matcher was the first one that performed well enough to publish.

Taking the idea that perceived loudness is neither peak nor RMS but somewhere in between, Spectrum Matcher takes a 50ms moving average, and then a weird weighted average of those (see the earlier explanation of "peak bias").

My original idea was actually to use it as a quick-hack mixing tool - so it should be able to take a reference track (e.g. all the non-lead instrumental tracks in a mix) and suggest an EQ so that the input track sat in the same place in the mix. So first you match any instruments that have exact references (e.g. piano to piano, snare to snare) and match, then group them together (e.g. drum kit to drum kit, bass to bass) and match, and then match the final master.

I haven't done proper experiments on this, but it behaved OK-ish for how I was using it. I think I might want to turn down the peak-bias from 4 (to maybe 2 or 3), but that's still mostly guesswork.

Quote:
Originally Posted by jcjr View Post
Thusly-- I suspect dynamic EQ of fewer bands would promise better success than numerous bands or the hundreds of bands in an FFT analysis, but it is a wild guess.
1/3 octave is (very broadly speaking) the resolution you need for timbre. It's the bandwidth of the "critical bands" of the ear (and also confirmed by experiments - I think? I read a paper years ago and never found it again).

Quote:
Originally Posted by jcjr View Post
We analyze the song and create an amplitude histogram of each band. Pick some time window for each measurement and possibly overlap the time windows. Maybe 100 ms time windows, with 50 percent overlap? Or maybe some other window size would be better.

[...]

So we could use the histogram differences between Song A and B to create dynamic EQ settings for the 1 kHz band which would cause Song B to match the amplitude histogram of Song A. So each adjustment band would get different dynamic EQ threshold and ratio settings, whatever are necessary to enforce the source band histogram onto the target.

Years ago I did some dynamics processors which presented to the user typical threshold and ratio knobs, but the actual processing was done via a "gain mapping table". IIRC my gain table lookup was interpolated within a table 32 gain settings for each 6 dB span, For input range of -96 to +24 dB, that would be about 640 gain table entries. It was done that way to exploit "at that time" fast float-to-integer bit-mangling to locate the correct table entry index "pretty quick". I've read that nowadays on faster CPUs that low-level approximation float/int bit-mangling tricks can tend to be slower than doing it "the right way". But anyway something like 32 gain table entries for each 6 dB dynamic range seems fine enough to smoothly interpolate between the entries for a smooth dynamic range mapping.

[...]

Years ago I did some dynamics processors which presented to the user typical threshold and ratio knobs, but the actual processing was done via a "gain mapping table".
Oh man! OK, so I'm definitely not claiming that just because I couldn't make it work, it's impossible. However, I can at least note the problems I ran into.

I tried this kind of gain-mapping table a couple of iterations ago, before I decided to abandon dynamics processing and sort the spectrum independently.

The main problem I ran into was that if you followed this curve too tightly, it sounded unnatural and choppy. However, if you followed it with attack and release, you didn't actually reconstruct the target histogram because it was never quite the correct gain value.

Quote:
Originally Posted by jcjr View Post
Applying the Vibes histogram to the Steel Guitar would probably darken the Steel Guitar track and cut its sustain a bit, making it maybe a little closer to the nature of vibes. Of course it would still sound like steel guitar and not vibes, so far as I could guess.
So, even though it sounded slightly weird for speech, the gain-table approach worked OK on plucked instruments like this. However, it wasn't great on inputs with multiple instruments, because it was adjusting sections of the spectrum for both instruments to correct for just one.

I decided to try correcting dynamics separately from spectrum. The best results I got were from iteratively learning a compressor (on the full-band audio). However I was still attempting to learn a side-chain EQ to feed into this compressor.

If I were to approach it again, I would reduce the problem space further by applying a spectrum match first, then using a compressor with a fixed side-chain EQ (A-weighting maybe?), then a final spectrum match.

Anyway - this is not to say that you shouldn't try any of this stuff, you might implement them better than I did. Your goals might be different from mine as well, which leads to different decisions as well as different success criteria.
geraintluff is offline   Reply With Quote
Old 02-09-2018, 02:28 PM   #91
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by jcjr View Post
Thusly-- I suspect dynamic EQ of fewer bands would promise better success than numerous bands or the hundreds of bands in an FFT analysis, but it is a wild guess.
That's what I think too, which is why I'm using an approach that minimizes the bands by having greater
control over Bandwidth. Right now I'm pretty happy with what I'm getting using Spectrum Matcher.

I've put a pdf together that attempts to explain what and how I'm doing this. Using pink noise makes it
so much easier to adjust ReaEQ which is what I'm using. I'm trying to use fewer band tabs as well as
keep the bands from overlapping as much as possible.

https://stash.reaper.fm/32900/Master...ofiles%201.pdf

I've been experimenting a lot with all this and come up with some definite does and don't. For example,
I'm not just EQing one song based on another, that doesn't work very well. What happens is that the source
song might have a lot of high frequency content that's not at all representative of the real profile of the song.

A word to you about why I'm doing all this. I've been a working audio engineer since the early 1970s, I started
recording in the mid 60s. I'm going on 75 of age and my hearing has decreased radically on the high end. And
even though I'm retired, I've still got clients that like what I can do for them, basically produce their songs. So I'm
using any method I can find to figure out where I am with any given song.

Useing Spectrum Matcher is the best tool I've been able to find to do this.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-10-2018, 10:27 AM   #92
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 63
Default

Quote:
Originally Posted by geraintluff View Post
1/3 octave is (very broadly speaking) the resolution you need for timbre. It's the bandwidth of the "critical bands" of the ear (and also confirmed by experiments - I think? I read a paper years ago and never found it again).
Thanks geraintluff. I don't know much about the topic but it is interesting.

Yes I think "in the ballpark" of 1/3 octave at least in the mids. Here are some critical band links--
https://ccrma.stanford.edu/~jos/bbt/...ncy_Scale.html

https://ccrma.stanford.edu/~jos/bbt/...Bandwidth.html

It has to do with masking phenomena, but a "full mix" of a multi-track song seems to me possibly a big huge masking jigsaw puzzle. The guitarist wants to hear more guitar in the mix, but too much guitar masks the synth pad or piano, so then the keyboardist wants to hear more keys, but that masks the guitar, etc.

The masking effects versus "monophonic note amplitude perception" confuse me, especially in the lowest octaves. I don't doubt that the lowest critical band is probably an octave or wider in "masking effect" but on the other hand if an electric bass pickup is messed up so that some notes are lots louder than others, or other room or recording defects causes jagged bass response-- Maybe low E is too loud and then F# above low E is too quiet or whatever, the ear easily hears some notes booming forward and some notes dropping out, much narrower than that octave-wide bass critical bandwidth.

Implemented as a dynamic EQ, perhaps third-octave over the entire audio band, or perhaps something closer to the Bark or ERB scale would work good. The Q of a third-octave filter is getting big enough that one might worry about excessive time-ringing if the EQ were real extreme.

It was so long ago when I was fooling with the multi-band spectrum matching, so far as I recall there were not many or any dynamic EQ plugins. When I was thinking about it back then was thinking of implementation via multi-band compressor. For instance even an octave-wide 10 way crossover split with 4th order or even 8th order linkwitz riley crossovers has absolutely scarey cumulative phase shift from lows thru highs, and even with 4th or 8th order crossovers there would be rather heavy overlap between adjacent bands. So much overlap that maybe you wouldn't be able to cut the gain of just one of the octave-wide crossover bands more than a few dB, because of ordinary band leakage "filling the hole" from the adjacent crossover bands above and below the band we are trying to compress.

So back then it looked like, with multi-band compressor/expander, maybe 3 to 5 bands would be more realistic/workable than 10 or 30 bands.

But dynamic EQ would follow different rules and maybe third-octave or narrower would work fine implemented as dynamic EQ.

Quote:
Originally Posted by geraintluff View Post
Oh man! OK, so I'm definitely not claiming that just because I couldn't make it work, it's impossible. However, I can at least note the problems I ran into.

I tried this kind of gain-mapping table a couple of iterations ago, before I decided to abandon dynamics processing and sort the spectrum independently.

The main problem I ran into was that if you followed this curve too tightly, it sounded unnatural and choppy. However, if you followed it with attack and release, you didn't actually reconstruct the target histogram because it was never quite the correct gain value.
Maybe it could work "fairly smooth" if one uses the exact same envelope code and time constants for both the histogram measurement pass, and also the processing pass?

I'm naturally pessimistic and do not expect much of anything to work excellently. Seems an accomplishment if something can even be made good enough so that it doesn't completely suck. Maybe a smooth enough envelope detector for measurement and processing, on this kind of task, could be an FIR smoothing with the "real time" in the center of the span? Maybe gaussian smoothing over 100 ms or whatever, with 50 ms lookahead and 50 ms lookbehind? Maybe that could be smooth enough not to suck, but still be somewhat effective in mapping dynamics of a frequency band? Dunno.
jcjr is offline   Reply With Quote
Old 02-10-2018, 11:01 AM   #93
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 21,375
Default

Quote:
It has to do with masking phenomena, but a "full mix" of a multi-track song seems to me possibly a big huge masking jigsaw puzzle. The guitarist wants to hear more guitar in the mix, but too much guitar masks the synth pad or piano, so then the keyboardist wants to hear more keys, but that masks the guitar, etc.
Just off-topic noting this is often a composition/arrangement problem and more rarely a mix problem. If that's what the mixer receives, that's what they deal with but at the end of the day nothing sounds better than when each instrument supports the others in such away that such EQ fixes after the fact are bare minimum, otherwise "mixing becomes fixing" aka a repair job. IOW, I cringe when I hear the term "carve out space" when you shouldn't be in my yard to begin with.
karbomusic is online now   Reply With Quote
Old 02-10-2018, 12:28 PM   #94
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

Quote:
Originally Posted by jcjr View Post
It has to do with masking phenomena ...
That is why my suggestion for a final release would be to (automatically) transfer the (smoothed) frequency response of the band filter set to a ReaEQ. (Tod did this manually, seemingly very successfully.)

(Or did I get your argument wrong ? )

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 02-10-2018, 02:16 PM   #95
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by jcjr View Post
It has to do with masking phenomena, but a "full mix" of a multi-track song seems to me possibly a big huge masking jigsaw puzzle.
Whether you call "masking" or "frequency content that distorts the profile", simply using the profile of one song to apply EQ to another song does not work very well. That's why I said this:
Quote:
I've been experimenting a lot with all this and come up with some definite does and don't. For example,
I'm not just EQing one song based on another, that doesn't work very well. What happens is that the source
song might have a lot of high frequency content that's not at all representative of the real profile of the song.
So what I've been doing is using they song profiles to help me EQ the various tracks I have in my mix. There's to much to it for me to explain it all right now, I would need time to do that.

Here's a picture that might help to understand what I'm doing with the pink noise. You can see that the regular freq spectrum is rather difficult to EQ, especially getting the bandwidth set properly. By adding pink noise it smooths out considerably, making it much easier to apply EQ. If you get the bandwidths set properly it takes less bands and the bands overlap very little.

__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-12-2018, 10:02 AM   #96
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 63
Default

Quote:
Originally Posted by karbomusic View Post
Just off-topic noting this is often a composition/arrangement problem and more rarely a mix problem. If that's what the mixer receives, that's what they deal with but at the end of the day nothing sounds better than when each instrument supports the others in such away that such EQ fixes after the fact are bare minimum, otherwise "mixing becomes fixing" aka a repair job. IOW, I cringe when I hear the term "carve out space" when you shouldn't be in my yard to begin with.
Thanks karbomusic. I agree completely. A good arrangement should be easier to mix.

Arranging requires good musical imagination-- Quickest done if the arranger can hear the thing in his head before it is ever charted or recorded. Given limitations in musical imagination, mistakes have to wait to be weeded out later on after tracks have been laid. Perhaps the first fix would be to judiciously cut/edit tracks before mixing begins, to make it easier.

Excellent musicians can have good enough sense to work together and keep it simple and leave holes for others to fill. Kind of "organic on-the-fly arranging" that can work well with musicians good enough who can work together. Perhaps easiest done with as much ensemble recording possible, record the entire rhythm section in real time or whatever. Doing it piecemeal a track at a time, requires the arranger's musical imagination to leave holes for parts which are not yet recorded.
jcjr is offline   Reply With Quote
Old 02-12-2018, 02:25 PM   #97
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Hi geraintluff, you told me to let you know when I had some ideas for Spectrum Matcher and I've got a couple of small things.

1> When the "Learn" button is pushed, it would be nice if the window was automatically reset. Not to get rid of the "Reset" button, that should still remain.

2> Once you've got the profile and click on "Save", it should go back automatically without hitting the "Back" button. However, here again it might be good to leave the "Back" button in case you accidentally click on the "Learn" without intending to do so.

These are two small things, but when your using the mouse 8+ hours a day, these little things add up.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-14-2018, 02:40 PM   #98
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
1> When the "Learn" button is pushed, it would be nice if the window was automatically reset. Not to get rid of the "Reset" button, that should still remain.
I thought about this one, but have decided not to - when I'm using this effect I sometimes find it's useful to quickly switch into the Learn pane and save the existing analysis. I appreciate that this means an extra click for you, but the current setup is more flexible.

Quote:
Originally Posted by Tod View Post
2> Once you've got the profile and click on "Save", it should go back automatically without hitting the "Back" button. However, here again it might be good to leave the "Back" button in case you accidentally click on the "Learn" without intending to do so.
Done, released in latest version (v1.3.3)

I have also completely rewritten the filtering sections - it should produce identical results, and work with existing projects and presets, but let me know if something doesn't work right.
geraintluff is offline   Reply With Quote
Old 02-15-2018, 10:29 AM   #99
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by geraintluff View Post
Done, released in latest version (v1.3.3)

I have also completely rewritten the filtering sections - it should produce identical results, and work with existing projects and presets, but let me know if something doesn't work right.
Thanks much geraintluff, that was the most important one.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-19-2018, 10:15 AM   #100
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Hi again geraintluff, I've got a question about how this works in the "Learn" mode.

I assume each filter position continually upgrades to the highest level it encounters? But does each filter maintain that highest level throughout the learn process? Or do they continually go up and down, fluctuate, with each level it encounters?

I assume it's maintaining the highest level it encounters.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-19-2018, 11:10 AM   #101
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
Hi again geraintluff, I've got a question about how this works in the "Learn" mode.

I assume each filter position continually upgrades to the highest level it encounters? But does each filter maintain that highest level throughout the learn process? Or do they continually go up and down, fluctuate, with each level it encounters?

I assume it's maintaining the highest level it encounters.
The analysis in Learn mode is the same as the analysis in normal mode.

It's not quite a peak calculation. For a peak-bias of 4, the actual equation is:

Code:
( average of (S^4) )^0.25
where S is the short-term energy average, an exponential moving average over 40ms.

So, this calculation will be more affected by peaks (on a 40ms-scale), but it's not a literal maximum. When comparing two sustained, consistent sounds (like pink-noise), the exact subtleties of the averaging method shouldn't make a difference.

I'd actually like to change the averaging mechanism (or have options for different ones), but I'd need to do it carefully to preserve backwards-compatibility.

Last edited by geraintluff; 02-19-2018 at 10:21 PM.
geraintluff is offline   Reply With Quote
Old 02-19-2018, 06:02 PM   #102
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Quote:
Originally Posted by geraintluff View Post
The analysis in Learn mode is the same as the analysis in normal mode.

It's not quite a peak calculation. For a peak-bias of 4, the actual equation is:

Code:
( average of (S^4) )^0.25
where S is the short-term energy average, an exponential moving average over 40ms.

So, this calculation will be more affected by peaks (on a 40ms-scale), but it's not a literal maximum. When comparing two sustained, consistent sounds (like pink-noise), the exact subtleties of the averaging method shouldn't make a difference.

I'd actually like to change the averaging mechanism (or add it as an option), but I'd need to do it carefully to preserve backwards-compatibility.
Thanks geraintluff, I understand. Also I noticed that when a correction is made, another knob shows up, called "Bands" and indicates the number of bands (filters) that were used. I haven't messed with it, but can that be changed, and if so what should I expect? It's kind of after the fact, so I was just wondering.

I also gotta tell you geraintluff, this little JS plugin has been extremely beneficial to me, I'm not sure if anybody else really understands what I'm doing with it, using the pink noise, but it's given me the means to confidently EQ my tracks as well as the final mixes, even with my significant hearing loss.

Thank you.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 02-19-2018, 10:11 PM   #103
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
Thanks geraintluff, I understand. Also I noticed that when a correction is made, another knob shows up, called "Bands" and indicates the number of bands (filters) that were used. I haven't messed with it, but can that be changed, and if so what should I expect? It's kind of after the fact, so I was just wondering.

I also gotta tell you geraintluff, this little JS plugin has been extremely beneficial to me, I'm not sure if anybody else really understands what I'm doing with it, using the pink noise, but it's given me the means to confidently EQ my tracks as well as the final mixes, even with my significant hearing loss.

Thank you.
"Bands" doesn't change anything about the analysis - you're right, the analysis has already happened by that point. Instead, it attempts to reduce the number of filters used in the correction. For your flow, leaving this dial on maximum is the best thing. In general, I'm not sure this control adds much (the performance improvements from it are modest), and perhaps I should remove it.

I'm very happy that this plugin is helping you get the mixes you want.

Last edited by geraintluff; 02-19-2018 at 10:19 PM.
geraintluff is offline   Reply With Quote
Old 02-19-2018, 10:27 PM   #104
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

Quote:
Originally Posted by geraintluff View Post
Code:
( average of (S^4) )^0.25
Mathematically, this is a "4 norm" with a scaling factor .

"p norm" being "( sum of (S^p) )^(1/p) " -> https://en.wikipedia.org/wiki/Norm_(mathematics)

Here special cases are:

p=1: "sum-norm" or "Taxicab Norm"
p=2: "square norm" or "Euclidean norm" Resulting in things like average and normal distribution
p=infinity: "maximum norm": searching the peak

Maybe it even makes sense to allow for setting p in the range of 2 ("standard" / unweighted case) ... infinity/very high only use the highest peak.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 02-20-2018, 05:17 AM   #105
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by mschnell View Post
Mathematically, this is a "4 norm" with a scaling factor .

[...]

Maybe it even makes sense to allow for setting p in the range of 2 ("standard" / unweighted case) ... infinity/very high only use the highest peak.
Yep, exactly.

And setting this "p" is what "peak bias" in the "Learn" pane does. 4.0 is the default, but it goes between 1 and 10.

This norm is applied to the power (a 40ms moving average of samples^2), so p=1 is the "unweighted"/RMS case, not p=2.

(I tried a few different metrics during development, so I got confused about peak-bias earlier in the thread, sorry about that. This is why I would quite like to have an option in "Learn" for different metric.)
geraintluff is offline   Reply With Quote
Old 03-29-2018, 06:43 AM   #106
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

Slightly off topic:

While I will not forget about the task I defined here (automatically determine appropriate PEQ parameters for ReaEQ according to the GEQ settings used in the script), right now I am planning a somewhat related project, and would like to ask the experts, listening here, for comments.

I want to do a JSFX that calculates a running "similarity index" for an audio stream, compared to a given spectrum.

In a first phase the compare-spectrum would be calculated and saved. Later, this spectrum would be used to evaluate the running audio and create a "similarity envelope".

I'd like to do this using FFT, hence the spectrum to be stored might be defined by some thousand values (depending on sample rate and FFT Window time, the FFT window time being the "sample rate" for the resulting envelope) .

Now I need to save the spectrum to a file in a prepare type of project, and need to be able to load it (choosing between several files) in new projects that just use these values. I suppose this is similar to the "Noise spectrum", ReaFir is able to manage.

Up to know, I did not decently understand the file write options in FSFX. I just used text file read, and saving parameters in (hidden) sliders, which works automatically with the Project file, without me explicitly calling any "write" function.

Can anybody provide any tips and/or point me to code examples ?

Thanks,
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 04-03-2018, 02:56 AM   #107
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by mschnell View Post
I want to do a JSFX that calculates a running "similarity index" for an audio stream, compared to a given spectrum.

In a first phase the compare-spectrum would be calculated and saved. Later, this spectrum would be used to evaluate the running audio and create a "similarity envelope".
Are you looking for an envelope in across time, or a long-term per-frequency difference (like what Spectrum Matcher currently gives)?

Quote:
Originally Posted by mschnell View Post
Up to know, I did not decently understand the file write options in FSFX. I just used text file read, and saving parameters in (hidden) sliders, which works automatically with the Project file, without me explicitly calling any "write" function.

Can anybody provide any tips and/or point me to code examples ?
Saving arbitrary numbers of values to a project-state/preset is pretty straightforward. You use file_var(0, var_name) in the @serialize section, and it will either read the value (if loading a project/preset) or write a value to this variable. You can even use array[index] syntax.

Here's a minimal example that saves/loads two parameters which I didn't want to expose as sliders (because they only affect the UI) but still wanted to save.

Here's another example where I save an arpeggiator sequence - note that I set sN=100, and then read/write it, and then use it for the loop. This means that if I change it to sN=200 later, it will write that value when saving, but it will still read old presets/states (because it will load sN as 100 and then read the correct number of entries).

Here's how I save/load the reference spectrum (model_target[si]) and correction gains (correction_amp[si]) in Spectrum Matcher.

Here's me saving quite a lot of data - there isn't a way to write WAV files from JSFX, so to save the data for Learning Sampler, it actually writes a whole load of audio samples to the state! So we save potentially seconds of audio in the project file itself, which isn't great but I couldn't see a better option. There's a bit of extra logic in there (serialize_version) which lets it handle presets/states from older versions.

Last edited by geraintluff; 04-03-2018 at 03:10 AM.
geraintluff is offline   Reply With Quote
Old 04-03-2018, 08:12 AM   #108
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

I want to do a rather short time spectrum matching, using FFT.

I found that saving and loading the compare-spectrum easily is done in the @serialize section by file_mem(). With tzhat I can just copy / paste the FX withing a project or between multiple projects and the found spectrum will be copied with the plugin instance.

Thanks for your tips !
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 04-03-2018, 09:04 AM   #109
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

Quote:
Originally Posted by mschnell View Post
I want to do a rather short time spectrum matching, using FFT.
That of course was very vague.

In fact I in a first step want to do a long-time analyze (like the "Sectrum Matcher" does), but using FFT.

In a second step I in realtime want to calculate a similarity index between short running snippets of the audio stream (one or just a few FFT windows some 30 per second) regarding the stored spectrum, and then use this value in further processing.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 04-03-2018 at 01:20 PM.
mschnell is offline   Reply With Quote
Old 04-06-2018, 12:02 PM   #110
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Hi guys,

@Michael I'm not exactly sure what you're trying to do, could you explain a little about what you're trying to accomplish. I'm sorry if it's evident in your posts, but I'm not fluent with the languages and scripting that you guys are using.

I've got some things I want to present to you guys, but I need time to get it together. Maybe next week.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 04-06-2018, 01:03 PM   #111
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

This is a partial functionality of a bigger thing we are creating using Reaper (plus a lot not audio-centric software we are writing).

This special part is supposed to qualify an incoming audio stream regarding it sounding similar to a previously analyzed audio snippet.

Besides several parameters that can be set and the compare-spectrum this JSFX will in realtime read an incoming audio stream and output a running similarity index (supposedly as a stream of midi CC messages) . (Already partly working.)

In another mode the JSFX will create the compare spectrum. (Already working.)

The compare-spectrum is saved in the Reaper project file. (Already working.) Hence just copying the JSFX instance in the Reaper GUI will silently copy the captured spectrum.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 04-09-2018, 06:37 PM   #112
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Thanks Michael, I look forward to what you come up with.

Quote:
Originally Posted by Tod View Post
I've got some things I want to present to you guys, but I need time to get it together. Maybe next week.
I'm still using Spetrum Matcher but I'd like to see some added features if it's at all possible. The great thing about Spetrum Matcher for me, is the way it can gather "profiles". For me it's been amazing what I've been able to do with the profiles.

However, SM seems to have a "smoothing" that reduces it's accuracy, or I think better said, smooths it out too much. It's almost as if it's smoothing out at 1 octave increments.

To give you an example, here is a picture that shows both the direct spectrum analysis and the profile analysis of a certain section of song. The green line is the direct spectrum and the red is the SM profile spectrum.

The picture on the left is Span with no smoothing and on the right is Span with 1/3rd oct smoothing.



As you can see, SM seems to try follow the real curve, but just seems to be subdued some, like it's being smoothed out.

Now this could all be due to the fact I'm using pink noise on the profile, but I'm not sure why that would be.

Anyway, I thought I'd ask and maybe geraintluff may have some ideas.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Old 04-09-2018, 09:36 PM   #113
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 4,737
Default

Regarding my current project, which is only loosely connected to what is discussed here): what I am working on is part of a software project that is supposed to be sold to one or multiple customers, so I will not be able to publish much of it.

Anyway, I don't see a "musical" application for this, as the output is just a signal that shows the "current similarity" as a value (e.g. Midi CC). Seems more like for a technical or scientific use.

Regarding smoothing:

In fact my plugin does feature an adjustable "spectrum smoothing" parameter. Matching the stored spectrum against the current, only produces a decent "similarity" value for appropriately smoothed frequency curves.

As the "Spectrum Matcher" works with a predefined count of bandpass filters, smoothing is built-in by design, whereas with an FFT-based spectrum, smoothing can (and needs to) be applied explicitly.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 04-12-2018 at 09:35 PM.
mschnell is offline   Reply With Quote
Old 04-11-2018, 05:29 AM   #114
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Posts: 208
Default

Quote:
Originally Posted by Tod View Post
To give you an example, here is a picture that shows both the direct spectrum analysis and the profile analysis of a certain section of song. The green line is the direct spectrum and the red is the SM profile spectrum.

The picture on the left is Span with no smoothing and on the right is Span with 1/3rd oct smoothing.

[...]

Now this could all be due to the fact I'm using pink noise on the profile, but I'm not sure why that would be.
I think what's happening is you're comparing spectra by "correcting" pink noise to match some input, and plotting the spectrum of that filtered noise. The correction filter is not as sharp as the detection filters, so the resulting spectrum won't have features as sharp as the original input.

You should be able to see the correction filter curve as a white line in Spectrum Matcher, and it doesn't follow the bands exactly - I expect it is smoother, more like the red curve in your graph. You can get slightly different results by altering Q, but you can't get really sharp cutoffs, because shelf filters have inherent limits.

I could implement sharper correction filters if there's demand for that. The current filters are (to my ears) good for my use-cases, which are mostly to do with tweaking tone/balance of individual tracks to fit together as a mix, and fairly gentle and natural filters work well for that.

Geraint

------

P.S - Spectrum Matcher uses 2nd-order resonant filters for its analysis, not hard-cutoffs like in an FFT, so there'll be some crossover between bands. You can reduce the "resolution" control to make these bands narrower - however, I don't think that's the biggest issue for you, because the correction filters are still more limited.

There's also the fact that Spectrum Matcher pays more attention to peaks, because that's more similar to how we perceive loudness. This won't affect the resolution, but it might be why the curves on your graph agree more at the lower end of the spectrum, because they presumably have different dynamic profiles.

Last edited by geraintluff; 04-11-2018 at 05:48 AM.
geraintluff is offline   Reply With Quote
Old 04-12-2018, 08:34 PM   #115
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,467
Default

Thanks for the reply Geraint, when I've got more time I'll try to give you a better picture of what I'm doing. Once I've
done that I wont pester your any more.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.