Musical Metamerism with Time–Frequency Scattering Vincent Lostanlen and Han Han November 2024 Abstract The concept of metamerism originates from colorimetry, where it describes a sensation of visual similarity between two colored lights despite significant differences in spectral content. Likewise, we propose to call “musical metamerism” the sensation of auditory similarity which is elicited by two music fragments which differ in terms of underlying waveforms. In this technical report, we describe a method to generate musical metamers from any audio recording. Our method is based on joint time–frequency scattering in Kymatio, an open-source software in Python which enables GPU computing and automatic differentiation. The advantage of our method is that it does not require any manual preprocessing, such as transcription, beat tracking, or source separation. We provide a mathematical description of JTFS as well as some excerpts from the Kymatio source code. Lastly, we review the prior work on JTFS and draw connections with closely related algorithms, such as spectrotemporal receptive fields (STRF), modulation power spectra (MPS), and Gabor filterbank (GBFB). \urladdr https://audio.ls2n.fr keywords audio texture synthesis, automatic differentiation, joint time–frequency scattering (JTFS), music cognition 1 Introduction 1.1 Problem statement What makes music memorable? The ability of human listeners to recognize a song “by ear” may be easy to observe, it remains difficult to explain [ 16 ] . For example, a familiar song may be identified after having undergone a certain amount of frequency transposition or time stretching. Likewise, prior research in cognitive science has demonstrated that songs may retain their familiarity after noise vocoding—a digital audio effect which locally alters spectral content while leaving the temporal envelope essentially unchanged [ 19 ] . Together, these findings hint at the idea that music familiarity is not reducible to the recognition of rigid patterns in the time–frequency domain. Instead, Henkjan Honing et al. have suggested that listeners attend to the global “contour” of a musical piece when perceiving it as familiar [ 15 ] . Here, the notion of contour is an umbrella term for various auditory attributes: i.e., melodic, harmonic, rythmic, timbral, textural, and so forth. The commonality between all these components of contour perception resides in their invariance to local alterations of the short-term power spectrum, such as those mentioned earlier: noise vocoding, time stretching, and frequency transposition. Thus, Honing’s hypothesis, which we refer to as “multicomponent contour perception”, is consistent with the available evidence on music familiarity [ 13 ] . Yet, there is a gap in scholarship concerning the relative weight of contour components in the cognition of familiar music pieces. Measuring these weights experimentally is challenging, for lack of suitable “minimal pairs”: i.e., pairs of auditory stimuli which differ from each other just enough to significantly reduce perceived familiarity while having some contour components in common [ 14 ] . The prospect of synthesizing such minimal pairs as auditory stimuli raises a difficult challenge for signal processing research, but one that is worth pursuing because of its application potential. 1.2 Contribution In this report, we present a new method for stimulus design in music cognition experiments. Our method relies on a nonlinear multiresolution approximation algorithm known as joint time–frequency scattering, or JTFS for short. JTFS decomposes the spectrogram into wavelet subbands at various temporal rates and frequential scales while retaining a fine localization of coefficients in the time–frequency domain. The Euclidean distance between two JTFS feature vectors is differentiable with respect to the underlying digital audio samples, thus lending itself to signal reconstruction via gradient descent. Following Feather et al. , we refer to the outcome of this reconstruction by “metamer” [ 9 , 10 ] ; i.e, a signal that is perceptually indistinguishable from the reference even so the underlying waveforms may significantly differ. Although the synthesis of JTFS metamers has found applications in computer music [ 24 ] , the same cannot yet be said of music cognition research. The key idea is to coarsen the spectrotemporal discretization of JTFS coefficients by means of Gaussian low-pass filtering over the time and frequency variables. After this coarsening, Euclidean distances in JTFS feature space are invariant to small shifts up to some time scale T and to small transposition up to some frequency interval F . Such a property of invariance aligns with the “contour hypothesis” of Honing et al. , i.e., the claim that music listeners primarily attend to relative variations in spectrotemporal energy distribution in the time–frequency domain as opposed to absolute time–frequency cues. Therefore, resynthesizing a waveform from coarsened JTFS coefficients produces a kind of “musical metamer”, that is, a signal which resembles the original in terms of summary statistics over spectrotemporal regions of duration of the order of T and pitch register of the order of F . 2 Method This section reproduces some elements from [ 24 ] , with minor adaptations. 2.1 Joint time–frequency scattering Time–frequency scattering results from the cascade of two stages: an auditory filterbank and the extraction of spectrotemporal modulations with wavelets in time and log-frequency. First, we define Morlet wavelets of center frequency \lambda>0 and quality factor Q as \boldsymbol{\psi}_{\lambda}(t)=\lambda\exp\left(-\dfrac{\lambda^{2}t^{2}}{2Q^{2}}\right)\times(\exp(2\pi\mathrm{i}\lambda t)-\kappa), (1) where the corrective term \kappa ensures that each \boldsymbol{\psi}_{\lambda}(t) has one vanishing moment, i.e., a null average. Within a discrete setting, acoustic frequencies \lambda are typically of the form 2^{n/Q} where n is integer, thus covering the hearing range. For \boldsymbol{x}(t) a finite-energy signal, we define the CQT of \boldsymbol{x} as the matrix \mathbf{U}_{1}\boldsymbol{x}(t,\lambda)=\left|\boldsymbol{x}\ast\boldsymbol{\psi}_{\lambda}\right|(t) ; which stacks convolutions with all wavelets \boldsymbol{\psi}_{\lambda}(t) followed by the complex modulus nonlinearity. Secondly, we define Morlet wavelets of respective center frequencies \alpha>0 and \beta\in\mathbb{R} with quality factor Q=1 . With a slight abuse of notation, we denote these wavelets by \boldsymbol{\psi}_{\alpha}(t) and \boldsymbol{\psi}_{\beta}(\log\lambda) even though they do not necessarily have the same shape as the wavelets \boldsymbol{\psi}_{\lambda}(t) of Equation 1 . Frequencies \alpha , hereafter called amplitude modulation rates , are measured in Hertz (Hz) and discretized as 2^{n} with integer n . Frequencies \beta , hereafter called frequency modulation scales , are measured in cycles per octave (c/o) and discretized as \pm 2^{n} with integer n . The edge case \alpha=0 corresponds to \boldsymbol{\psi}_{\alpha}(t) being a Gaussian low-pass filter \boldsymbol{\phi}_{T}(t) of temporal width T^{-1} , measured in Hertz. Likewise, the edge case \beta=0 corresponds to \boldsymbol{\psi}_{\beta}(\log\lambda) being a Gaussian low-pass filter \boldsymbol{\phi}_{F}(\log\lambda) of bandwidth F^{-1} , measured in cycles per octave. These modulation scales \beta play the same role as the quefrencies in a mel-frequency cepstrum. We define the fourth-order tensor \mathbf{U}_{2}\boldsymbol{x}(t,\lambda,\alpha,\beta)=\big|\mathbf{U}_{1}\boldsymbol{x}\overset{t}{\ast}\boldsymbol{\psi}_{\alpha}\overset{\log_{2}\lambda}{\ast}\boldsymbol{\psi}_{\beta}\big|(t,\lambda)\\ =\Bigg|\iint\!\mathbf{U}_{1}\boldsymbol{x}(\tau,s)\boldsymbol{\psi}_{\alpha}(t-\tau)\boldsymbol{\psi}_{\beta}(\log_{2}\lambda-s)\,\mathrm{d}\tau\,\mathrm{d}s\Bigg|, (2) which stacks convolutions in time and log-frequency with all wavelets \boldsymbol{\psi}_{\alpha}(t) and \boldsymbol{\psi}_{\beta}(\log_{2}\lambda) followed by the complex modulus nonlinearity. Figure 1 shows the interference pattern of the product \boldsymbol{\psi}_{\alpha}(t-\tau)\boldsymbol{\psi}_{\beta}(\log_{2}\lambda-s) for different combinations of time t , frequency \lambda , rate \alpha , and scale \beta . We denote the multiindices (\lambda,\alpha,\beta) resulting from such combinations as scattering paths [ 28 ] . Figure 1: Interference pattern between wavelets \boldsymbol{\psi}_{\alpha}(t) and \boldsymbol{\psi}_{\beta}(\log_{2}\lambda) in the time–frequency domain (t,\log_{2}\lambda) for different combinations of amplitude modulation rate \alpha and frequency modulation scale \beta . Darker shades of red (resp. blue) indicate higher positive (resp. lower negative) values of the real part. 2.2 Averaging Because it is a convolutional operator in the time–frequency domain, the STRF is equivariant to temporal translation t\mapsto t+\tau as well as frequency transposition \lambda\mapsto 2^{s}\lambda . To produce musical metamers, we guarantee invariance to temporal translation up to some time lag T and up to some frequency interval F . To this aim, we define time–frequency scattering as the result of a local averaging of both \mathbf{U_{1}}\boldsymbol{x}(t,\lambda) and \mathbf{U}_{2}\boldsymbol{x}(t,\lambda,\alpha,\beta) by a Gaussian low-pass filter \boldsymbol{\phi}_{T} of cutoff frequency equal to T^{-1} , yielding \mathbf{S}_{1}\boldsymbol{x}(t,\lambda)=\big(\mathbf{U}_{1}\boldsymbol{x}\overset{t}{\ast}\boldsymbol{\phi}_{T}\overset{\log\lambda}{\ast}\boldsymbol{\phi}_{F}\big)(t,\lambda) (3) and \mathbf{S}_{2}\boldsymbol{x}(t,\lambda,\alpha,\beta)=\big(\mathbf{U}_{2}\boldsymbol{x}\overset{t}{\ast}\boldsymbol{\phi}_{T}\overset{\log_{2}\lambda}{\ast}\boldsymbol{\phi}_{F}\big)(t,\lambda,\alpha,\beta), (4) respectively. 2.3 Reconstruction By recursion over layers in the composition of wavelet modulus operators, the invertibility of wavelet modulus implies the invertibility of scattering transforms of infinite depth [ 41 ] , up to a constant time shift of at most T . However, the time–frequency scattering network presented here has a finite number of layers (i.e., two layers) and is therefore not exactly invertible. Thanks to the theorem of exponential decay of scattering coefficients [ 42 ] , the residual energy that is present in deeper layers can be neglected on the condition that T is small enough. Starting from a colored Gaussian noise \boldsymbol{y}_{0}(t) whose power spectral density matches \mathbf{S}_{1}\boldsymbol{x}(t,\lambda) , we refine it by additive updates of the form \boldsymbol{y}_{n+1}(t)=\boldsymbol{y}_{n}(t)+\boldsymbol{u}_{n}(t) , where the term \boldsymbol{u}_{n}(t) is defined recursively as \boldsymbol{u}_{n}(t)=m\times\boldsymbol{u}_{n}(t)+\mu_{n}\boldsymbol{\nabla}\mathbf{E}(\boldsymbol{y}_{n})(t) . In subsequent experiments, the momentum term is fixed at m=0.9 while the learning rate is initialized at \mu_{0}=0.1 and modified at every step according to a “bold driver” heuristic [ 38 ] . Like deep neural networks, scattering networks consist of the composition of linear operators (wavelet transforms) and pointwise nonlinearities (complex modulus). Consequently, the gradient \boldsymbol{\nabla}\mathbf{E}(\boldsymbol{y}_{n}) can be obtained by composing the Hermitian adjoints of these operator in the reverse order as in the direct scattering transform – a method known as backpropagation. We rely on the PyTorch backend of Kymatio to perform gradient backpropagation via reverse-mode automatic differentiation [ 4 ] . We outline the resulting automatic differentiation algorithm below. First, Kymatio backpropagates the gradient of Euclidean loss for second-order scattering coefficients: \boldsymbol{\nabla}\mathbf{U_{2}}\boldsymbol{y}(t,\lambda,\alpha,\beta)=\Big((\mathbf{S_{2}}\boldsymbol{x}-\mathbf{S_{2}}\boldsymbol{y})\overset{t}{\ast}\boldsymbol{\phi}\Big)(t,\lambda,\alpha,\beta). (5) Secondly, Kymatio backpropagates the second layer onto the first: \displaystyle\boldsymbol{\nabla}\mathbf{U_{1}}\boldsymbol{y}(t,\lambda) \displaystyle=\Big((\mathbf{S_{1}}\boldsymbol{x}-\mathbf{S_{1}}\boldsymbol{y})\overset{t}{\ast}\boldsymbol{\phi}\Big)(t,\lambda,\alpha,\beta) \displaystyle+\sum_{\alpha,\beta}\mathfrak{R}\Bigg(\Bigg[\dfrac{\big(\mathbf{U_{1}}\boldsymbol{y}\overset{t}{\ast}\boldsymbol{\bar{\psi}}_{\alpha}\overset{\log\lambda}{\ast}\boldsymbol{\bar{\psi}}_{\beta}\big)}{\big|\mathbf{U_{1}}\boldsymbol{y}\overset{t}{\ast}\boldsymbol{\bar{\psi}}_{\alpha}\overset{\log\lambda}{\ast}\boldsymbol{\bar{\psi}}_{\beta}\big|}\times\boldsymbol{\nabla}\mathbf{U_{2}}\boldsymbol{y}\Bigg]\overset{t}{\ast}\boldsymbol{\psi}_{\alpha}\overset{\log\lambda}{\ast}\boldsymbol{\psi}_{\beta}\Bigg)(t,\lambda,\alpha,\beta), (6) where the symbol \mathfrak{R}(z) denotes the real part of the complex number z . Lastly, Kymatio backpropagates the first layer into the waveform domain: \boldsymbol{\nabla}\mathbf{E}(\boldsymbol{y})(t)=\sum_{\lambda}\mathfrak{R}\Bigg(\Bigg[\dfrac{\boldsymbol{y}\overset{t}{\ast}\boldsymbol{\psi}_{\lambda}}{|\boldsymbol{y}\overset{t}{\ast}\boldsymbol{\psi}_{\lambda}|}\times\boldsymbol{\nabla}\mathbf{U_{1}}\boldsymbol{y}\Bigg]\overset{t}{\ast}\boldsymbol{\psi}_{\lambda}\Bigg)(t) (7) Observe that the signal above is null if \mathbf{S_{1}}\boldsymbol{x}=\mathbf{S_{1}}\boldsymbol{y} and \mathbf{S_{2}}\boldsymbol{x}=\mathbf{S_{2}}\boldsymbol{y} ; i.e., if \boldsymbol{x} and \boldsymbol{y} are musical metamers for the JTFS representation. 3 Implementation 3.1 Filterbanks Let (\boldsymbol{\psi}^{\mathrm{tm},1}_{0},\ldots,\boldsymbol{\psi}^{\mathrm{tm},1}_{N_{1}-1}) be a finite sequence of complex-valued band-pass filters with center frequencies 1>\xi^{\mathrm{tm},1}_{0}>\ldots>\xi^{\mathrm{tm},1}_{N_{1}-1}>0 and bandwidths \frac{1}{2}>\sigma^{\mathrm{tm},1}_{0}>\ldots>\sigma^{\mathrm{tm},1}_{N_{1}-1}>0 , where the sample rate is set equal to 1 by convention. We refer to [ 26 ] for the rationale behind the values of \xi_{0}^{\mathrm{tm},1} and \sigma_{0}^{\mathrm{tm},1} . Given a scale J and a dimensionless hyperparameter Q^{\mathrm{tm},1} , center frequencies and bandwiths decrease according to a geometric progression, while maintaining a quality factor of Q^{\mathrm{tm},1} ; until reaching an “elbow”, defined as a lower bound on the bandwidth. After the elbow, the progression of center frequencies is arithmetic, while bandwidths remain at the lower bound. Thus, filters have a constant-bandwidth property in the lower-frequency range and a constant- Q property in the upper-frequency range. This construction was first proposed in [ 3 ] and is reminiscent of the construction of the mel scale in HTK 1 1 1 https://librosa.org . We reproduce an excerpt of the Kymatio code below. ⬇ 1 sigma0 = 0.1 2 r_psi = math . sqrt (0.5) 3 4 xi = max (1. / (1. + math . pow (2., 3. / Q )), 0.35) 5 factor = 1. / math . pow (2, 1. / Q ) 6 sigma = (1 - factor ) / (1 + factor ) * xi / math . sqrt (2 * math . log (1. / r )) 7 sigma_min = sigma0 / 2** J 8 9 if sigma <= sigma_min : 10 xi = sigma 11 else : 12 yield xi , sigma 13 # High-frequency (constant-Q) region 14 while sigma > ( sigma_min * math . pow (2, 1 / Q )): 15 xi /= math . pow (2, 1 / Q ) 16 sigma /= math . pow (2, 1 / Q ) 17 yield xi , sigma 18 19 # Low-frequency (constant-bandwidth) region 20 elbow_xi = xi 21 for q in range ( Q -1): 22 xi -= 1/ Q * elbow_xi 23 yield xi , sigma_min Another filterbank is built for the second layer: (\boldsymbol{\psi}^{\mathrm{tm},2}_{0},\ldots,\boldsymbol{\psi}^{\mathrm{tm},2}_{N_{2}-1}) , with its own hyperparameters Q^{\mathrm{tm},2} . Lastly, we build a filterbank for frequential scattering: (\boldsymbol{\psi}^{\mathrm{fr},1}_{0},\ldots,\boldsymbol{\psi}^{\mathrm{fr},1}_{N_{\mathrm{fr}}-1}) , with its own hyperparameters Q^{\mathrm{fr},1} and J^{\mathrm{fr},1} . 3.2 First layer Given an audio signal \boldsymbol{x} , we extract its time–frequency representation by convolution with each filters \boldsymbol{\psi}^{\mathrm{tm},1}_{n_{1}} where 0\leq n_{1} j1 : 11 k2 = min ( j2 - k1 , log2_stride ) if average_local else ( j2 - k1 ) 12 U_2_c = backend . cdgmm ( U_1_hat [ ’coef’ ], psi2 [ n2 ][ ’levels’ ][ k1 ]) 13 U_2_hat = backend . subsample_fourier ( U_2_c , 2 ** k2 ) 14 U_2_c = backend . ifft ( U_2_hat ) 15 Y_2_list . append ( U_2_c ) 16 17 if len ( Y_2_list ) > 0: 18 # Stack over the penultimate dimension with shared n2. 19 # Y_2 is a complex-valued 3D array indexed by (batch, n1, time) 20 Y_2 = backend . stack ( Y_2_list , 2) 21 22 # Y_2 is a stack of multiple n1 paths so we put (-1) as placeholder. 23 # n1 ranges between 0 (included) and n1_max (excluded), which we store 24 # separately for the sake of meta() and padding/unpadding downstream. 25 yield { ’coef’ : Y_2 , ’j’ : (-1, j2 ), ’n’ : (-1, n2 ), ’n1_max’ : len ( Y_2_list )} 3.4 Second layer, frequency variable Since band-pass filters \boldsymbol{\psi}^{\mathrm{tm},1}_{0},\ldots,\boldsymbol{\psi}^{\mathrm{tm},1}_{N_{1}-1} are complex-valued, scattered signals (|\boldsymbol{x}\ast\boldsymbol{\psi}^{\mathrm{tm},1}|\ast\boldsymbol{\psi}^{\mathrm{tm},2}) are also complex-valued. Thus, it is necessary to include negative frequencies as well as positive frequencies. For this purpose, we flip the sign of all center frequencies \xi_{n}^{\mathrm{fr},1} while maintaining the same bandwidths \sigma_{n}^{\mathrm{fr},1} ; an operation known as wavelet spinning . We reproduce an excerpt of the Kymatio code below. ⬇ 1 def spin ( filterbank_fn , filterbank_kwargs ): 2 def spinned_fn ( J , Q , ** kwargs ): 3 yield from filterbank_fn ( J , Q , ** kwargs ) 4 for xi , sigma in filterbank_fn ( J , Q , ** kwargs ): 5 yield - xi , sigma 6 return spinned_fn , filterbank_kwargs Importantly, spinning is only necessary if \alpha\neq 0 : indeed, the case \alpha=0 corresponds to a temporal low-pass filtering of the scalogram, which produces a real-valued input. We accommodate both subcases in Kymatio via the spinned Boolean argument: ⬇ 1 def frequency_scattering ( X , backend , filters_fr , log2_stride_fr , 2 average_local_fr , spinned ): 3 4 # Unpack filters_fr list 5 phi , psis = filters_fr 6 log2_F = phi [ ’j’ ] 7 8 # Swap time and frequency axis 9 X_T = backend . swap_time_frequency ( X [ ’coef’ ]) 10 11 # Zero-pad frequency domain 12 pad_right = phi [ ’N’ ] - X [ ’n1_max’ ] 13 X_pad = backend . pad_frequency ( X_T , pad_right ) 14 15 # Spinned case switch 16 if spinned : 17 # Complex-input FFT 18 X_hat = backend . cfft ( X_pad ) 19 else : 20 # Real-input FFT 21 X_hat = backend . rfft ( X_pad ) 22 # Restrict to nonnegative spins 23 psis = filter ( lambda psi : psi [ ’xi’ ]>=0, psis ) 24 25 for n_fr , psi in enumerate ( psis ): 26 j_fr = psi [ ’j’ ] 27 spin = np . sign ( psi [ ’xi’ ]) 28 k_fr = min ( j_fr , log2_stride_fr ) if average_local_fr else j_fr 29 Y_fr_hat = backend . cdgmm ( X_hat , psi [ ’levels’ ][0]) 30 Y_fr_sub = backend . subsample_fourier ( Y_fr_hat , 2 ** k_fr ) 31 Y_fr = backend . ifft ( Y_fr_sub ) 32 Y_fr = backend . swap_time_frequency ( Y_fr ) 33 # If not spinned, X[’n’]=S1[’n’]=(-1,) is a 1-tuple. 34 # If spinned, X[’n’]=Y2[’n’]=(-1,n2) is a 2-tuple. 35 # In either case, we elide the "-1" placeholder and define the new ’n’ 36 # as (X[’n’][1:] + (n_fr,)), i.e., n=(n_fr,) is not spinned 37 # and n=(n2, n_fr) if spinned. This ’n’ tuple is unique. 38 yield {** X , ’coef’ : Y_fr , ’n’ : ( X [ ’n’ ][1:] + ( n_fr ,)), 39 ’j_fr’ : ( j_fr ,), ’n_fr’ : ( n_fr ,), ’n1_stride’ : (2** j_fr ), 40 ’spin’ : spin } 3.5 Main algorithm The main JTFS algorithm has only six lines of code, thanks to the yield coroutine and the yield from expression, added in Python 3.3. ⬇ 1 def joint_timefrequency_scattering ( U_0 , backend , filters , log2_stride , 2 average_local , filters_fr , log2_stride_fr , average_local_fr ): 3 "" " 4 Yields 5 ------ 6 # Zeroth order 7 if average_local: 8 * S_0 indexed by (batch, time[log2_T]) 9 else: 10 * U_0 indexed by (batch, time) 11 12 # First order 13 for n_fr < len(filters_fr): 14 * Y_1_fr indexed by (batch, n1[n_fr], time[log2_T]), complex-valued, 15 where n1 has been zero-padded to size N_fr before convolution 16 17 # Second order 18 for n2 < len(psi2): 19 for n_fr < len(filters_fr): 20 * Y_2_fr indexed by (batch, n1[n_fr], time[n2]), complex-valued, 21 where n1 has been zero-padded to size N_fr before convolution 22 " "" 23 time_gen = time_scattering_widthfirst ( 24 U_0 , backend , filters , log2_stride , average_local ) 25 yield next ( time_gen ) 26 27 # First order: S1(n1, t) = (|x*psi_{n1}|*phi)(t[log2_T]) 28 S_1 = next ( time_gen ) 29 30 # Y_1_fr_{n_fr}(n1, t[log2_T]) = (|x*psi_{n1}|*phi*psi_{n_fr})(t[log2_T]) 31 yield from frequency_scattering ( S_1 , backend , 32 filters_fr , log2_stride_fr , average_local_fr , spinned = False ) 33 34 # Second order: Y_2_{n2}(t[log2_T], n1[j_fr]) 35 # = (|x*psi_{n1}|*psi_{n2})(t[j2], n1[j_fr]) 36 for Y_2 in time_gen : 37 38 # Y_2_fr_{n2,n_fr}(t[j2], n1[j_fr]) 39 # = (|x*psi_{n1}|*psi_{n2}*psi_{n_fr})(t[j2], n1[j_fr]) 40 yield from frequency_scattering ( Y_2 , backend , filters_fr , 41 log2_stride_fr , average_local_fr , spinned = True ) 4 Related work 4.1 Applications to audio classification The first implementation of JTFS was made in 2014 by Joakim Andén and was written in MATLAB 2 2 2 https://github.com/scatnet/scatnet . In 2015, Vincent Lostanlen wrote another MATLAB implementation enabling custom routines for gradient backpropagation 3 3 3 https://github.com/lostanlen/scattering.m . The first JTFS article relied on the first implementation for speech classification and on the second implementation for texture synthesis of bird sounds [ 1 ] . A mathematical link between JTFS and deep convolutional network was outlined by [ 29 ] and formally built by [ 2 ] , with new applications to the supervised classification of music instruments and urban sounds. Since then, JTFS has been applied to other domains: playing techniques from Chinese bamboo flute [ 44 ] , bioacoustics [ 43 ] , and medical acoustics [ 36 ] . Another publication has shown that Euclidean distances in JTFS feature space predict auditory judgments of timbre similarity within a large vocabulary of instrumental playing techniques, as collected from a group of 31 professional composers and non-expert music listeners [ 23 ] . An article for the French academy of sciences, written on the anniversary of Joseph Fourier’s birth, discusses the historical background of JTFS [ 22 ] . 4.2 Use in computer music The earliest use of JTFS in computer music was FAVN , an opera which was commissioned to composer Florian Hecker by the Alte Oper in Frankfurt in 2016, followed by an exhibition at the Kunsthalle in Vienna in 2017. The catalog of this exhibition discusses the underpinnings of JTFS in terms of programming language theory, as well as connections with auditory neurophysiology [ 27 ] . This discussion was expanded in [ 24 ] on the occasion of The Shape of RemiXXXes to Come : i.e., a Lorenzo Senni record, released by Warp Records, containing a JTFS-based remix by Florian Hecker. JTFS was also used in other pieces, such as Synopsis Seriation [ 25 ] , released by Urbanomic, and Resynthese FAVN , released as a 10-CD box set by Blank Forms. The use of JTFS in music has been discussed by art historian Ina Blom [ 6 ] and by philosopher Amy Ireland [ 17 ] . 4.3 Kymatio implementation JTFS was re-implemented in the Python language by Mathieu Andreux in 2018 [ 5 ] , with an application to generative audio models. The next year, the Kymatio consortium was officially created, with the goal of providing a stable, portable, and efficient implementation of scattering transforms in Python 4 4 4 https://kymat.io . The development of time scattering in Kymatio was led by Andén, Andreux, and Lostanlen, with important contributions by John Muradeli, Changhong Wang, and Philip Warrick [ 4 ] . A first implementation of GPU-enabled JTFS from Kymatio’s Pytorch routines was written by John Muradeli, under the name of wavespin 5 5 5 https://github.com/OverLordGoldDragon/wavespin/tree/dafx2022-jtfs , with new applications to manifold learning and music instrument classification [ 31 ] . The current implementation of JTFS in Kymatio was written by Vincent Lostanlen, Cyrus Asfa, Han Han, Changhong Wang, Muawiz Chaudhary, and Joakim Andén 6 6 6 https://github.com/kymatio/kymatio . Since then, Chris Mitcheltree has reimplemented JTFS in PyTorch for pedagogical purposes 7 7 7 https://github.com/christhetree/jtfst_implementation . Reverse-mode automatic differentiation in Kymatio has been successfully applied to perceptual sound matching [ 40 ] . The combination of JTFS, differentiable physical modeling synthesis, and Riemannian geometry has led to an original technique for training neural networks to solve inverse problems, known as perceptual–neural–physical sound matching [ 11 , 12 ] . This is a kind of model-based deep learning for music information research—we refer to [ 34 ] for an introduction. 4.4 Spectrotemporal receptive fields Besides JTFS, there are other algorithms which extract spectrotemporal modulations at various scales and rates. As early as 1998, [ 7 ] have implemented spectro-temporal modulation transfer functions so as to fit neurophysiological responses to ripple noise stimuli, as previously measured in the auditory cortex of ferrets [ 18 ] . We refer to [ 8 ] for a complete mathematical description of this implementation, known as “full cortical model” [ 33 ] , and to [ 21 ] for a review of applications. A MATLAB implementation of STRF, including the synthesis of sounds from time-averaged (but not frequency-averaged) coefficients, was achieved by Sam Norman-Haigneré [ 32 ] 8 8 8 https://github.com/snormanhaignere/spectrotemporal-synthesis-v2 . We refer to [ 37 ] for an introduction to STRF in the interdisciplinary context of music cognition and music information retrieval (MIR). Recently, STRF has been applied to other tasks, such as bioacoustics [ 30 ] and industrial acoustics [ 20 ] . Another implementation of STRF was proposed in 2012 by [ 35 ] , under the name of Gabor filterbanks (GBFB), with applications to automatic keyword spotting in noisy environments. In music cognition, STRF is sometimes known under the name of “modulation power spectrum”, with applications to timbre perception research [ 39 ] . 5 Conclusion We have described a method to generate musical metamers from any audio recording. Our method is based on joint time–frequency scattering in Kymatio, an open-source software in Python which enables GPU computing and automatic differentiation. The advantage of our method is that it does not require any manual preprocessing, such as transcription, beat tracking, or source separation. Hence, it is suitable to any kind of audio signal, without need to postulate the presence of “Western classical” cues such as tonality, counterpoint, meter, or theme. Lastly, because the resynthesis operates by iterative refinement from a random initial guess, it is compatible with the methodological guidelines of reproducible research: by running the algorithm anew, one may generate an infinite number of independent metamers without compromising the practitioner’s ability to conduct counterfactual reasoning. In future work, we plan to use the generated metamers in the context of music cognition to as to test Honing’s hypothesis of multicomponent contour perception at various spectrotemporal scales.