Donkey Kong Sound
CardboardGuru
Posts: 443
The recent posts about sound drivers have made me start thinking about sound for Donkey Kong and...
Sound isn't really my thing you know. I could do with some help.
So here's where we are. I'd love to use Eric's new midi player, but I have allocated just one cog for sound. I can't spare any more. I'm also very short on memory. Right now I don't even have enough to include a sound driver object. But I'll compress the tile maps and create more room at some point.
I do have a game loop that operates reliably at 60 loops per second though, so it should be possible to schedule notes/sound effect events from that.
So what are the choices of sound driver which use 1 cog? Nick Sabalausky's driver sounds like an option. But with the negative that distribution within the package isn't allowed. Andrew's HSS appears to need 2 cogs, so I guess I can't use that.
Then there's the actual tunes/sound effects themselves. I do have a keyboard and I suppose I could try and match the notes I hear from MAME. But I'm no musician so it might be all wrong. Or maybe it's possible to extract the note values from these MIDI versions. http://www.classicgaming.com/dkdb/audio_midi01.htm But I'm not sure how close they are. But then I'd be lost with how to produce the right voices.
So can anyone with some musical/audio ability give a helping hand on this one? Anything from suggestions through to producing a little demo app with one or more of the tunes/sound effects from DK in.
Sound isn't really my thing you know. I could do with some help.
So here's where we are. I'd love to use Eric's new midi player, but I have allocated just one cog for sound. I can't spare any more. I'm also very short on memory. Right now I don't even have enough to include a sound driver object. But I'll compress the tile maps and create more room at some point.
I do have a game loop that operates reliably at 60 loops per second though, so it should be possible to schedule notes/sound effect events from that.
So what are the choices of sound driver which use 1 cog? Nick Sabalausky's driver sounds like an option. But with the negative that distribution within the package isn't allowed. Andrew's HSS appears to need 2 cogs, so I guess I can't use that.
Then there's the actual tunes/sound effects themselves. I do have a keyboard and I suppose I could try and match the notes I hear from MAME. But I'm no musician so it might be all wrong. Or maybe it's possible to extract the note values from these MIDI versions. http://www.classicgaming.com/dkdb/audio_midi01.htm But I'm not sure how close they are. But then I'd be lost with how to produce the right voices.
So can anyone with some musical/audio ability give a helping hand on this one? Anything from suggestions through to producing a little demo app with one or more of the tunes/sound effects from DK in.
Comments
As for extracting note values from MIDI files, the HDMF converter will do that for you and dump them to it's text console. Even if you choose not to use HDMF as a playback engine, you can use the converter to figure out MIDI values.
I had a lot of success last night is using H.A.M. to place data in upper EEPROM (above 32K), and Nick has written a EEPROM driver which makes it easy to get data back out again. You may be able to place some of your game's assets in upper EEPROM to save you space, as long as the code to retrieve them is smaller than the assets you need to store there [noparse]:)[/noparse]. Putting music there probably doesn't work for you because you wouldn't be able to do the EEPROM reads on the fly in your main loop and keep up, and you won't have another cog free to do them for you.
Post Edited (epmoyer) : 5/15/2007 11:49:21 PM GMT
You can use Ham like epmoyer said, But I seem to be having trouble with that [noparse]:([/noparse] seems to be doubling 1K buffers.
Why don't you do what I'm doing now, and use >32KB to store the levels graphics, and load them in when needed.
I just have a first download app that copies the stuff to eeprom above the first 32KB, which I download and run, then it's there for good [noparse]:)[/noparse]
then download the game as normal [noparse]:)[/noparse]
that way, you'll have room for sound etc.
Just my 2p's worth.
Post Edited (Baggers) : 5/16/2007 11:25:04 AM GMT
I'll save using the EEPROM for a project when I actually need it. It's nice to be able to load the whole thing on to the Hydra in one step from the Prop Tool.
At the moment I have 4 levels and the intermission screen stored as maps. 5*32*28*2 = 8Kb. But I don't really need all that space. The original didn't do this. It drew the screens - (whether in code or from a data table I'm not sure). I can do the same in far less than 8Kb.
No Probs, I didn't really want to use upper memory, but I have the title screen in also now, and it keeps going over memory.
I think I'll try compress the levels down, as I'd like to load it in one go too [noparse]:)[/noparse]
That's if you got a few clock cycles to kill. [noparse]:)[/noparse]
--Andrew Arsenault.
How's the docs and editor coming?
Cheers,
Jim.
I've made a block diagram of the FX synth engine along with a table of all values and ranges.
Also I'm going to soon add .WAV support to the .hwav tool!
HSS version 1.5 is done and just needs some final debugging. [noparse]:)[/noparse]
I'm excited!
Because I'm working out a music tracker for the .hmus format. Also I want it to support my next "propeller" music file format. Which is like SUPER hmus! [noparse]:)[/noparse]
16 channel tracker music with playback support for 4 channels of ADPCM samples in the score!. *Think singing vocal tracks and samples* [noparse]:)[/noparse]
I already started writing new songs to support and demo this new engine!
London's Imogen Heap will be the first voice heard in a propeller sang song. [noparse]:)[/noparse]
All this with only 32k.
--Andrew Arsenault.
As for 16channels with 4xADPCM excellent going [noparse]:)[/noparse]
I'm going to have to do two versions of ManicMiner, as I've tried to immitate the spectrum sound too for the title screen [noparse]:D[/noparse] it's so bad it sounds close to the speccy, which isn't bad considering timing is different for Prop and Z80 and 60Hz VSync Prop and 50Hz Spectrum
Like you, MM is almost there, just some final additions, ( like Eugene, and ProtoBoard / Hydra settings etc. ) and it'll be ready for a release.
Baggers.
Nice going; I'm looking forward to hearing your new demos.
Have you given any thought to playing audio samples from EEPROM? I haven't done the math on the effective EEPROM read rate via propeller ASM to figure out if it’s possible.
My focus with the HDMF project was to support complex music composition/playback for Hydra games. What I see happening today is that the first generation of games (i.e. the demos which shipped with the Hydra) was struggling to even have enough room in 32K to include any kind of sound at all. The upcoming generation of games (like CardboardGuru's Donkey Kong port) will squeeze the limits of the 32K ceiling to its knees. Within the next 2 months I see the use of HAM becoming widespread, and the practice of storing assets in upper EEPROM to become commonplace. HDMF's ability to playback song assets stored in upper EEPROM will mean that programmers can add complex music to their games with only a small player/sound engine footprint in their precious 32K. If sampled sound assets could be stored in EEPROM and played back "on the fly" (without caching them into a large local buffer; I mean byte-by byte on the fly) then man oh man there could be awesome music in Hydra games! If we're limited to sticking them in RAM then most Hydra games won't be able to afford the storage space for them.
Within the week HDMF will be released. The current version uses Nick's sound driver. Once the first release is complete I will start crank a version of HDMF that bolts up to your sound driver. That means that you'll be able to click a button, pick a MIDI file, then click another button and immediately hear it played back on an HSS version of the "Live Player" running on the Hydra hardware (the HDMF converter sends data to the Live Player over the serial connection for immediate preview). Then, when you're happy with the playback, you’ll be able to click another button and generate SPIN data for playback using the HDMF engine. That effectively means that any existing MIDI sequencer software will be able to be used as a front end for HSS, which (I think) saves you the bother of writing your own tracker software. In my mind the front-end sequencer / composition / import problem is solved. You’ve done an incredible job on the sound engine side so far; I'd love to see you focus on the HSS documentation and the sound engine so that when the two pieces meet we have a real powerhouse on our hands; not just from a great sounding chip-music standpoint, but also from that standpoint of creating a system that meets the constraints of Hydra game development.
Keep up the outstanding work!
I like the simplistic nature of your format and system.
Midi is easy for anyone to work with and is available everywhere!
My tracker formats allows for great things! Drum Kits, Vocal Tracks, Transforming Leads, Sampled Instruments...
But isn't easy to compose for unless you know about "tracking". *lol* [noparse]:)[/noparse]
I too am thinking of doing some more EEPROM related things.
At least with the Hydra.
Interesting enough most of the interest in (HSS) doesn't even come from the Hydra, but from the propeller users.
(HSS) is also focusing on two other propeller based platforms that aren't the Hydra.
So yeah there is a lot more that needs to get down. [noparse]:)[/noparse]
How are your HSS tools coming? I'd like to play with that too.
Baggers.
I think most of them will work with (Hss) ver 1.5 so you'll have to upgrade to that. [noparse]:)[/noparse]
Jim