There has been some discussion in the past, on the
forum and on this  reflector, concerning the need for
a sine wave tone generator in RB. The usual work
around has been to use noteplayer and try to find a
midi sample that will come close to a pure tone. None
of them do. I've recently been doing some audio
development with Portaudio and RB and decided to whip
up a quick sine wave generator for Realbasic. This
project simply creates an array containing data
defining a sine wave. Portaudio then takes the wave
data and generates a tone at a specific volume and
frequency. I also added left/right panning. You should
be able to figure out how it all works by studying the
code. 

This project requires the Portaudio RB wrapper. The
Portaudio.framework folder MUST be located in the same
folder as the project file. The Portaudio RB wrapper
is OS X specific. It will only work with OS X. 

The project can be downloaded here: 

http://sight.net/rb/Tone.rbp (right click - save as)

Portaudio RB can be downloaded here:

http://www.macronsoft.com/pages/en/developers.html

To learn more about Portaudio:

http://portaudio.com

Many thanks go to Massimo Valle for his work with
Portaudio RB and to Ross Bencina and Phil Burk for
developing Portaudio.

Please email any comments or questions to david (at)
sight (dot) net.

Regards,

David Fleming

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to