code: def harmonic_synth(pitch, amplitudes, sampling_rate):
      n_harmonic = amplitudes.shape[-1]
      omega = torch.cumsum(2 * math.pi * pitch / sampling_rate, 1)
      omegas = omega * torch.arange(1, n_harmonic + 1).to(omega)
      signal = (torch.sin(omegas) * amplitudes).sum(-1, keepdim=True)
      return signal
  
imports: import math
  import librosa
  import numpy
  import torch
  import torch.fft
  import torch.nn
  from scipy.signal import get_window
label_desc: Use image node_id 12 for calling a global function with example usage: harmonic_synth(pitch, amplitudes, sampling_rate) and returns: signal