|
Post by Tom Mulgrew on May 29, 2006 18:12:33 GMT -5
I've released a "beta" version of Basic4GL with a new sound engine. www.basic4gl.net/Setup%20Basic4GL%20v2.4.0.exeThe sound engine uses OpenAL, can play multiple sounds at a time at different volumes and with optional looping, and can play Ogg Vorbis music files. It could use some testing. Also this version currently requires a handful of DLLs to be distributed with any standalone exe (whether it actually uses the sound engine or not), plus the OpenAL installer. (This is one of the reasons I'm releasing it as a "beta" test version for now. Once I fix this, and any other bugs that crop up, I'll bundle up a real version.) Anyway, the sound and music commands are documented in the "Programmers' guide" (from the Help menu). If anyone wants to have a play with it and give me their feedback, it would be appreciated. Cheers, -Tom
|
|
|
Post by jontm2010 on May 29, 2006 20:04:37 GMT -5
very impressive tom ;D!!! I tried it out, and it seems pretty cool
but question: are there any more commands other than the main ones in the programmers guide, besides playmusic, stopmusic, etc?
|
|
|
Post by davy on May 29, 2006 20:23:45 GMT -5
Tom, I highly respected you before... But now, you are god. lol. If you simply finish off the sound issue, and add an undim, I will not have any problems with basic4gl whatsoever... This is a great improvement!
|
|
stu
Posts a bit
Posts: 150
|
Post by stu on May 29, 2006 20:59:19 GMT -5
Tom, I bow down to you. Here I was, learning some other programming language to make my RPG idea, now I need look no further than Basic4GL. Great work!
|
|
|
Post by Tom Mulgrew on May 29, 2006 21:05:33 GMT -5
but question: are there any more commands other than the main ones in the programmers guide, besides playmusic, stopmusic, etc? Nope, they're the only ones there for now.. Is there a particular missing feature that you need?
|
|
|
Post by davy on May 29, 2006 21:09:20 GMT -5
Wow, I was able to make a simple drum beat really easily by recording a highhat, a bass, and a snair and using a simple count... This is really neat. This will allow for ALOT of things to come true in basic4gl. I give this VERY good feedback!
|
|
|
Post by Tom Mulgrew on May 29, 2006 21:16:22 GMT -5
Tom, I highly respected you before... But now, you are god. lol. If you simply finish off the sound issue, and add an undim, I will not have any problems with basic4gl whatsoever... This is a great improvement! Slightly off-topic, but you can achieve a similar effect to Undim, by using a pointer to an array, and using the "alloc" command. ' Dim a POINTER to an array dim &array(), i
' Allocate array alloc array, 10
' Now we can use array just like a regular array variable for i = 1 to 10: array(i) = 3: next for i = 1 to 10: print array(i): next: printr
' Allocate array again. Old array will be lost. alloc array, 20
' Use newly allocated array for i = 1 to 20: print array(i): next: printr The syntax is a little sloppy, and it has the drawback that the original array will "leak" (will remain in memory) until your program finishes. This may or may not be an issue depending on the size of the data you are allocating. (As a rough rule of thumb, 1 variable = 4 bytes. A 10 element array = 40 bytes etc). -Tom
|
|
|
Post by davy on May 29, 2006 21:21:10 GMT -5
Ok, here is my program to create a simple drum beat. You can change the sleep time to change the tempo, but it gets kindof distorted if its too fast... Also, please excuse the drum samples, they are very low quality (Im not a drummer, I play guitar... But I will probably write some programs that do some layering such as rythm+lead+drums+Bass) Here it is: p13.wikispaces.com/space/showimage/DrumBeat.zip
|
|
|
Post by matthew on May 30, 2006 7:57:04 GMT -5
Heard the Drum Riff Davy, Great Stuff. At last, support for Music, how Wonderful is that?
|
|
stu
Posts a bit
Posts: 150
|
Post by stu on May 30, 2006 14:13:49 GMT -5
The test app I used to try out the music and multiple sounds gave me an idea. You could have each drum sound play on the press of a key, kind of like a beatbox program or something.
|
|
exodus
Newish
Some witty comment here.
Posts: 23
|
Post by exodus on May 31, 2006 20:27:49 GMT -5
Tom this is most nice (sorry for the bad english) Basic4GL just took a giant leap.
|
|
|
Post by davy on May 31, 2006 20:35:09 GMT -5
I agree, the NUMBER ONE complaint I have seen about basic4gl was sound. Now the nay-sayers should have nothing to say nay about.
|
|
|
Post by James :) (aka Madcow) on Jun 5, 2006 1:04:50 GMT -5
another way to do an un dim is to write the data you want to keep in a file and tell basic to check if thares any data for that varible if not then don't dim
|
|
|
Post by James :) (aka Madcow) on Jun 5, 2006 1:06:08 GMT -5
undim is easy but they have one more thing to nay about :
rediming
|
|
|
Post by Supermonkey on Jun 5, 2006 8:44:08 GMT -5
I think in toms example the data is resize dynamically, by reallocating the array pointer new memory, however you lose any data stored in the array, but there are work arounds to this.
|
|