Create and play *.wav files: Difference between revisions

From Cuis CookBook
Jump to navigation Jump to search
(imoprted)
(No difference)

Revision as of 21:17, 12 May 2025

Create a *.wav file
(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'.
Play a *.wav file
(SampledSound fromWaveFileNamed: 'maryhadalittlelamb.wav') play