I have a friend who has tinnitus, and he is trying to find a way to generate white noise across a specific hertz range, eg 2000-20000, while skipping a certain range in between (the idea is that you listen to white noise at everything except the range your tinnitus affects).

This is outside my expertise, and I know Codea isn’t strong in sound, but I thought I’d ask anyway if this sounds feasible.

White noise is equal power over a certain frequency range. While you can make notes of a certain frequency using the white noise waveform, I’m not sure what the pitch variables do to the frequency range. The other option is to build it yourself with soundbuffer, but it sounds tricky.

I think you can play your own wav sequence with codea, so in principle you should be able to create a noise sequence, fft it, whiten it, band-filter it, and inverse fft it, then play it. Would take quite some time to code it though.

Can’t you use the soundbuffer command to generate tones at a certain frequency from within Codea? Isn’t that how @Fred implemented a ‘notes’ table to generate notes at a certain frequency/pitch in his ABC Notation player… Just tossing it in the ring if this is an option… :-/