Page 1 of 2

sweet sweet music

Posted: Thu Feb 17, 2005 10:53 pm
by ~XUS~
I spent some time coming up with some sweet music for my RPG Legendayron my synth, and recorded it all as .wav s. I can't, however, seem to find an ideal prog or routine to play these tunes in qbasic. I tried some version of DMAPlay by Mike Huff and T. Horie, but it requests a frequency in Hz, and depending on whether the number I choose is high or low, it only plays the high or low end of the .wav file. If anyone knows of a prog that can play more than the first 32k of a .wav and that plays it all successfully, please share.

Posted: Thu Feb 17, 2005 10:55 pm
by ~XUS~
Also, totally unrelated, well, not TOTALLY, check out my band's website www.freewebs.com/poison_quote . We have a questbook, some stupid animation, and a sample track there, all for you the listeners.

Posted: Fri Feb 18, 2005 2:54 am
by Dr_Davenstein
You can try DS4QB++, but it doesn't like WinXP much at all... if any. :(

Posted: Sun Feb 20, 2005 6:05 am
by ~XUS~
How the heck are you so freakin' knowledgable?

Posted: Mon Feb 21, 2005 7:28 am
by Dr_Davenstein
I've just had alot of the same problems that most QBasic programmers have... Until I started using FreeBASIC. ;)

Posted: Mon Feb 21, 2005 10:33 pm
by ~XUS~
Hey doc. Sorry to keep crampin' your style with my pestering questions, but how would you go about loading a module into a program in Qb 4.5? Specifically, how would I load DS4QBPP.BAS as a module into my program? Also, is there anywhere that I can obtain Qb 7.5?

Posted: Mon Feb 21, 2005 10:34 pm
by ~XUS~
correction: 7.1

*jeese*

Posted: Mon Feb 21, 2005 10:45 pm
by ~XUS~
Nvm! Got 7.1! Even still; how would I go about loading DS4QBPP.BAS into my .BAS program? And when I compile my .BAS, would DS4QBPP.BAS, now being a module, also compile?

Posted: Tue Feb 22, 2005 6:40 pm
by ~XUS~
Ha ha! Nvm. 7.1 solved all. However, I'm still having trouble running the thing. I don't know if you're farmiliar with it, but it calls for INTERRUPTX on line 10 of DS4QBPP.BAS:FileExist. INTERRUPTX, however, doesn't seem to exist. What gives?

Posted: Tue Feb 22, 2005 11:35 pm
by Dr_Davenstein
You need to include QBX.BI. At the top of your program, type exactly this:

Code: Select all

'$INCLUDE:'QBX.BI'
If it can't find the file, you need to set your paths.

In QB, goto Options/Set Paths:

In the Include Files field, type in the directory where QBX.BI is located.

In the Library Files field, type in the directory where QBX.QLB is located.

Then you have to start QB with the library loaded. To me, the easiest way to do it is to create a shortcut to QB on the desktop.

Right click on the shortcut, then manually add the library name... like this:

Code: Select all

C:\QBX\QBX.exe /L QBX
From now on, when you start QB using that shortcut, it will start with the library already loaded. ;)

Posted: Wed Feb 23, 2005 2:18 am
by ~XUS~
GAH!!! I'm frustrated! I put a music file on my C: drive, said 'DS4QB.LoadMusic 1, "C:\Legend.wav", DEFAULT', and it said it couldn't find the freakin' file! That's like asking some jack ass to point to his nose and he points to his frickin' tongue. I've tried the CHDIR command, I've tried using an MP3, I've tried talking to the computer, and NOTHING WORKS! If anyone actually cares, the error comes up in the sub/function/I don't remember DS4QB.ReadySend, at line 6. I doubt I'll get a response, but if you know anything at all, please share; I'm so frickin' pissed off I kicked my computer and pulled out a chunk of hair.

Posted: Fri Feb 25, 2005 6:50 am
by Dr_Davenstein
Whoa!!! Chill out man! :lol:

You should always use relative paths. Like this...

Code: Select all

DS4QB.LoadSound 1, "/soundsys/Chomp.mp3", Current

What I did when I was using DS4QB, was create a directory to store my main program in, and name it after the program. Then, copy the whole soundsys directory from the DS4QB package and paste it into my directory. I just store all my sound files in the soundsys directory because it has to be there for DS4QB to work anyway.

Another thing... QB always starts in it's own default directory. To make it read from your directory without changing your code...

Press F6 to goto the immediate window.

Code: Select all

CHDIR "C:/WhereverYourDirectoryIs"
Hit Enter, then press F6 again to go back to the main QB window.

You don't want to add that line to the program because it wont need it once you compile...

Try not to rip any more hairs out! :lol:


One more thing... It might be a problem with WinXP. It HATES DS4QB++! :cry:

Posted: Mon Mar 14, 2005 10:59 pm
by ~XUS~
Well, with the whole F6 dealio that u suggested, I already have a few 'INCLUDE$' statements in the beginning that specify the path from which to "include". I then try to open the music a few lines down. Will all the directory stuff in the 'INCLUDE$' statements make the whole F6 dealio not work?

Posted: Tue Mar 15, 2005 5:37 am
by Dr_Davenstein
No. Unless the program is compiled, you will have to set the path manually.

Posted: Tue Mar 15, 2005 10:38 pm
by ~XUS~
Just in case i spend the rest of my life without getting DS4QB++ to work, from where do I get the "absolute" in the whole 'CALL ABSOLUTE' thing? I need it to maybe try running DMAPlay6