AbstractSound new playjust gives an error.
(SampledSound soundNamed: 'laugh') copy == (SampledSound soundNamed: 'laugh')
(SampledSound soundNamed: 'laugh') copy samples == (SampledSound soundNamed: 'laugh') samples
| example1 example2 | example1 _ SampledSound soundNamed: 'laugh'. example2 _ ((SampledSound soundNamed: 'camera') , (SampledSound soundNamed: 'croak')). (example1 sounds , example2 sounds) do: [:each | each playAndWaitUntilDone].
| exampleSound | exampleSound _ FMBassoonSound new. exampleSound addEnvelope: (VolumeEnvelope exponentialDecay: 0.95). exampleSound play.
| points envelope sound | points _ Array with: 0@0 with: 200@1.0 with: 350@0.7 with: 500@1.0 with: 900@0. envelope _ VolumeEnvelope points: points loopStart: 5 loopEnd: 5. sound _ FMClarinetSound new. sound addEnvelope: envelope. sound playAndWaitUntilDone. sound removeEnvelope: envelope. sound adjustVolumeTo: 1 overMSecs: 10. sound playAndWaitUntilDone.
(AbstractSound noteSequenceOn: FMSound flute2 from: #( (e5 0.5 500) (d5 0.5 300) (c5 0.5 350) (d5 0.5 300) (e5 0.5 500) (e5 0.5 300) (e5 1.0 350) (d5 0.5 400) (d5 0.5 300) (d5 1.0 330) (e5 0.5 400) (g5 0.5 300) (g5 1.0 500) )) storeWAVOnFileNamed: 'maryhadalittlelamb.wav'
(PluckedSound new setPitch: 'c5' dur: 1 loudness: 0.5) playAndWaitUntilDone. (PluckedSound new setPitch: 'g5' dur: 0.5 loudness: 0.5) playAndWaitUntilDone. (PluckedSound new setPitch: 'e5' dur: 0.5 loudness: 0.5) playAndWaitUntilDone. (PluckedSound new setPitch: 'c5' dur: 1 loudness: 0.5) playAndWaitUntilDone.
(PluckedSound new soundForMidiKey: 60 dur: 0.5 loudness: 0.57) playAndWaitUntilDone. (PluckedSound new soundForMidiKey: 67 dur: 0.5 loudness: 0.57) playAndWaitUntilDone. (PluckedSound new soundForMidiKey: 60 dur: 0.5 loudness: 0.57) playAndWaitUntilDone.
(PluckedSound new soundForPitch: 'c4' dur: 0.5 loudness: 0.57) playAndWaitUntilDone. (PluckedSound new soundForPitch: 'g4' dur: 0.5 loudness: 0.57) playAndWaitUntilDone. (PluckedSound new soundForPitch: 'c4' dur: 0.5 loudness: 0.57) playAndWaitUntilDone.
| aSound | aSound _ (PluckedSound new setPitch: 'c3' dur: 0.3 loudness: 0.6). 3 timesRepeat: [ aSound play. [aSound isPlaying] whileTrue: [(Delay forMilliseconds: 100) wait]. ].
| aSound | aSound _ FMSound new. aSound play. aSound pause. (Delay forMilliseconds: 1500) wait. aSound resumePlaying.
(PluckedSound new setPitch: 'c5' dur: 1 loudness: 0.5) play. (PluckedSound new setPitch: 'g5' dur: 1 loudness: 0.5) playAndWaitUntilDone. (PluckedSound new setPitch: 'b4' dur: 1 loudness: 0.5) play. (PluckedSound new setPitch: 'f5' dur: 1 loudness: 0.5) playAndWaitUntilDone. (PluckedSound new setPitch: 'c5' dur: 1 loudness: 0.5) play. (PluckedSound new setPitch: 529 dur: 1 loudness: 0.5) playAndWaitUntilDone.
PluckedSound new playChromaticRunFrom: 'c3' to: 'c5'. (Delay forMilliseconds: 100) wait. PluckedSound new playChromaticRunFrom: 'b3' to: 'a5'. (Delay forMilliseconds: 1000) wait. PluckedSound new playChromaticRunFrom: 'g5' to: 'c6'.
| soundBuffer sound | soundBuffer _ SoundBuffer newMonoSampleCount: 100. sound _ SampledSound soundNamed: 'laugh'. sound playSampleCount: 20 into: soundBuffer startingAt: 1. 1 to: 50 do: [:each | Transcript show: (soundBuffer at: each); space].
(SampledSound soundNamed: 'camera') viewSamples
| aSound | aSound _ (FMSound new) duration: 5. aSound play. [aSound isPlaying] whileTrue: [ Transcript cr; show: aSound samplesRemaining. ].
(FMClarinetSound new initialVolume: 0.7) playAndWaitUntilDone. (Delay forMilliseconds: 200) wait. (FMClarinetSound new initialVolume: 0.3) playAndWaitUntilDone.
7 timesRepeat: [ PluckedSound chromaticScale play. (Delay forMilliseconds: 1000 atRandom) wait. ].
(AbstractSound hiMajorScaleOn: FMSound flute2) play. (AbstractSound lowMajorScaleOn: FMSound bassoon1) play. (AbstractSound majorChordOn: FMSound brass1 from: 'c2') playAndWaitUntilDone. (AbstractSound majorChordOn: FMSound brass1 from: 'g2') playAndWaitUntilDone. (AbstractSound majorChordOn: FMSound brass1 from: 'db3') playAndWaitUntilDone. (AbstractSound majorChordOn: FMSound brass1 from: 'f#2') playAndWaitUntilDone. (AbstractSound majorChordOn: FMSound brass1 from: 'c1') playAndWaitUntilDone.
| aFugue | aFugue _ MixedSound new add: (AbstractSound bachFugueVoice1On: FMSound marimba) pan: 0.3; add: (AbstractSound bachFugueVoice2On: FMSound organ1) pan: 0.6; add: (AbstractSound bachFugueVoice3On: FMSound brass1) pan: 0.0; add: (AbstractSound bachFugueVoice4On: FMSound brass2) pan: 1.0. aFugue play.