Package com.softsynth.jmsl.jsyn
Class SimpleSamplePlayingInstrumentWithLoops
java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrumentWithLoops
- All Implemented Interfaces:
Editable
,Instrument
,Namable
,OutputProvider
,Transposable
,AttributeBuildable
,DirectorySettable
,HandleSpecialXMLTag
- Direct Known Subclasses:
TransposingSamplePlayingInstrument
,TransposingSampleSustainingInstrument
public class SimpleSamplePlayingInstrumentWithLoops extends SimpleSamplePlayingInstrument
Deprecated.
use the pure Java JSyn2 package instead
This class is not used directly. It is a subclass of SimpleSamplePlaying instrument adding a
hashtable of sample loop regioners, and provides a common superclass for both
TransposingSamplePlayingInstrument and TransposingSampleSustainngInstrument
- Author:
- Nick Didkovsky, nick@didkovsky.com (C) 2001 Nick Didkovsky, all rights reserved.
- See Also:
TransposingSamplePlayingInstrument
-
Field Summary
Fields inherited from class com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
POLYPHONY
-
Constructor Summary
Constructors Constructor Description SimpleSamplePlayingInstrumentWithLoops()
Deprecated.SimpleSamplePlayingInstrumentWithLoops(java.lang.String sampleDirectory)
Deprecated.constructor. -
Method Summary
Modifier and Type Method Description void
addSamplePitch(com.softsynth.jsyn.SynthSample sample, int noteIndex)
Deprecated.Assign a dynamically created sample to a note index.void
clear()
Deprecated.remove all samples and pitch mappingsSampleLoopRegioner
getSampleLoopRegioner(int pitchIndex)
Deprecated.java.util.Hashtable
getSampleLoopRegioners()
Deprecated.void
loadSample(java.lang.String filename, int noteIndex)
Deprecated.double
play(double playTime, double timeStretch, double[] dar)
Deprecated.If there is a sample loaded at dar[1], bang it.Methods inherited from class com.softsynth.jmsl.jsyn.SimpleSamplePlayingInstrument
addEditListener, addSamplePitch, addSamplePitch, buildFromAttributes, close, edit, getAlternativeSampleIndex, getDirectory, getEditEnabled, getNumChannels, getNumOutputs, getOutput, getOutput, getPitches, getSampleFilename, getSynthSamples, getTuning, getVoices, handleSpecialTag, main, 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 Details
-
SimpleSamplePlayingInstrumentWithLoops
public SimpleSamplePlayingInstrumentWithLoops()Deprecated. -
SimpleSamplePlayingInstrumentWithLoops
public SimpleSamplePlayingInstrumentWithLoops(java.lang.String sampleDirectory)Deprecated.constructor. sample directory string must end in dir delimitter, ex "F:\samples\"
-
-
Method Details
-
loadSample
public void loadSample(java.lang.String filename, int noteIndex) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
addSamplePitch
public void addSamplePitch(com.softsynth.jsyn.SynthSample sample, int noteIndex)Deprecated.Description copied from class:SimpleSamplePlayingInstrument
Assign a dynamically created sample to a note index. If you do this you will not be able to save/reload. You are committed to runtime building- Overrides:
addSamplePitch
in classSimpleSamplePlayingInstrument
-
clear
public void clear()Deprecated.Description copied from class:SimpleSamplePlayingInstrument
remove all samples and pitch mappings- Overrides:
clear
in classSimpleSamplePlayingInstrument
-
getSampleLoopRegioners
public java.util.Hashtable getSampleLoopRegioners()Deprecated.- Returns:
- Hashtable of SampleLoopRegioner (where key = Integer(pitchIndex), SampleLoopRegioner contains info about loop points in samples associated with pitchIndex)
-
getSampleLoopRegioner
Deprecated.- Returns:
- SampleLoopRegioner associated with pitchIndex. contains info about loop points in samples
-
play
public double play(double playTime, double timeStretch, double[] dar)Deprecated.Description copied from class:SimpleSamplePlayingInstrument
If there is a sample loaded at dar[1], bang it. No sustain, no transposition. Hold time is not used to terminate sample early.- Specified by:
play
in interfaceInstrument
- Overrides:
play
in classSimpleSamplePlayingInstrument
-