code: def chroma(
      sr,
      n_fft,
      n_chroma=12,
      tuning=0.0,
      ctroct=5.0,
      octwidth=2,
      norm=2,
      base_c=True,
      dtype=np.float32,
  ):
      """Create a chroma filter bank.
  
      This creates a linear transformation matrix to project
      FFT bins onto chroma bins (i.e. pitch classes).
  
  
      Parameters
      ----------
      sr        : number > 0 [scalar]
          audio sampling rate
  
      n_fft     : int > 0 [scalar]
          number of FFT bins
  
      n_chroma  : int > 0 [scalar]
          number of chroma bins
  
      tuning : float
          Tuning deviation from A440 in fractions of a chroma bin.
  
      ctroct    : float > 0 [scalar]
  
      octwidth  : float > 0 or None [scalar]
          ``ctroct`` and ``octwidth`` specify a dominance window:
          a Gaussian weighting centered on ``ctroct`` (in octs, A0 = 27.5Hz)
          and with a gaussian half-width of ``octwidth``.
  
          Set ``octwidth`` to `None` to use a flat weighting.
  
      norm : float > 0 or np.inf
          Normalization factor for each filter
  
      base_c : bool
          If True, the filter bank will start at 'C'.
          If False, the filter bank will start at 'A'.
  
      dtype : np.dtype
          The data type of the output basis.
          By default, uses 32-bit (single-precision) floating point.
  
      Returns
      -------
      wts : ndarray [shape=(n_chroma, 1 + n_fft / 2)]
          Chroma filter matrix
  
      See Also
      --------
      librosa.util.normalize
      librosa.feature.chroma_stft
  
      Notes
      -----
      This function caches at level 10.
  
      Examples
      --------
      Build a simple chroma filter bank
  
      >>> chromafb = librosa.filters.chroma(22050, 4096)
      array([[  1.689e-05,   3.024e-04, ...,   4.639e-17,   5.327e-17],
             [  1.716e-05,   2.652e-04, ...,   2.674e-25,   3.176e-25],
      ...,
             [  1.578e-05,   3.619e-04, ...,   8.577e-06,   9.205e-06],
             [  1.643e-05,   3.355e-04, ...,   1.474e-10,   1.636e-10]])
  
      Use quarter-tones instead of semitones
  
      >>> librosa.filters.chroma(22050, 4096, n_chroma=24)
      array([[  1.194e-05,   2.138e-04, ...,   6.297e-64,   1.115e-63],
             [  1.206e-05,   2.009e-04, ...,   1.546e-79,   2.929e-79],
      ...,
             [  1.162e-05,   2.372e-04, ...,   6.417e-38,   9.923e-38],
             [  1.180e-05,   2.260e-04, ...,   4.697e-50,   7.772e-50]])
  
  
      Equally weight all octaves
  
      >>> librosa.filters.chroma(22050, 4096, octwidth=None)
      array([[  3.036e-01,   2.604e-01, ...,   2.445e-16,   2.809e-16],
             [  3.084e-01,   2.283e-01, ...,   1.409e-24,   1.675e-24],
      ...,
             [  2.836e-01,   3.116e-01, ...,   4.520e-05,   4.854e-05],
             [  2.953e-01,   2.888e-01, ...,   7.768e-10,   8.629e-10]])
  
      >>> import matplotlib.pyplot as plt
      >>> fig, ax = plt.subplots()
      >>> img = librosa.display.specshow(chromafb, x_axis='linear', ax=ax)
      >>> ax.set(ylabel='Chroma filter', title='Chroma filter bank')
      >>> fig.colorbar(img, ax=ax)
      """
  
      wts = np.zeros((n_chroma, n_fft))
  
      # Get the FFT bins, not counting the DC component
      frequencies = np.linspace(0, sr, n_fft, endpoint=False)[1:]
  
      frqbins = n_chroma * hz_to_octs(
          frequencies, tuning=tuning, bins_per_octave=n_chroma
      )
  
      # make up a value for the 0 Hz bin = 1.5 octaves below bin 1
      # (so chroma is 50% rotated from bin 1, and bin width is broad)
      frqbins = np.concatenate(([frqbins[0] - 1.5 * n_chroma], frqbins))
  
      binwidthbins = np.concatenate(
          (np.maximum(frqbins[1:] - frqbins[:-1], 1.0), [1])
      )
  
      D = np.subtract.outer(
          frqbins, np.arange(0, n_chroma, dtype="d")
      ).T
  
      n_chroma2 = np.round(float(n_chroma) / 2)
  
      # Project into range -n_chroma/2 .. n_chroma/2
      # add on fixed offset of 10*n_chroma to ensure all values passed to
      # rem are positive
      D = (
          np.remainder(D + n_chroma2 + 10 * n_chroma, n_chroma)
          - n_chroma2
      )
  
      # Gaussian bumps - 2*D to make them narrower
      wts = np.exp(
          -0.5 * (2 * D / np.tile(binwidthbins, (n_chroma, 1))) ** 2
      )
  
      # normalize each column
      wts = normalize(wts, norm=norm, axis=0)
  
      # Maybe apply scaling for fft bins
      if octwidth is not None:
          wts *= np.tile(
              np.exp(
                  -0.5
                  * (((frqbins / n_chroma - ctroct) / octwidth) ** 2)
              ),
              (n_chroma, 1),
          )
  
      if base_c:
          wts = np.roll(wts, -3 * (n_chroma // 12), axis=0)
  
      # remove aliasing columns, copy to ensure row-contiguity
      return np.ascontiguousarray(
          wts[:, : int(1 + n_fft / 2)], dtype=dtype
      )
  
file_path: nnAudio/Installation/nnAudio/librosa_functions.py
imports: import numpy
  import warnings
label_desc: Use image node_id 9 for calling a global function with example usage: chroma(sr, n_fft, n_chroma, tuning, ctroct, octwidth, norm, base_c, dtype) and returns: np