http://www.scribd.com/doc/59109262/FlexiBeatzII-Help
and here's the app's site:
http://flexibeatz.weebly.com/
There are tutorial videos on youtube as well.
The app relies on low-level Directsound 8 programming, and as a result it works fine on Win 2000, XP and I've had some reports that it also works on 32 bit Vista. However, I'm not prepared to make the adaptations necessary to get it to work on Windows 7, and I no longer wish to be subject to whatever combination of programming environments, OS's and Directsound versions Microsoft chooses to support at any given time
As a result, I got me some PureBasic, since the blurb says it is cross-platform, not subject to dll-hell and is a quick n easy compile. It is installed. I also downloaded PortAudio, since the blurb says PortAudio is "a free, cross-platform, open-source, audio I/O library. Third-party language bindings make it possible to call PortAudio from other programming languages including PureBasic". If you assume that I am not really familiar with either of these yet, could someone kindly show step-by-step what I need to do to play a simple tone with a given frequency and sampling rate using PureBasic and PortAudio. If you could show me how to set up the environments and start with PureBasic equivalent of something like the following I'd be very grateful (as you know, the following code in VB6 produces an array of a sine wave that swings between +1 and -1; I am not showing the DirectSound processing needed to play this through the soundcard though). Once shown, I should be able to take it from there...
Code: Select all
Dim T as Long
Dim SR as Long
Dim Phase as Single
Dim Phase_Add as Single
Dim ToneLen as Long
Dim OutWav()
Dim Pi2 as Double
Pi2 = 6.28318530717958 '2*Pi
SR = 44100 'Sampling Rate
F = 400 'Desired Frequency of tone
ToneLen = 20000 'Desired length of tone in samples
Redim OutWav(20000)
Phase_Add = F/SR
For T = 0 to ToneLen
OutWav(T) = Sin(Pi2*Phase)
Phase = Phase + Phase_Add
If Phase>1 Then Phase = Phase-1
Next T






