Package uk.ac.qmul.eecs.depic.daw.beads
Class BeadsSoundEngineFactory
- java.lang.Object
-
- uk.ac.qmul.eecs.depic.daw.beads.BeadsSoundEngineFactory
-
- All Implemented Interfaces:
- SoundEngineFactory
public class BeadsSoundEngineFactory extends java.lang.Object implements SoundEngineFactory
Beads implementation of theSoundEngineFactory
. All the object returned are typed with classes of this package. Therefore all the classes use the same Beads library and enjoy package access with one another. Also they can be safely downcasted in order to get full functionality. For example increateParameter
the argument of typeSoundWave
is downcasted toBeadsSoundWave
. This is guaranteed to be safe because the way SoundWave objects are created is through thecreateSoundWave
method, which returns a BeadsSoundWave. This is in the spirit of the Facade design pattern. So a unique point of access to the package object guarantees all the objects come from that package, despite implementing interfaces which are defined outside.
-
-
Constructor Summary
Constructors Constructor and Description BeadsSoundEngineFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Parameter
createParameter(Parameter.Type type, SoundWave wave)
Sample
createSample(java.lang.String fileAbsolutePath)
SoundWave
createSoundWave()
Sonification
getSharedSonification()
BeadsSoundEngineFactory
setSoundWaveParameters(int minChunk, int maxScaleFactor, int initialScaleFactor)
-
-
-
Method Detail
-
createSoundWave
public SoundWave createSoundWave()
- Specified by:
createSoundWave
in interfaceSoundEngineFactory
-
setSoundWaveParameters
public BeadsSoundEngineFactory setSoundWaveParameters(int minChunk, int maxScaleFactor, int initialScaleFactor)
-
createParameter
public Parameter createParameter(Parameter.Type type, SoundWave wave)
- Specified by:
createParameter
in interfaceSoundEngineFactory
-
getSharedSonification
public Sonification getSharedSonification()
- Specified by:
getSharedSonification
in interfaceSoundEngineFactory
-
createSample
public Sample createSample(java.lang.String fileAbsolutePath) throws java.lang.Exception
- Specified by:
createSample
in interfaceSoundEngineFactory
- Throws:
java.lang.Exception
-
-