Class NullMixer

java.lang.Object
com.softsynth.jmsl.NullMixer
All Implemented Interfaces:
Mixer, PanAmpListener

public class NullMixer
extends java.lang.Object
implements Mixer
This Mixer does very little other than implement some methods for debugging and development. You can add Instruments to this mixer but don't expect them to do anything.
Author:
Nick Didkovsky, email: nick@didkovsky.com, (c) 2003 Nick Didkovsky, all rights reserved.
  • Constructor Summary

    Constructors
    Constructor Description
    NullMixer()  
  • Method Summary

    Modifier and Type Method Description
    int addInstrument​(Instrument ins)
    When Instruments are added to this Mixer, they are implicitely associated with an autoincrementing fader index.
    int addInstrument​(Instrument ins, double pan, double amp)
    add Instrument with initial pan and amp values.
    double getAmp​(int faderIndex)  
    int[] getFaderIndexes​(Instrument ins)
    faders index(es) associated with an instrument, or NULL if not found
    boolean getFaderMute​(int faderNumer)
    FALSE
    boolean getFaderSolo​(int faderNumer)
    FALSE
    java.awt.Component getGUIComponent()  
    Instrument getInstrument​(int faderIndex)
    Get instrument associated with fader index (some instruments may have more than one fader, so you cannot assume fader n goes with ins n)
    int getNumFaders()  
    double getPan​(int faderIndex)  
    static void main​(java.lang.String[] args)  
    void muteChange​(int faderIndex, boolean flag)  
    void panAmpChange​(int faderIndex, double pan, double amp)  
    void removeInstrument​(Instrument ins)
    Remove all faders associated with this instrument
    void repatch​(Instrument ins)
    Does nothing
    void setFaderMute​(int faderNumber, boolean flag)
    Does nothing
    void setFaderSolo​(int faderNumber, boolean flag)
    Does nothing
    void soloChange​(int faderIndex, boolean flag)  
    void start()  
    void stop()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NullMixer

      public NullMixer()
  • Method Details

    • addInstrument

      public int addInstrument​(Instrument ins)
      Description copied from interface: Mixer
      When Instruments are added to this Mixer, they are implicitely associated with an autoincrementing fader index.
      Specified by:
      addInstrument in interface Mixer
      Returns:
      number of new faders added to mixer by adding this instrument
    • addInstrument

      public int addInstrument​(Instrument ins, double pan, double amp)
      Description copied from interface: Mixer
      add Instrument with initial pan and amp values. Both pan and amp range 0..1
      Specified by:
      addInstrument in interface Mixer
    • removeInstrument

      public void removeInstrument​(Instrument ins)
      Description copied from interface: Mixer
      Remove all faders associated with this instrument
      Specified by:
      removeInstrument in interface Mixer
    • repatch

      public void repatch​(Instrument ins)
      Does nothing
      Specified by:
      repatch in interface Mixer
    • setFaderMute

      public void setFaderMute​(int faderNumber, boolean flag)
      Does nothing
      Specified by:
      setFaderMute in interface Mixer
    • setFaderSolo

      public void setFaderSolo​(int faderNumber, boolean flag)
      Does nothing
      Specified by:
      setFaderSolo in interface Mixer
    • getFaderMute

      public boolean getFaderMute​(int faderNumer)
      FALSE
      Specified by:
      getFaderMute in interface Mixer
    • getFaderSolo

      public boolean getFaderSolo​(int faderNumer)
      FALSE
      Specified by:
      getFaderSolo in interface Mixer
    • muteChange

      public void muteChange​(int faderIndex, boolean flag)
      Specified by:
      muteChange in interface PanAmpListener
    • soloChange

      public void soloChange​(int faderIndex, boolean flag)
      Specified by:
      soloChange in interface PanAmpListener
    • getInstrument

      public Instrument getInstrument​(int faderIndex)
      Description copied from interface: Mixer
      Get instrument associated with fader index (some instruments may have more than one fader, so you cannot assume fader n goes with ins n)
      Specified by:
      getInstrument in interface Mixer
    • getFaderIndexes

      public int[] getFaderIndexes​(Instrument ins)
      Description copied from interface: Mixer
      faders index(es) associated with an instrument, or NULL if not found
      Specified by:
      getFaderIndexes in interface Mixer
    • getNumFaders

      public int getNumFaders()
      Specified by:
      getNumFaders in interface Mixer
    • start

      public void start()
      Specified by:
      start in interface Mixer
    • stop

      public void stop()
      Specified by:
      stop in interface Mixer
    • panAmpChange

      public void panAmpChange​(int faderIndex, double pan, double amp)
      Specified by:
      panAmpChange in interface PanAmpListener
    • getPan

      public double getPan​(int faderIndex)
      Specified by:
      getPan in interface Mixer
    • getAmp

      public double getAmp​(int faderIndex)
      Specified by:
      getAmp in interface Mixer
    • main

      public static void main​(java.lang.String[] args)
    • getGUIComponent

      public java.awt.Component getGUIComponent()
      Specified by:
      getGUIComponent in interface Mixer