Sound's difficult?
Posted: Thu Feb 24, 2005 6:18 pm
Hiya guys.
I've been playing around with Purebasic for close to two years now, tinkering here and there. So, as a 2D-game advocate, remembering with fond memories such awesome games as those that appeared on my trusty old Commodore 64... I have come to this...
I've been looking for, and with no success, a way to recreate sounds like you'd hear from a real C64. No one seems to do a decent sound effects library that I can find. Some support basic wave-forms, but not the ability to shape them a lot, or do the craziest of things with them! So, I'd be forced to look for wav files from the net. I have WAV files! Its really about project size, and I think sound could be a lot less....
What annoys me most, is how quickly a project can get bloated with wav files for sound, and how people seem to go with MP3's for music. Oh no, thats not for me! I can live with good old MOD music from the Amiga days, - but as for sound effects, its been gnawing at me for years, and I mean years now..
To the point then!
I've got some success in creating different basic sound shapes, such as sine, square, and triangular shaped noises (saw tooth). The hard one, is noise! I've got my very own noise generator working now - and so, what was once a simple project where I can create wav files to store these sound effects that will be made from these basic sound shapes - has now turned a possible corner with your help, into something more...
I'm quite happy that my code will generate sound on-the-fly, so to speak, but I'm looking for a way to make this a self contained library, or at least a big include file!
What I want to try and do, is create sound every 60th of a second - I understand about the idea of a sound buffer etc - thats fine. So, what I want, is some help in how I make a sound buffer, or buffers, and use them to create the illusion of one very long, ever lasting sound, as opposed to the idea of creating a huge bank of sound effects when a program starts. (Thats my current idea).
I'd like to take it a step further. In saying all that, do you think its worth the effort? I mean, I'm keeping sound to a really low sample rate (10k a sec!!) - and so, one whole minute of sound effects is only 600k of memory. Thats just a drop in an ocean of so many PC's of today!
Anyway - to give you an idea of what I'm shooting for (and looking to surpass by a long way) look at the "Shoot'Em Up Construction Kit" on the commodore 64. www.c64.com (just the sound editor!!!)
For what I'm aiming more towards, try playing Hunter's Moon (on the Commodore 64). I'm looking to achieve this, and perhaps the flexibility to achieve even more?
Am I crazy? Am I sane? let me know, oh mighty and all powerful PB community!
By the way, for your information, I used to use Blitz Basic, but switched, for a number of reasons. Firstly, that PureBasic allowed me to fix a refresh rate of a game. Blitz didn't. don't know if it does now?
Secondly, it seemed to be a lot more powerful in its ability to mix 2D / 3D. I'd go so far as to say it game better options for the 2D anyway, - PB's way of handing Sprites is a breath of fresh air!
There's more to the story - but not for this post.
PB Rulez! Now, come on guys - help!
I've been playing around with Purebasic for close to two years now, tinkering here and there. So, as a 2D-game advocate, remembering with fond memories such awesome games as those that appeared on my trusty old Commodore 64... I have come to this...
I've been looking for, and with no success, a way to recreate sounds like you'd hear from a real C64. No one seems to do a decent sound effects library that I can find. Some support basic wave-forms, but not the ability to shape them a lot, or do the craziest of things with them! So, I'd be forced to look for wav files from the net. I have WAV files! Its really about project size, and I think sound could be a lot less....
What annoys me most, is how quickly a project can get bloated with wav files for sound, and how people seem to go with MP3's for music. Oh no, thats not for me! I can live with good old MOD music from the Amiga days, - but as for sound effects, its been gnawing at me for years, and I mean years now..
To the point then!
I've got some success in creating different basic sound shapes, such as sine, square, and triangular shaped noises (saw tooth). The hard one, is noise! I've got my very own noise generator working now - and so, what was once a simple project where I can create wav files to store these sound effects that will be made from these basic sound shapes - has now turned a possible corner with your help, into something more...
I'm quite happy that my code will generate sound on-the-fly, so to speak, but I'm looking for a way to make this a self contained library, or at least a big include file!
What I want to try and do, is create sound every 60th of a second - I understand about the idea of a sound buffer etc - thats fine. So, what I want, is some help in how I make a sound buffer, or buffers, and use them to create the illusion of one very long, ever lasting sound, as opposed to the idea of creating a huge bank of sound effects when a program starts. (Thats my current idea).
I'd like to take it a step further. In saying all that, do you think its worth the effort? I mean, I'm keeping sound to a really low sample rate (10k a sec!!) - and so, one whole minute of sound effects is only 600k of memory. Thats just a drop in an ocean of so many PC's of today!
Anyway - to give you an idea of what I'm shooting for (and looking to surpass by a long way) look at the "Shoot'Em Up Construction Kit" on the commodore 64. www.c64.com (just the sound editor!!!)
For what I'm aiming more towards, try playing Hunter's Moon (on the Commodore 64). I'm looking to achieve this, and perhaps the flexibility to achieve even more?
Am I crazy? Am I sane? let me know, oh mighty and all powerful PB community!
By the way, for your information, I used to use Blitz Basic, but switched, for a number of reasons. Firstly, that PureBasic allowed me to fix a refresh rate of a game. Blitz didn't. don't know if it does now?
Secondly, it seemed to be a lot more powerful in its ability to mix 2D / 3D. I'd go so far as to say it game better options for the 2D anyway, - PB's way of handing Sprites is a breath of fresh air!
There's more to the story - but not for this post.
PB Rulez! Now, come on guys - help!