Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound Command
#1
I am some-what familiar with the sound command and its parameters. My question is: How does QB64pe generate the tones? Does it have some kind of library of tones or some other method in generating the tones or perhaps accesses the hardware (sound card) directly?  Just curious...

Have a great Xmax and an even better New Year!!!

J
May your journey be free of incident. Live long and prosper.
Reply
#2
It's no use. I checked, and couldn't find a single cute librarian in all of those sound files.

QuickBASIC used sound libraries, and if you could cough up a few extra bucks, you could extend those sounds with a sound card like Sound Blaster. I didn't have one of those, because I had the good sense not to swallow money in the first place. If you've ever frequented a strip club, looking for a cute librarian, you'd understand.

So I imagine QB64 uses the same method, but maybe Santa Steve will unwrap the mystery for you. Right now I heard he has Vince on his lap, in another discussion thread, but should be along shortly. Ho, ho ho....

Pete
Reply
#3
Thanks Pete... I think... Moo Ha Ha Ha...
May your journey be free of incident. Live long and prosper.
Reply
#4
_SNDRAW might be the closest thing to what you're looking for
Reply
#5
(12-22-2022, 08:14 AM)johnno56 Wrote: I am some-what familiar with the sound command and its parameters. My question is: How does QB64pe generate the tones? Does it have some kind of library of tones or some other method in generating the tones or perhaps accesses the hardware (sound card) directly?  Just curious...

Cheers to you all in "Down Under" ...

I hope you could settle for one voice at a time. It's as Vince said if you'd like to play chords.

I was going to propose this certain QBPlay. There are two totally-different options. One I saw in source code for Purebasic long ago, and the other is on Github but it's a Windows application that creates wave files out of a "PLAY" string.

I have been checking out a few music programs (called "trackers") that emulate the manipulation of the FM chip of Soundblaster Pro or such other ancient soundcard. However they are clunky to use, for those of us not used to music production, or for someone like me who is not used to such severe constraints. One program is called Adtracker II which was started as project around 2017. It's available for 32-bit Linux (enable "multilib" mode on 64-bit) and Windows. It's not available for 64-bit Windows. (Careful, links below aren't "https"):

http://adlibtracker.net/downloads.php

Another program was written entirely with QuickBASIC v4.5 called BeniTracker that I discovered in the ancient Pete's site. It relies a lot on "CALL INTERRUPT" and other things which means it cannot be ported to QB64 as it is.

http://petesqbsite.com/downloads/sound.shtml
http://www.petesqbsite.com/downloads/bt18.zip
Reply
#6
(12-22-2022, 08:14 AM)johnno56 Wrote: I am some-what familiar with the sound command and its parameters. My question is: How does QB64pe generate the tones? Does it have some kind of library of tones or some other method in generating the tones or perhaps accesses the hardware (sound card) directly?  Just curious...

Have a great Xmax and an even better New Year!!!

J



From my understanding, QB64 uses sound fonts to make our beeps and bloop and various tones and noises.  In fact, you can load your own sound font, if you want one different than the default one we have under the hood: https://qb64phoenix.com/qb64wiki/index.php/$MIDISOUNDFONT
Reply
#7
Well that's font-astic!

Pete

And we heard him exclaim, as he sped out out sight
Merry Christmas to all, and tell Pete to go bite!
Reply
#8
Thank you guys for all the responses. "Soundfont" is a library I am familiar with (in "use" only and not understanding how it is put together) as I dabble in music notation... not very well mind you... lol

So... According to the 'wiki', one should be able to select/load a "sf2" soundfont... You just know I am going to test that... I have a collection of sf2 soundfonts that are just "itching" to be used...

I will keep you updated... Moo Ha Ha Ha...

J
May your journey be free of incident. Live long and prosper.
Reply
#9
Ok. I tested the "Default" soundfont with a midi file I have and it played very well. Then I tested the same midi file on the FluidR3_GM.sf2 (fluidsynth soundfont) and the sound was even better. I cannot post the soundfont as it is 148mb in size. But just want to let you know that, on my Linux machine, both "default" and "other" soundfonts seem to work very well.

My next question is in relation to 'channels'... When it comes to midi playback is QB64pe capable of being polyphonic?

Can an individual instrument be selected from the soundfont or must the soundfont be of only one instrument?

Can you guess where this line of questioning is going?  Moo Ha Ha Ha...

J
May your journey be free of incident. Live long and prosper.
Reply
#10
You have to keep your instrument in your sound font. No polygamy allowed in QB64.

Oh hell, I don't know. Does this help...

If a tree falls in the forest, on Steve, and Pete isn't there to see it... Is it still funny? Well, of course it is. Big Grin

Pete
Reply




Users browsing this thread: 2 Guest(s)