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