Interface SoundWave

  • All Superinterfaces:
    Wave


    public interface SoundWave
    extends Wave
    A sound wave, the usual artifact used to represent audio visually
    • Method Detail

      • addSoundWaveListener

        void addSoundWaveListener(SoundWaveListener l)
        Adds a SoundWaveListener to this SoundWave. The listener will be notified when a happens. Adding twice the same object (as per the equals()) as well as adding null will have no effect.
        Parameters:
        l - the listener to add to this SoundWave
      • removeSoundWaveListener

        void removeSoundWaveListener(SoundWaveListener l)
        Removes l 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 a BufferedInputStream before being used.
        propertyChangelistener -
      • stopLoading

        void stopLoading(boolean mayInterruptIfRunning)
      • close

        void close()
        Disposes the current audio data. Registered SoundWaveListener objects are notified with a CLOSE event. A call to this method has no effect if no audio data is loaded.
      • getDbWave

        DbWave getDbWave()
      • generatePeakMeter

        void generatePeakMeter(boolean generate)
      • 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. Registered SoundWaveListener objects are notified with a SELECTION_CHANGED event.
        Parameters:
        selection - the new selection. Using null or Selection.VOID_SELECTION will remove the selection
      • setPosition

        void setPosition(int position)
        Sets a new position for this sound wave. Registered SoundWaveListener objects are notified with a POSITION_CHANGED event. The event argument is an open Selection 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
      • getParametersControl

        ParametersControl getParametersControl()
        The current Automation
        Returns:
        the current Automation object or null if no sample is loaded and