BBC BASIC for Windows
Programming >> Sound, Music and Video >> Images from sound visa versa
http://bb4w.conforums.com/index.cgi?board=multimedia&action=display&num=1438591024

Images from sound visa versa
Post by Torro on Aug 3rd, 2015, 08:37am

http://photosounder.com/

Would something like this be possible using the standard basic commands available or with minor extentions to libraries?
Re: Images from sound visa versa
Post by DDRM on Aug 4th, 2015, 09:11am

Hi Torro,

Hmmm. This one looks right up Richard's street, but unfortunately I understand that he has resigned from the group, at least temporarily.

I guess the short answer would be "yes" - you can load both sound files and image files into memory and reference them. In the manual, under "playing WAV files", it describes how to load a file into memory. If you know the header structure etc it should be straightforward to access the sound data, and use it to construct images which you could then manipulate.

You might want to put the images into DibSections, so you can access the memory directly - see here:
http://bb4w.wikispaces.com/Direct+screen+memory+access

That lot all takes you a little outside standard BB4W, but not far.

Having said all that, I don't think it's going to be a trivial exercise, and may not run fast enough, because won't you need to use Fourier transforms to convert the wav data into frequencies for display? That's something Richard would be very comfortable with (indeed, FFTW2DLL.DLL is available somewhere on the Yahoo group), and if it's in your skillset then you might be well in!

Hope that's helpful.

Best wishes,

D
Re: Images from sound visa versa
Post by David Williams on Aug 4th, 2015, 09:45am

on Aug 4th, 2015, 09:11am, DDRM wrote:
Hmmm. This one looks right up Richard's street, but unfortunately I understand that he has resigned from the group, at least temporarily.


Any idea why?


David.
--
Re: Images from sound visa versa
Post by Torro on Aug 4th, 2015, 09:54am

You mean like this ? http://rosettacode.org/wiki/Fast_Fourier_transform#BBC_BASIC

This guy of course is the real master http://minotaurproject.co.uk/neon.php