Class TunedSynthNoteInstrument

java.lang.Object
All Implemented Interfaces:
Instrument, Namable, OutputProvider, Transposable, UpdatableInstrument, Tunable
Direct Known Subclasses:
Brass, JSynInsFromClassName, RingMod, SuperNoiseSwoop

public class TunedSynthNoteInstrument
extends FreqSynthNoteInstrument
implements Tunable
Deprecated.
use the pure Java JSyn2 package instead
A JMSL Instrument that plays a JSyn SynthNote.
Only difference between this and superclass FreqSynthNoteInstrument is that dimension 1 of this is pitch, not frequency Optional constructor passes in a BussedVoiceAllocator to make this polyphonic.
double[] passed to play must contain duration, pitch, amplitude, hold
duration and hold (sustain) is in seconds. pitch can be fractional (ie 60.5 is a qtr tone higher than middle c), amplitude is 0..1 Tuning provides frequency from pitchIndex. update() can be used to change the amplitde of a sustain synthnote. on() and off() are implemented here, giving the user a finer grain of control over the instrument
Author:
Nick Didkovsky, Nick.Didkovsky@mail.rockefeller.edu (C) 2000 Nick Didkovsky, all rights reserved.
  • Constructor Details

    • TunedSynthNoteInstrument

      public TunedSynthNoteInstrument()
      Deprecated.
      Constructor sets MusicDevice to JSynMusicDevice
    • TunedSynthNoteInstrument

      public TunedSynthNoteInstrument​(com.softsynth.jsyn.SynthNote synthNote, Tuning tuning) throws com.softsynth.jsyn.SynthException
      Deprecated.
      monophonic constructor
      Throws:
      com.softsynth.jsyn.SynthException
    • TunedSynthNoteInstrument

      public TunedSynthNoteInstrument​(BussedVoiceAllocatorMultiOut allocator, Tuning tuning) throws com.softsynth.jsyn.SynthException
      Deprecated.
      polyphonic constructor
      Throws:
      com.softsynth.jsyn.SynthException
    • TunedSynthNoteInstrument

      public TunedSynthNoteInstrument​(BussedVoiceAllocatorMultiOut allocator) throws com.softsynth.jsyn.SynthException
      Deprecated.
      polyphonic constructor
      Throws:
      com.softsynth.jsyn.SynthException
  • Method Details

    • setTuning

      public void setTuning​(Tuning t)
      Deprecated.
      defaults to 12TET but you change that here
      Specified by:
      setTuning in interface Tunable
    • getTuning

      public Tuning getTuning()
      Deprecated.
      Specified by:
      getTuning in interface Tunable
    • on

      public java.lang.Object on​(double playTime, double timeStretch, double[] dar)
      Deprecated.
      Allocate a SynthNote and call SynthNote.noteOn()
       double pitch = dar[1];
       double amp = dar[2];  //  0..1
       
      Specified by:
      on in interface Instrument
      Overrides:
      on in class FreqSynthNoteInstrument
      Returns:
      allocated Synthnote. play() refers to this returned object directly and calls synthNoteOff()
      See Also:
      Instrument.on(double, double, double[])
    • update

      public double update​(double playTime, double timeStretch, double[] dar)
      Deprecated.
      Update amplitude and frequency using (by default) dimension 1 as lookup to retrieve allocated synthnote. You may change this with setUpdateDimension()
      Specified by:
      update in interface Instrument
      Overrides:
      update in class FreqSynthNoteInstrument
    • main

      public static void main​(java.lang.String[] args)
      Deprecated.
      Create a polyphonic, stereo instrument, and play a MusicShape with it. Uses 13tet tuning with fractional pitches