class_docstr: Observation model for note transcription tracking with a HMM.
  
  Parameters
  ----------
  state_space : :class:`ADSRStateSpace` instance
      ADSRStateSpace instance.
  
  The observed probabilities for note onsets, sounding notes, and offsets are
  mapped to the states defined in the state space. The observation for
  'silence' is defined as 1 - p(onset), 'onset' as p(onset), 'decay' and
  'sustain' as p(note) and 'offset' as p(offset).
docstr: Computes the log densities of the observations.
  
  Parameters
  ----------
  observations : tuple with two numpy arrays
      Observations (i.e. 3d activations of the CNN).
  
  Returns
  -------
  numpy array
      Log densities of the observations.
docstr_tok: ["Computes","the","log","densities","of","the","observations",".","Parameters","--","--","--","--","--","observations",":","tuple","with","two","numpy","arrays","Observations","(","i.e",".","3d","activations","of","the","CNN",")",".","Returns","--","--","--","-","numpy","array","Log","densities","of","the","observations","."]
code: def log_densities(self, observations):
      """
      Computes the log densities of the observations.
  
      Parameters
      ----------
      observations : tuple with two numpy arrays
          Observations (i.e. 3d activations of the CNN).
  
      Returns
      -------
      numpy array
          Log densities of the observations.
  
      """
      # observations: notes, onsets, offsets
      densities = np.ones((len(observations), 4), dtype=float)
      # silence (not onset)
      densities[:, 0] = 1.0 - observations[:, 1]
      # attack: onset
      densities[:, 1] = observations[:, 1]
      # decay + sustain: note
      densities[:, 2] = observations[:, 0]
      # release: offset
      densities[:, 3] = observations[:, 2]
      # return the log densities
      return np.log(densities)
  
file_path: madmom/madmom/features/notes_hmm.py
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from madmom.ml.hmm import TransitionModel, ObservationModel
label_desc: Use image node_id 2 for calling the ADSRObservationModel obj's underlying member method code with example usage: obj.log_densities(observations) and returns: np