BBC BASIC for Windows
Programming >> Sound, Music and Video >> write sound wave to file/ not output realtime
http://bb4w.conforums.com/index.cgi?board=multimedia&action=display&num=1303393872

write sound wave to file/ not output realtime
Post by Gavin Lee on Apr 21st, 2011, 1:51pm

Hi,
I've managed to use a tutorial I found on how to make my own created wave sound output in realtime (as opposed to playing from a file). And it works great. Apart from the slowness of my pc, which means stereo or higher sampling rates don't work.

I wondered if their is a simple way to write to a file rather than output to my sound card.

RE article on "Outputting real-time audio"

Re: write sound wave to file/ not output realtime
Post by admin on Apr 21st, 2011, 2:54pm

on Apr 21st, 2011, 1:51pm, Guest-Gavin Lee wrote:
I wondered if their is a simple way to write to a file rather than output to my sound card.

These programs include code for outputting a WAV file, which you can probably adapt:

http://tech.groups.yahoo.com/group/bb4w/files/Multimedia/wavsplit.bbc
http://tech.groups.yahoo.com/group/bb4w/files/Multimedia/wavpitch.bbc

Richard.
Re: write sound wave to file/ not output realtime
Post by Gavin Lee on Apr 28th, 2011, 5:58pm

Thanks,
Although am getting a bit confused with buffers not being needed and what variable to stick where. But I'm sure I just need to trim original programs down to bare bones remove buffers etc and write directly to wave with BPUT. I think I'm almost there, but if anyone has any obvious and or helpful hints please leave a message, (I'm editing wavesplit with create wave output in real time from post that was on forum).
When I complete the program I shall post it so people can use the write wave directly to file program.