Class SynthNoteInstrument

java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.SynthNoteInstrument
All Implemented Interfaces:
Instrument, Namable, NoteOnOff, OutputProvider, Transposable

public class SynthNoteInstrument
extends InstrumentAdapter
implements NoteOnOff
Deprecated.
use the pure Java JSyn2 package instead
A polyphonic Instrument that plays notes with a JSyn SynthNote. Uses Midi style velocity 0..127
SynthNoteInstrument defines noteOnFor which sustains a note event over time.
update() for SynthNoteInstrument does nothing. The default Interpreter for a SynthNoteInstrument is a NoteInterpreter. You might consider using TunedSynthNoteInstrument or JSynInsFromClassName instead which does not require that you build the allocator, and supports outputs with more than one part (stereo instruments for example), or use the more powerful SynthNoteAllPortsInstrument which gives timbral control over all input ports.
Author:
Phil Burk and Nick Didkovsky
See Also:
NoteInterpreter
  • Constructor Details

    • SynthNoteInstrument

      public SynthNoteInstrument()
      Deprecated.
    • SynthNoteInstrument

      public SynthNoteInstrument​(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
      Deprecated.
      Use no-args constructor, then setAllocator()
  • Method Details

    • setAllocator

      public void setAllocator​(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
      Deprecated.
    • setTuning

      public void setTuning​(Tuning tuning)
      Deprecated.
    • getTuning

      public Tuning getTuning()
      Deprecated.
    • getOutput

      public java.lang.Object getOutput()
      Deprecated.
      Implement JSynInstrument interface
      Specified by:
      getOutput in interface OutputProvider
      Overrides:
      getOutput in class InstrumentAdapter
      Returns:
      null
    • getOutput

      public java.lang.Object getOutput​(int part)
      Deprecated.
      same as getOutput(), only 1 part
      Specified by:
      getOutput in interface OutputProvider
      Overrides:
      getOutput in class InstrumentAdapter
      Returns:
      null
    • getNumOutputs

      public int getNumOutputs()
      Deprecated.
      Specified by:
      getNumOutputs in interface OutputProvider
      Overrides:
      getNumOutputs in class InstrumentAdapter
      Returns:
      0
    • noteOnFor

      public double noteOnFor​(double playTime, double holdTime, double pitch, double velocity)
      Deprecated.
      Play a note for a specified duration. Use MIDI style pitch and velocity.
      Specified by:
      noteOnFor in interface NoteOnOff
      Overrides:
      noteOnFor in class InstrumentAdapter
    • print

      public void print()
      Deprecated.
    • main

      public static void main​(java.lang.String[] args)
      Deprecated.
      Build an instrument and a MusicShape and play it polyphonically with a JSyn SynthNote. Use equal tempered 10 tone tuning. MusicShape's repeat() method halves the timestretch every repeat