I'm hoping to improve the results of a simple application I've been working on, which aims to isolate as fully as possible the electric guitar heard (along with drums/bass/vocals) on a single track of a commercially-available 5.1 mix. It was inspired by the observation that simply inverting the content of another track ('nonGuitarTrack', containing only drums/bass/vocals) and adding it to 'guitarTrack' gets quite some way toward this goal, and that a better result can be achieved by manually adjusting the amplitude of the subtracted track so that as much unwanted audio as possible is removed from the sum.
Initially, the application output the gain factor that minimized the RMS amplitude of
guitarTrack - (gain factor) * nonGuitarTrack
and produced pleasing results for carefully-selected input of a few seconds duration.
I then tired of processing songs a few seconds at a time, and so the program now both consumes and produces song-length WAV files. It does this by processing the input samples in clusters of (say) 0.1s duration. It seems to my naive mind that the best result is to be obtained by lowering the cluster size until the result begins to sound bad (e.g. 2k clusters with 96kHz audio results in 'crackling'). Results were again generally pleasing, although occasionally audibly sub-optimal.
Was the placement of cluster boundaries at fault? I got to work on a new (perhaps impracticably expensive) version that will perform a 'pass' for every possible placement of this boundary, and then combine the result of each pass in some sensible fashion - which brings me here.
Should each sample in the resulting WAV file be the mean of the samples computed in each pass? Should it simply be the minimal value computed? Would fewer passes be needed if using clusters of constantly-varying random size? Perhaps a better approach would average the results of using cluster sizes of 2^n for n=1,2,...,12? My knowledge of statistics is very dismal, and I'd be very grateful for any advice re how to best combine multiple passes, or indeed re how isolation in this easy case is best achieved.
(The waveforms of both input files clearly depict when a bass or snare is struck. Ideally, the program would perhaps use beat detection and employ variable-sized clusters formed during- and between-beats; currently, I shudder to think how the loud samples during a beat skew the RMS volume of a beat-straddling cluster. Beat detection is something I hope to avoid investigating, but if audibly superior results are likely then I'll have no excuse...)