Oscillator

eu.joaocosta.minart.audio.Oscillator
See theOscillator companion object
final case class Oscillator(generator: Double => AudioWave) extends Double => AudioWave

Oscillator used to create periodic waves.

Attributes

generator

function used to generate a wave based on a frequency

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

Members list

Concise view

Value members

Concrete methods

def apply(frequency: Double): AudioWave

Generates an AudioWave with a certain frequency

Generates an AudioWave with a certain frequency

Attributes

frequency

audio wave frequency

def generate(frequency: Double, amplitude: Double): AudioWave

Generates an AudioWave with a certain frequency and amplitude

Generates an AudioWave with a certain frequency and amplitude

Attributes

ampitude

amplitude of the generated wave

frequency

audio wave frequency

def generateClip(duration: Double, frequency: Double, amplitude: Double, roundDuration: Boolean): AudioClip

Generates a audio clip with a certain duration.

Generates a audio clip with a certain duration.

It also allows rounding the duration to the closest cycle, to smoothly merge results from oscilators.

Attributes

amplitude

amplitude of the wave

duration

duration of the clip

frequncy

frequency to play

roundDuration

weather the duration should be rounded down to match a oscillator cycle

Maps the waves generated by this oscillator

Maps the waves generated by this oscillator

Attributes

f

function that maps one amplitude to another

Returns:

a new oscillator that generates the transformed waves

Inherited methods

def andThen[A](g: AudioWave => 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
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
Inherited from:
Function1