Package uk.ac.qmul.eecs.depic.daw
Interface SoundWave
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static interface
SoundWave.TransportControl
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
FILE_ERROR_PROPERTY
static int
FILE_LOAD_TOTAL_PROGRESS
static int
MIN_SUPPORTED_CHUNK_SIZE
static int
STOP_SCANNING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addSoundWaveListener(SoundWaveListener l)
Adds aSoundWaveListener
to thisSoundWave
.void
close()
Disposes the current audio data.void
generatePeakMeter(boolean generate)
int
getCurrentChunkPosition()
DbWave
getDbWave()
SoundWaveEditor
getEditor()
java.util.List<java.lang.Integer>
getFramesPositionAt(int chuckPosition)
ParametersControl
getParametersControl()
The current Automationjavax.swing.JComponent[]
getPreferencesPanels()
SoundWave.TransportControl
getTransportControl()
void
loadAudioData(java.io.File audioFile, java.beans.PropertyChangeListener propertyChangelistener)
void
removeSoundWaveListener(SoundWaveListener l)
Removesl
from the listeners if it has been previously added.void
scan(int position)
void
setPosition(int position)
Sets a new position for this sound wave.void
setSelection(Selection selection)
Sets a new selection for this sound wave.void
stopLoading(boolean mayInterruptIfRunning)
-
Methods inherited from interface uk.ac.qmul.eecs.depic.daw.Wave
getChunkAt, getChunkNum, getMaxScaleFactor, getMillisecPerChunk, getScaleFactor, getSequence, getWaveTime, hasSequence, setScaleFactor
-
-
-
-
Field Detail
-
FILE_ERROR_PROPERTY
static final java.lang.String FILE_ERROR_PROPERTY
- See Also:
- Constant Field Values
-
FILE_LOAD_TOTAL_PROGRESS
static final int FILE_LOAD_TOTAL_PROGRESS
- See Also:
- Constant Field Values
-
MIN_SUPPORTED_CHUNK_SIZE
static final int MIN_SUPPORTED_CHUNK_SIZE
- See Also:
- Constant Field Values
-
STOP_SCANNING
static final int STOP_SCANNING
- See Also:
- Constant Field Values
-
-
Method Detail
-
addSoundWaveListener
void addSoundWaveListener(SoundWaveListener l)
Adds aSoundWaveListener
to thisSoundWave
. The listener will be notified when a happens. Adding twice the same object (as per theequals()
) as well as addingnull
will have no effect.- Parameters:
l
- the listener to add to thisSoundWave
-
removeSoundWaveListener
void removeSoundWaveListener(SoundWaveListener l)
Removesl
from the listeners if it has been previously added.- Parameters:
l
- the listener to remove
-
loadAudioData
void loadAudioData(java.io.File audioFile, java.beans.PropertyChangeListener propertyChangelistener)
- Parameters:
stream
- a stream of audio data. The stream is wrapped with aBufferedInputStream
before being used.propertyChangelistener
-
-
stopLoading
void stopLoading(boolean mayInterruptIfRunning)
-
close
void close()
Disposes the current audio data. RegisteredSoundWaveListener
objects are notified with aCLOSE
event. A call to this method has no effect if no audio data is loaded.
-
getDbWave
DbWave getDbWave()
-
generatePeakMeter
void generatePeakMeter(boolean generate)
-
getTransportControl
SoundWave.TransportControl getTransportControl()
-
getCurrentChunkPosition
int getCurrentChunkPosition()
-
scan
void scan(int position)
-
getPreferencesPanels
javax.swing.JComponent[] getPreferencesPanels()
-
setSelection
void setSelection(Selection selection)
Sets a new selection for this sound wave. RegisteredSoundWaveListener
objects are notified with aSELECTION_CHANGED
event.- Parameters:
selection
- the new selection. Usingnull
orSelection.VOID_SELECTION
will remove the selection
-
setPosition
void setPosition(int position)
Sets a new position for this sound wave. RegisteredSoundWaveListener
objects are notified with aPOSITION_CHANGED
event. The event argument is an openSelection
whose start is the new position and scale factor is 1.- Parameters:
position
- the new position
-
getFramesPositionAt
java.util.List<java.lang.Integer> getFramesPositionAt(int chuckPosition)
- Parameters:
chuckPosition
-scaleFactor
-- Returns:
- or
-1
if chunkPosition is greater than the chunk number to less than 0
-
getEditor
SoundWaveEditor getEditor()
-
getParametersControl
ParametersControl getParametersControl()
The current Automation- Returns:
- the current
Automation
object ornull
if no sample is loaded and
-
-