jmsltutorial
Class CelloSampleIns

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.TransposingSamplePlayingInstrument
                  extended by jmsltutorial.CelloSampleIns
All Implemented Interfaces:
Editable, Instrument, Namable, OutputProvider, Transposable, AttributeBuildable, DirectorySettable, HandleSpecialXMLTag

public class CelloSampleIns
extends TransposingSamplePlayingInstrument

A subclass of TransposingSamplePlayingInstrument which maps pitches to sound files, and transposes to fill in unmapped gaps, Does a simple loop to sustain the sample over time. You will hear a possibly clicky repeat loop. For smoother sustain, see CelloSampleSustainingIns 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
CelloSampleIns()
           
CelloSampleIns(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.TransposingSamplePlayingInstrument
calcRateForTransposition, play
 
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, getOutput, getOutput, 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

CelloSampleIns

public CelloSampleIns()

CelloSampleIns

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

buildFromAttributes

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

main

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