Page 1 of 6
PortAudio for PB
Posted: Wed Jan 20, 2010 7:56 pm
by Trond
I'm posting it here so more people see it. PortAudio is quite cool because it is suited to generate audio on the fly.
Updated link:
http://turboupload.com/75g3c1u04u00
Dll only, recompiled with Vista/7 support:
http://turboupload.com/xifpxhxs6zu9 (not sure if it works ok)
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 3:39 am
by Blue Steel
what i'm after is a program that allows you to actually generate the sounds like you used to be able to to on older computers like the C64 .. where ytou don't need a darn .wav file or anything.. where you cxan generate say a sound from a iser definable wave form , frequence , pitch, duration , reverb , echo, volume ,attack , sustain , release etc...
and i've yet to find any language out there that 'll let you do that or any addons .. nothing.. nada.. i did find many years ago as program that could generate .wav files doing stuff like i'm after .. but not usable in a program. I DON'T want to PLAY any external file or resource .. I want to generate sound on the fly
is there anything out there like that...
PS: people really need to start naming Zip and distro files appropriatly .. not just setup or distro ..or demo .. start telling us by the name of the file what it is .. ie: PortAudio_for_PB.zip so that when we download it and get around to looking at it then we know what it is ..
Thanks
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 5:41 am
by idle
Thanks Trond, looks interesting
@blueSteel
Demivec posted a sound generator utility recently, though you could always do it your self.
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 9:18 am
by Shardik
Blue Steel,
have you already taken a look into flaith's retro sound generator? He used
his code example to generate the pacman and zelda sound:
http://purebasic.fr/english/viewtopic.php?t=36497
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 9:43 am
by Blue Steel
Thankls for that link.. looking into it now..
also i seaeched for "sound generator" and author "Demivec" and found nothing
but its starting to look more promising
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 12:26 pm
by Shardik
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 12:36 pm
by Blue Steel
hmmm... ok.. its not actual music i want to re-create but those noise sound effects from on the C64.. eg: the clash , bang , thump, footstep , and alike
I really don't know where to start.. i've been searching for years ..
I want to be able to convert my old C64 programs to PureBasic without having to load up an emulator and record all the sound effects into wav files or what ever.. I know it can be done because they are doing it in the emulators
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 1:34 pm
by Blue Steel
There are several source codes out there but i don't know anywhere near enough to convert or edit them to make like an addon (free of course) to any language .. via commands that will take the user input and pass it through the sound functions to convert it to a format windows can handle..
It shouldn't be all that hard to do really as some are written in C and some in java and some in C++ even one written in Pascal/Delphi just from doing a search around now
(BTW If a mod could please strip from my first pise in this thread into a new thread please.. I didn't / still don't want to hijack this one .. sorry)
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 1:41 pm
by Shardik
Have you taken a look into this thread? It's utilizing the retro sound generation
library SpotFX:
http://www.purebasic.fr/english/viewtopic.php?t=30657
Blue Steel wrote:If a mod could please strip from my first pise in this thread into a new thread please..
+1
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 3:24 pm
by Trond
Blue Steel wrote:what i'm after is a program that allows you to actually generate the sounds like you used to be able to to on older computers like the C64 .. where ytou don't need a darn .wav file or anything.. where you cxan generate say a sound from a iser definable wave form , frequence , pitch, duration , reverb , echo, volume ,attack , sustain , release etc...
and i've yet to find any language out there that 'll let you do that or any addons .. nothing.. nada.. i did find many years ago as program that could generate .wav files doing stuff like i'm after .. but not usable in a program. I DON'T want to PLAY any external file or resource .. I want to generate sound on the fly
is there anything out there like that...
This is supposed to be what you need. In the callback you specify the EXACT sample values to be sent to your soundcard. You don't need any wav files. Look at Tutorial.pb.
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 3:46 pm
by Blue Steel
sorry i can't see "Tutorial.pb" in the archive anywhere

Re: PortAudio for PB
Posted: Thu Jan 21, 2010 4:26 pm
by Trond
Oups, I mean Sine.pb.
Re: PortAudio for PB
Posted: Thu Jan 21, 2010 5:59 pm
by Demivec
Blue Steel wrote:Thankls for that link.. looking into it now..
also i seaeched for "sound generator" and author "Demivec" and found nothing
but its starting to look more promising
Here's a
link.
Re: PortAudio for PB
Posted: Fri Jan 22, 2010 1:55 am
by Blue Steel
Found it thanks ..

i've also found PJ's version and am looking into it too..
definatly looks like i've finaly located something i've been looking for for 20+ years.
I'll delve into your source code and studdy it.. and hopefully bew able to make it so that i can get it to take in the ADSR etc. values direct from my old C64 stuff (there seems to be a lot more settings in this than in those days)
Thanks one and all for your help
now to get PJ's one working i need tyo sort out the missing misc2 library

Re: PortAudio for PB
Posted: Fri Jan 22, 2010 5:33 am
by Blue Steel
ok using purebasic 4.41 how / where do i get the misc2 library (and any other libraries i may need)