package sampled
This is one of O1’s sound packages (the other being o1.sound.midi). This package provides a simple interface for loading recorded sound samples.
The contents of the package have aliases in the top-level package o1, so they are
accessible to students simply via import o1._.
- Alphabetic
- By Inheritance
- sampled
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait Sound extends AnyRef
Each instance of this trait represents a recorded sound sample.
Each instance of this trait represents a recorded sound sample.
You create
Sounds with the methods on the companion object:Sound("my_sound_file.wav"). The supported formats are WAV, AIFF, AU, AIFC, and SND.This trait has an alias in the top-level package o1, so it’s accessible to students simply via
import o1._.This type is essentially a wrapper around the key functionality in javax.sound.Sampled, especially its Clip class.
Value Members
- val KeepRepeating: Int
a constant that you can pass to play to make the sound repeat indefinitely
- val Mute: Float
a constant that you can pass to various methods in this package to silence a sound sample completely
- object Sound
This companion object of class
Soundprovides methods for creating newSoundobjects.This companion object of class
Soundprovides methods for creating newSoundobjects. It has an alias in the top-level package o1, so it’s accessible to students simply viaimport o1._.