Class FloatFMOsci

All Implemented Interfaces:
AbstractClockedSignalSource, AbstractSignalSource, Component, FloatClockedSignalSource, FloatSignalSource, Process, FloatSupplier

public class FloatFMOsci extends FloatStoredSignalSource
Two wave-table oscillators, the second with some detuning against the first's nominal frequency imposes a frequency modulation.
  • Field Details

  • Constructor Details

    • FloatFMOsci

      public FloatFMOsci(ConstantRealtimeContext rtc, FloatSignalSource nominalFrequency, FloatSignalSource fmFrequencyFactor, FloatSignalSource fmIndex, int tablePoints, FloatHarmonicSpectrum spectrumC, FloatHarmonicSpectrum spectrumM)
      Build two oscilators and make one modulated by the other.
                    +----------------------------------------------+
        fmIndex ---------------------------                        |
                    |              +-----+  \            +-----+   |
        fmFreqFact ------ * -------|Osc M| -- * --- + ---|Osc C|------- out
                    |   /          +-----+         /     +-----+   |
        nominalF --------------------------------/                 |
                    +----------------------------------------------+
       
      Parameters:
      nominalFrequency - the base frequency of the sounding oscillator.
      fmFrequencyFactor - multiplies the nominal frequency to that of the modulating oscillator.
      fmIndex - multiplies the output of the modulating oscillator. (=conventional "modulation index")
      tablePoints - the number of data in the wave tables
      spectrumC - the spectrum for the modulated oscillator
      spectrumM - the spectrum for the modulating oscillator
  • Method Details

    • step

      public void step()
      Description copied from interface: Process
      Signals a time event, executing a transition step for this process to the next observable state.

      The state of the process after successful completion of this method should be the n-th observable state, if Process.step() has been invoked n times since the last initialization via Process.init(). The behavior of this method is unspecified if Process.init() has not been invoked before.

      FIXME: Process.setRealtimeContext(eu.bandm.sig.adlib2.RealtimeContext)

      If this method completes abruptly by throwing an error or unchecked exception, the process state should be considered invalid.