Oxygen Basic
Programming => Example Code => Audio => Topic started by: Charles Pegge on March 25, 2012, 03:13:37 PM
-
In the latest Oxygen-in-progress, there are 18 new demo progs dealing with Wave Audio. They use the lowest level audio API and all the sounds are generated from scratch, feeding pulse-codes directly into looped audio buffers, in chunks of about 1/40 of a second. - I have animation and games in mind!
With real-time audio synthesis, all the sounds can be unique and even slightly out of tune if so desired :)
Charles
They are located in examples/sound
-
Hi Charles,
where can I found the release containing these examples? On the website and sourceforge I can still see "just" the Alpha 038.
Thanks,
Petr
-
Hi Petr,
The primary updates are here
http://www.oxygenbasic.org/downloads.htm
The in-progress version is near the end of the list. Alpha 39 coming soon!
Charles
-
Hi Carles,
is only a hellish noise. :D
If I close an example, then I get memory leaks.
-
It requires the new Oxygen.dll.
Does this standalone version work Peter? It should be melodious.
(Press Esc to terminate instantly.)
Charles
-
Hi Charles,
I cannot say melodious, but it works.
There is not enough volume for better hearing.
Do you have a mixer for playing 32 stereo sounds ? I mean, will the sounds mixed?
-
You can mix sounds by adding them together or create several waves and run them at the same time, or run alongside MIDI, or run several sound programs at the same time. The OS should be able to cope with all of these situations.
I've got quite a good sound system here - Having a large Woofer helps.
I Could produces bigger waves - currently using about 30% of peak amplitude
Charles
-
Hi Charles,
thanks for the help, the examples are great...
Only problem is that the few last ones produce a bit of additional noise ("cracks"), but I guess that is the fault of notebook sound card.
Petr
-
Charles, I got an error trying to run either example program:
ERROR:
Unidentified array or procedure
WORD: waveoutopen
The precompiled executable that you also posted, that did run and sounded fine.
-
Hi Petr,
I will do some more testing. It may be a latency problem producing the cracks. I have a friend with a Samsung laptop running Windows 7. - I'll see how it performs. Perhaps I cand post some more test pieces to you with different processing periods.
I found there was a slight hissing noise produced at the start on the compiled demo. This was cured by adding 'sleep 10' at the end of the WavoStart method in waves.inc.
Hi Kent,
I think you are running off an older Oxygen.dll, rather than the new one. There was a problem interpreting the wave audio C header: waves.h -( it would looker a lot cleaner in Basic.)
I have also made further changes to Oxygen in the last 24 hours, flushing out a few gremlins which came out of the woodwork when compiling the demos to 64 bit EXE. Yesterday was a hard day, but I caught them in the end.
Charles