(HSS) The Musical Propeller. (Hydra Sound System)
Ym2413a
Posts: 630
Hello everyone.
I've writen a sound engine for the up coming Hydra computer console. (or any other project that needs sound synthesis capabilities)
HSS which stands for (Hydra Sound System) A spin off of the 1980's Konami sound system (KSS) for the MSX computers.
(HSS) is a sound engine for the Propeller which handles both Music, Sound FX and Samples in a transparent and self contained manner with easy to understand but powerful high-level commands, Much like how Graphics.spin works for video.
It supports playback of 6 wavetable channels and 1 adpcm channel.
4 WaveTable channels are dedicated to the Hmus engine. Which handles playback of music files.
2 WaveTable channels are left for Sound FXs which are controlled by the FXsynth engine.
The last ADPCM channel is used for playback of Compressed Wave Files such as Voice, Real Music Clips or any complex sound FX that can't be generated with the FXsynth.
(HSS) is designed with the idea of saving RAM thru highly compressed media files which are decompressed in realtime.
The average HMUS music file is anywhere from "1k to 6k" depending on complexity.
FXsynth Sound FXs are either "12 or 28" bytes each!
And the ADPCM is about "14kbps" at 11k sampling rate, That's a little less then 2k per second of audio. (Comparing to MP3 and Ogg, ADPCM is about 56kbps at 44.1k sampling)
Below are some clips recorded right from the Propeller's Demo Board running (HSS).
What you hear is coming straight out of the Propeller.
-HMUS music file:
www.andrewarsenault.com/hss/hss_song4.mp3
-Six FXsynth sound FX's being played back on one channel, one after another:
www.andrewarsenault.com/hss/hss_soundfx.mp3
-HWAV adpcm file playing back a complex sound FX of a male voice (11k sampling rate):
www.andrewarsenault.com/hss/hss_dpcmfx.mp3
-HWAV file of a short music clip (11k sampling rate):
www.andrewarsenault.com/hss/hss_dpcmmus.mp3
Well, I just hope this is something to get excited about. ^^
--Andrew Arsenault.
You can now download (Hss) at this website:
www.andrewarsenault.com/hss/
Post Edited (Ym2413a) : 12/27/2006 1:38:32 AM GMT
I've writen a sound engine for the up coming Hydra computer console. (or any other project that needs sound synthesis capabilities)
HSS which stands for (Hydra Sound System) A spin off of the 1980's Konami sound system (KSS) for the MSX computers.
(HSS) is a sound engine for the Propeller which handles both Music, Sound FX and Samples in a transparent and self contained manner with easy to understand but powerful high-level commands, Much like how Graphics.spin works for video.
It supports playback of 6 wavetable channels and 1 adpcm channel.
4 WaveTable channels are dedicated to the Hmus engine. Which handles playback of music files.
2 WaveTable channels are left for Sound FXs which are controlled by the FXsynth engine.
The last ADPCM channel is used for playback of Compressed Wave Files such as Voice, Real Music Clips or any complex sound FX that can't be generated with the FXsynth.
(HSS) is designed with the idea of saving RAM thru highly compressed media files which are decompressed in realtime.
The average HMUS music file is anywhere from "1k to 6k" depending on complexity.
FXsynth Sound FXs are either "12 or 28" bytes each!
And the ADPCM is about "14kbps" at 11k sampling rate, That's a little less then 2k per second of audio. (Comparing to MP3 and Ogg, ADPCM is about 56kbps at 44.1k sampling)
Below are some clips recorded right from the Propeller's Demo Board running (HSS).
What you hear is coming straight out of the Propeller.
-HMUS music file:
www.andrewarsenault.com/hss/hss_song4.mp3
-Six FXsynth sound FX's being played back on one channel, one after another:
www.andrewarsenault.com/hss/hss_soundfx.mp3
-HWAV adpcm file playing back a complex sound FX of a male voice (11k sampling rate):
www.andrewarsenault.com/hss/hss_dpcmfx.mp3
-HWAV file of a short music clip (11k sampling rate):
www.andrewarsenault.com/hss/hss_dpcmmus.mp3
Well, I just hope this is something to get excited about. ^^
--Andrew Arsenault.
You can now download (Hss) at this website:
www.andrewarsenault.com/hss/
Post Edited (Ym2413a) : 12/27/2006 1:38:32 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
Now, for a few questions about some details.
1. Were the clips stored in the Propeller, or run through the Mic input P8 on Prop?
2. Was the sound signals recorded from the stereo jack connected to the MAX4411 headphone amp?
3. Does HSS allow selection from many sound clips, if stored on-chip? Since the Hydra is mentioned, I assume various sound effects will be stored in EEPROM (cartridges) and by some means, when needed, particular clips will be played. Good games NEED sound. Well done.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
-Martin
Question #1: All audio data is stored in the Propeller's RAM and played back by (HSS) in real time.
Question #2: Yes, All clips are recorded out of the Headphone jack linked into my computer's soundcard Line IN. Any pin on the propeller could be used for audio output.
Question #3: Yes, If a file (Music, SFX or Wave) is located somewhere in the Propeller's HUB-RAM then (HSS) can play it back.
Simple high-level commands such as "sfx_play(channel, @address)" are used. Where @address is the location of the SFX data/file needed to be played.
(HSS) takes care of everything for you. All you got to do is just issue simple commands to it.
In more detail of how memory management works.
(HSS) plays files stored in HUB-RAM.
For small games and apps, all of your sound content could be located in the 32k boot section. For larger programs with large EEPROMs,
You can swap content in and out from the large EEPROM to a small dedicated area of HUB-RAM where (HSS) would work from. When it comes time to load a new song or set of wave files. All you would have to do is reload new content into that small area of RAM from the EEPROM.
(HSS) is designed so that under normal use (A video game with full out music and Sound FX) it will take less then 20% of the HUB-RAM leaving the rest for Video Processing and the Game engine.
This measurement includes a music file and sound FXs residing in RAM along with the (HSS) engine running.
20% or less is the rule of thumb for most sound engines on most platforms.
Though it is scalable and can take anywhere from 2% of the HUB-RAM to all 32k of it depending on what your going to use it for.
I assume this would also have uses other then just Video Games.
Being able to playback compressed wave files would be useful in any project that needs voice or sample playback.
--Andrew Arsenault.
Post Edited (Ym2413a) : 9/9/2006 11:14:57 PM GMT
That's great! I'd like to add sound capability to my own Propeller board. I've looked into having it decode and play WAV files, but the decoding of compressed sound looked pretty tough.
Is your code publicly available ?
David
Graham
David, (HSS) will be made publicly available soon and could be used for
anything.
The ADPCM (Hwav) engine playsback compressed wave files from HUB-RAM
at sampling rates anywhere from 10Hz to 32Khz.
Thanks to the compression which is a packet based 1bit "dynamic range
adaptive" differential codec with mu-law weighting. It gives 1:6 audio
compression. So what would have taken you 100Kilobytes in WAV only
takes 16.6Kilobytes in ADPCM HWAV.
FXsynth generates sounds based on synthesis parameters.
Much like an analog synth, you set the parameters such as "Waveform", "Frequency Modulation", "ADSR", and so on... to generate sounds.
The parameters data for a sound FX is either 12bytes or 28bytes with sequencer data appended.
In less then 1k you could put over 50 Sound FXs. I would assume the average game would be more like 10 to 30.
--Andrew Arsenault
Don't worry I'm still going to release my code in the near future and everything is on schedule.
The past few days I've been rewriting some of the hmus score data's compression method to compress the "sheet music" even more.
When you got 32k to work with and still want to leave 80% of it open for other tasks then you find ways to save every extra bit you can. ^^
My goal is to have MOD like music files that are less then 4k in size with WaveTable data.
Talk about compression right? As a matter of fact it's already there, I'm just trying to make it even smaller.
This sounds (no pun intended) very interesting. What is the status?
Thanks!
cbmeeks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Coders' Hangout
A place for programmers to hangout!
http://www.codershangout.com
METROID?
Metroid Classic
Well everything is going well, I've already made a number of updates to the (HSS) engine.
The musical score data is now the most compressed score data I've ever seen!
Delta compression along with Run-Lenght.
The music is very compressed for its size.
A minute of sheet music is anywhere from 1k to 2k depending on complexity of the song.
I've writen songs in HMUS format that are under 2k each! I also got a handful that are 4k but they just have more samples.
The FXsynth plays files that are even smaller. Just bytes at that!
(HSS) Is at version 1.0
I havn't released it yet because I havn't writen the documention for how to use it. Nor have I played with the Hydra's audio output yet so I havn't tuned the engine for the Hydra's pin mapping and low-pass filter. Right now it works best with the Demo Board.
But I will soon get around to both of the above.
Thank you for your interest. ^^
--Andrew Arsenault
Seriously, I think you have the audio engine that I am looking for on my homebrew computer. BTW, how many cogs does it use total?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Coders' Hangout
A place for programmers to hangout!
http://www.codershangout.com
METROID?
Metroid Classic
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Coders' Hangout
A place for programmers to hangout!
http://www.codershangout.com
METROID?
Metroid Classic
Andre'
So I don't see why it couldn't fit into a 7cog limit. I designed it to function in the Hydra along with other COGs are running tasks like game engines, inout/output, EEPROM managment and video.
With (HSS) one COG plays the roll of a sound synthesizer or soundchip.
It does all the calulations for Wavetable Synthesis, ADPCM, Mixing, Volume/Evelope and other things. This COG could be used by its self.
The second COG does the fuction of a co-processor.
It runs an engine writen to play music, decompress data in realtime and interface to the user's program with High-level commands such as Play, Stop, Load, Tempo, SetVol, etc.
This allows the programmer to send commands to the sound engine and not have to worry about doing the dirty work of music playing and soundFXs in the game-engine's code. (Normally this is done on an interrupt routine within the game).
(HSS) is pretty powerful. 6 channels of PCM WaveTable, ADPCM Playback, Tracker Music Playback Engine and Two Analog Synthesizer Emulaters all in 2 COGs.
I wrote (HSS) with the idea of having a platform for audio on the Hydra that was easy to use, well documented, standardized and very powerful! All while saving enough resources for the many other tasks that would need to be done at the same time on such a system.
Cbmeeks I'll look into releasing a beta or something for you.
I'm just sort of a perfectionist. If I released (HSS) back when I started this post. Then none of the programs people wrote using the early versions would have worked with the newer versions as I rewrite and updated algorithms and data structures.
Now everything is starting to take it's finally form so a final first release is looking more likely.
Thanks everyone for your interest!
I'm glad AndreL and Mike Green show and interest as well!
They're two of the most popular members of this scene. ^^
--Andrew Arsenault
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Coders' Hangout
A place for programmers to hangout!
http://www.codershangout.com
METROID?
Metroid Classic
Now HYDRA has been release what is happening with HSS ? do we need to buy the book to get it ?
Cheers
Robin
In the meantime, the HYDRA comes with a complete ADSR engine with 11 channels that plays PCM and well as pure tones, and that does come with the HYDRA kit in the book along with the source code to it.
ANdre'
I'm going to release (HSS) once my Hydra comes in the mail and I map the audio pins and tune it for the system's lowpass filter.
I hope the lowpass doesn't roll off as soon as the DemoBoard did.
I'll keep you guys posted!
Andre'
(Hmmm) That does roll off early. (HSS) samples and mixes everything at 32kilohertz.
Ideally a rolloff at about 16kilohertz would be perfect.
I'll just match the engine to the hardware.
Andre' what pin(s) is the audio taken off of on the Hydra?
I still have yet to get my console in yet.
Thanks!
Do you think HSS could be used as a base to create a MOS/SID chip emulator ?
Tks,
Richard
andre'
Yes it can, I already converted a few SID tunes to it. But they aren't in the native C64 format.
Interesting enough I started working on an object that does emulate the SID6581.
I havn't completed it yet though,
(btw)
Thanks Andre for the info! your the best!
--Andrew Arsenault
Great !!! That looks awesome !
I guess you're familiar with this 6581 project : http://ucapps.de/midibox_sid.html and more precisely the embedded SIDplayer version at http://ucapps.de/mios_download.html (A SID file player for the MIDIbox SID, compatible to the ASID protocol used by the SIDstation). The implementation of the MidiboxSID is really impressive. It requires a pic18f452 core and a SID module.
"Step C" (http://ucapps.de/midibox_sid_csC.html) is what I'd like to replicate, without using a real SID.
Could you help ?
Tks,
Richard
Sure Richard, I don't see why not.
Let me warn you. I've been busy lately.
But I'd be interested in working on a Prop-SID.
--Andrew Arsenault
Let me warn you. I've been busy lately.
But I'd be interested in working on a Prop-SID.
--Andrew Arsenault
That would be excellent. I built some synths in the past using the SID chips, and the best feature was the SID's filter. Has anybody emulated a filter like this on the Propellor? Seems like the Propellor might be good for IIR filters. Also, the signal-to-noise ratio of the SID was pretty bad, I'd estimate about 45 db. Some of the mp3 files posted here sound better! I could give up the ring modulator feature of the SID, but the filter would be necessary. PS - thanks for posting audio samples!
Your welcome!
Yeah the SID had a signal to noise ratio less then 48db. I got the datasheet at home but I remember it being in that range.
I think it added to the "gritty" personality of the chip as compared to Yamaha's OPLx chips which sounded thin and a bit weak.
(HSS) uses very small wavetables which sound gritty and more SID like then FM synthesis.
Konami made a sound chip called the (Scc) which played WaveTable Samples. It only had 128 bytes of Sample RAM though. So basically you could store one cycle of a waveform for each channel and loop it.
(HSS) is sort of a improved version of Konami's (SCC) chip.
Now I'm just cleaning up my ASM sound engine and looking for ways to save clocks anywhere I can.
4bit audio samples will work well for drum kit sounds and some simple tuned samples.
Anyway, After this I'm going to look for even more ways to save HUB-RAM space!
32k is such a limit to work with (while keeping 80% or more of the chip open for other things). Oh well.