aUCBLogo Demos and Tests / makewav
to makewav
rate=44100
size=rate
openWriteBin "tmp.wav
setWriter "tmp.wav
type [RIFF]
typebin 4+8+8+16+size*2
type [WAVE]
type [fmt\ ]
typebin 16
typebin int16 1
typebin int16 1
typebin rate
typebin rate*2
typebin int16 2
typebin int16 16
type [data]
typebin size*2
repeat size
[ phi=360*repcount/rate
typebin int16 16383*( (sin 40*phi)
- (sin 41*phi) )
]
setWriter []
close "tmp.wav
playWave "tmp.wav 1+8
ignore readChar
playWave [] 0
end