AudioClip

eu.joaocosta.minart.audio.AudioClip
See theAudioClip companion object
final case class AudioClip(wave: AudioWave, duration: Double) extends Double => Double

Audio Clip represented by a wave and a duration.

Attributes

duration

duration of this audio wave in seconds

wave

audio wave storing this clip

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Double => Double
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Appends an AudioClip to this one

Appends an AudioClip to this one

Attributes

def byteIterator(sampleRate: Double): Iterator[Byte]

Samples this wave at the specified sample rate and returns an iterator of Bytes in the [-127, 127] range.

Samples this wave at the specified sample rate and returns an iterator of Bytes in the [-127, 127] range.

Attributes

def changeSpeed(multiplier: Double): AudioClip

Speeds up/down this clip according to a multiplier

Speeds up/down this clip according to a multiplier

Attributes

Contramaps the values of the wave of this clip. The duration stays unchanged

Contramaps the values of the wave of this clip. The duration stays unchanged

Attributes

def drop(time: Double): AudioClip

Returns a new Audio Clip without the first time seconds of this audio clip

Returns a new Audio Clip without the first time seconds of this audio clip

Attributes

Flatmaps the wave of this clip. The duration stays unchanged

Flatmaps the wave of this clip. The duration stays unchanged

Attributes

def iterator(sampleRate: Double): Iterator[Double]

Samples this wave at the specified sample rate and returns an iterator of Doubles in the [-1, 1] range.

Samples this wave at the specified sample rate and returns an iterator of Doubles in the [-1, 1] range.

Attributes

Maps the values of this wave.

Maps the values of this wave.

Attributes

def numSamples(sampleRate: Double): Int

Returns the number of samples required to store this wave at a certain sample rate.

Returns the number of samples required to store this wave at a certain sample rate.

Attributes

Returns an audio wave that repeats this clip forever

Returns an audio wave that repeats this clip forever

Attributes

Returns a reversed version of this wave

Returns a reversed version of this wave

Attributes

def take(time: Double): AudioClip

Returns a new Audio Clip with the first time seconds of this audio clip

Returns a new Audio Clip with the first time seconds of this audio clip

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Function1 -> Any

Combines this clip with another by combining their values using the given function.

Combines this clip with another by combining their values using the given function.

Attributes

Combines this clip with a wave by combining their values using the given function.

Combines this clip with a wave by combining their values using the given function.

Attributes

Inherited methods

def andThen[A](g: Double => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => Double): A => R

Attributes

Inherited from:
Function1

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product