Panning

standard mode | Spectral category

Inputs

  • spectrumLeft (vector_real) - left channel's spectrum
  • spectrumRight (vector_real) - right channel's spectrum

Outputs

  • panningCoeffs (matrix_real) - parameters that define the panning curve at each frame

Parameters

  • averageFrames (integer ∈ [0, ∞), default = 43) :
    number of frames to take into account for averaging
  • numBands (integer ∈ [1, ∞), default = 1) :
    number of mel bands
  • numCoeffs (integer ∈ (0, ∞), default = 20) :
    number of coefficients used to define the panning curve at each frame
  • panningBins (integer ∈ (1, ∞), default = 512) :
    size of panorama histogram (in bins)
  • sampleRate (real ∈ (0, ∞), default = 44100) :
    audio sampling rate [Hz]
  • warpedPanorama (bool ∈ {false, true}, default = true) :
    if true, warped panorama is applied, having more resolution in the center area

Description

This algorithm characterizes panorama distribution by comparing spectra from the left and right channels. The panning coefficients are extracted by:

  • determining the spatial location of frequency bins given left and right channel spectra;
  • computing panorama histogram weighted by the energy of frequency bins, averaging it across frames and normalizing;
  • converting the normalized histogram into panning coefficients (IFFT of the log-histogram).

The resulting coefficients will show peaks on the initial bins for left panned audio, and right panning will appear as peaks in the upper bins.

Since panning can vary very rapidly from one frame to the next, the coefficients can be averaged over a time window of several frames by specifying "averageFrames" parameter. If a single vector of panning coefficients for the whole audio input is required, "averageFrames" should correspond to the length of audio input. In standard mode, sequential runs of compute() method on each frame are required for averaging across frames.

Application: music classification, in particular genre classification [2].

Note: At present time, the original algorithm has not been tested in multi-band mode. That is, numBands must remain 1.

References:

[1] E. Gómez, P. Herrera, P. Cano, J. Janer, J. Serrà, J. Bonada, S. El-Hajj, T. Aussenac, and G. Holmberg, "Music similarity systems and methods using descriptors,” U.S. Patent WO 2009/0012022009.

[2] Guaus, E. (2009). Audio content processing for automatic music genre classification: descriptors, databases, and classifiers. PhD Thesis.

Standard algorithms

AfterMaxToBeforeMaxEnergyRatio | AllPass | AudioLoader | AudioOnsetsMarker | AudioWriter | AutoCorrelation | BFCC | BPF | BandPass | BandReject | BarkBands | BeatTrackerDegara | BeatTrackerMultiFeature | Beatogram | BeatsLoudness | BinaryOperator | BinaryOperatorStream | BpmHistogram | BpmHistogramDescriptors | BpmRubato | CartesianToPolar | CentralMoments | Centroid | ChordsDescriptors | ChordsDetection | ChordsDetectionBeats | Chromagram | Chromaprinter | Clipper | ConstantQ | Crest | CrossCorrelation | CubicSpline | DCRemoval | DCT | Danceability | Decrease | Derivative | DerivativeSFX | Dissonance | DistributionShape | Duration | DynamicComplexity | ERBBands | EasyLoader | EffectiveDuration | Energy | EnergyBand | EnergyBandRatio | Entropy | Envelope | EqloudLoader | EqualLoudness | Extractor | FFT | FFTC | FadeDetection | Flatness | FlatnessDB | FlatnessSFX | Flux | FrameCutter | FrameGenerator | FrameToReal | FreesoundExtractor | FrequencyBands | GFCC | GeometricMean | HFC | HPCP | HarmonicBpm | HarmonicMask | HarmonicModelAnal | HarmonicPeaks | HighPass | HighResolutionFeatures | HprModelAnal | HpsModelAnal | IDCT | IFFT | IFFTC | IIR | Inharmonicity | InstantPower | Intensity | Key | KeyExtractor | LPC | Larm | Leq | LevelExtractor | LogAttackTime | LoopBpmConfidence | LoopBpmEstimator | Loudness | LoudnessEBUR128 | LoudnessVickers | LowLevelSpectralEqloudExtractor | LowLevelSpectralExtractor | LowPass | MFCC | Magnitude | MaxFilter | MaxMagFreq | MaxToTotal | Mean | Median | MelBands | MetadataReader | Meter | MinToTotal | MonoLoader | MonoMixer | MonoWriter | MovingAverage | MultiPitchKlapuri | MultiPitchMelodia | Multiplexer | MusicExtractor | NSGConstantQ | NSGIConstantQ | NoiseAdder | NoveltyCurve | NoveltyCurveFixedBpmEstimator | OddToEvenHarmonicEnergyRatio | OnsetDetection | OnsetDetectionGlobal | OnsetRate | Onsets | OverlapAdd | PCA | Panning | PeakDetection | PercivalBpmEstimator | PercivalEnhanceHarmonics | PercivalEvaluatePulseTrains | PitchContourSegmentation | PitchContours | PitchContoursMelody | PitchContoursMonoMelody | PitchContoursMultiMelody | PitchFilter | PitchMelodia | PitchSalience | PitchSalienceFunction | PitchSalienceFunctionPeaks | PitchYin | PitchYinFFT | PolarToCartesian | PoolAggregator | PowerMean | PowerSpectrum | PredominantPitchMelodia | RMS | RawMoments | ReplayGain | Resample | ResampleFFT | RhythmDescriptors | RhythmExtractor | RhythmExtractor2013 | RhythmTransform | RollOff | SBic | Scale | SilenceRate | SineModelAnal | SineModelSynth | SineSubtraction | SingleBeatLoudness | SingleGaussian | Slicer | SpectralCentroidTime | SpectralComplexity | SpectralContrast | SpectralPeaks | SpectralWhitening | Spectrum | SpectrumCQ | SpectrumToCent | Spline | SprModelAnal | SprModelSynth | SpsModelAnal | SpsModelSynth | StartStopSilence | StereoDemuxer | StereoMuxer | StereoTrimmer | StochasticModelAnal | StochasticModelSynth | StrongDecay | StrongPeak | SuperFluxExtractor | SuperFluxNovelty | SuperFluxPeaks | TCToTotal | TempoScaleBands | TempoTap | TempoTapDegara | TempoTapMaxAgreement | TempoTapTicks | TonalExtractor | TonicIndianArtMusic | TriangularBands | TriangularBarkBands | Trimmer | Tristimulus | TuningFrequency | TuningFrequencyExtractor | UnaryOperator | UnaryOperatorStream | Variance | Vibrato | WarpedAutoCorrelation | Windowing | YamlInput | YamlOutput | ZeroCrossingRate