Class: CompositeSound

Environment: Siren
Superclass: Siren.VirtualSound
Category: Music-Sound
Instance variables: components
Indexed variables: objects

An instance of CompositeSound can be used to represent a sound constructed by "splicing together" sections of other sounds.
It uses its components collection to maintain sounds and sample ranges that have been pasted together.
It responds to sampleAt: and sampleAt:put: just like other sounds, but stores only its components list on files unless explicitly told to store samples.

Instance Variables:
components the "sub-sounds" of the CompositeSound

sample accessing

sampleAt: index
Answer the sample at the given index, mapping and paging as necessary.

private

rippleUpFrom: start adding: insert
Shift all the cues above the given one up by the given insert count.

accessing

on: aSound
Set the receiver's source sound.

paste: sound from: start to: stop at: index
Paste the designated section into the receiver.

testing

isComposite
Answer whether the receiver is a composite sound.

MetaClass: CompositeSound class

instance creation

on: source paste: newSound from: start to: stop at: index
Answer a CompositeSound derived from the argument pasting in the given sound at the given index.

examples

exampleView
Open a sound view on a ramp with a chunk of a sine pasted into it.