jmsltutorial
Class CelloSampleSustainingIns

java.lang.Object
  extended by com.softsynth.jmsl.InstrumentAdapter
      extended by com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
          extended by com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrumentWithLoops
              extended by com.softsynth.jmsl.jsyn.TransposingSampleSustainingInstrument
                  extended by jmsltutorial.CelloSampleSustainingIns
All Implemented Interfaces:
Editable, Instrument, Namable, OutputProvider, Transposable, AttributeBuildable, DirectorySettable, HandleSpecialXMLTag

public class CelloSampleSustainingIns
extends TransposingSampleSustainingInstrument

A subclass of TransposingSampleSustainingInstrument which maps pitches to sound files, and transposes to fill in unmapped gaps, This class does a better job of sustaining than TransposingSamplePlayingInstrument, as it uses two sample players to manage the loop, and crossfades between them Copy and rename this example, change the buildFromAttributes() method. This example only maps one cello soundfile to middle C, to serve as an example without shipping a huge sample bank.

Author:
Nick Didkovsky, copyright 2004 Nick Didkovsky, all rights reserved

Field Summary
 
Fields inherited from class com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
POLYPHONY
 
Constructor Summary
CelloSampleSustainingIns()
           
CelloSampleSustainingIns(java.lang.String sampleDirectory)
           
 
Method Summary
 void buildFromAttributes()
           
static void main(java.lang.String[] args)
          Create an instance of this class and write it out as an XML file
 
Methods inherited from class com.softsynth.jmsl.jsyn.TransposingSampleSustainingInstrument
getCrossfadeDuration, getOutput, getOutput, play, setCrossfadeDuration
 
Methods inherited from class com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrumentWithLoops
addSamplePitch, clear, getSampleLoopRegioner, getSampleLoopRegioners, loadSample
 
Methods inherited from class com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
addEditListener, addSamplePitch, addSamplePitch, close, edit, getAlternativeSampleIndex, getDirectory, getEditEnabled, getNumChannels, getNumOutputs, getPitches, getSampleFilename, getSynthSamples, getTuning, getVoices, handleSpecialTag, notifyEditListeners, off, on, open, reload, removeEditListener, setDirectory, setEditEnabled, setNumChannels, setTuning, testSampleDirectory, writeSpecialXMLTags
 
Methods inherited from class com.softsynth.jmsl.InstrumentAdapter
getDimensionNameSpace, getInterpreter, getMixerClassName, getMusicDevice, getName, getTransposition, noteOff, noteOn, noteOnFor, setDimensionNameSpace, setInterpreter, setMixerClassName, setMusicDevice, setName, setTransposition, toString, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CelloSampleSustainingIns

public CelloSampleSustainingIns()

CelloSampleSustainingIns

public CelloSampleSustainingIns(java.lang.String sampleDirectory)
Method Detail

buildFromAttributes

public void buildFromAttributes()
Specified by:
buildFromAttributes in interface AttributeBuildable
Overrides:
buildFromAttributes in class TransposingSampleSustainingInstrument

main

public static void main(java.lang.String[] args)
Create an instance of this class and write it out as an XML file