jmsltutorial
Class CelloSampleSustainingIns
java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrumentWithLoops
com.softsynth.jmsl.jsyn.TransposingSampleSustainingInstrument
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
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.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 |
CelloSampleSustainingIns
public CelloSampleSustainingIns()
CelloSampleSustainingIns
public CelloSampleSustainingIns(java.lang.String sampleDirectory)
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