Jump to content
IGNORED

SNES Audio Capabilities and Formats (Contemporary Audio Production for SNES homebrews)


Recommended Posts

Hello dear friends of harmonically aligned waveforms,

 

since Radiohead didn't get back to me, concerning ModeZeros latest homebrew project 'Creamhoven and the Evil Nooker - a saturnian tale', I am starting to consider making the OST myself. The last project they did, they were working on was the Spectre title-track, that was foolishly rejected.  I can understand that they are feeling burned after that experience and not wanting to give an OST another shot. It is very unfortunate when brilliance gets wasted on people that don't understand beauty. I would really love to have radiohead on our project and if you guys or anyone who knows them reads this, please get in touch. It was a great title track and it shouldn't have been rejected. I mean check this out:

 

 

I can produce midi files, and I assume they can be transfered to SNES audio? Or is it better directly producing the final format oneself, to make sure it sounds just right? Are there any tools for this?

 

I have heard that it is possible to play audio files on a SNES. What format, maximum samplingrate and bitdepth is supported?

 

Everything useful on music production for contemporary SNES homebrewgames in this thread is greatly appreciated

Edited by Creamhoven
  • Like 1
Link to comment
Share on other sites

The SNES is a sample based audio chip.  It's 16bit internal, outputs 8bit if I remember correctly.  Due to the small bit footprint, the samples you can use aren't all that large.  Yet you have a huge count of custom samples you can create and use, ultimately space of the games ROM chip would relegate how far you can push it.  Tales of Phantasia on the SFC had a huge cart about 50% larger than the usual largest and that big chunk was used both for the utterly huge opening dialogue/singing song that goes for minutes on top of every attack/spell call verbalized by the players characters in combat.  That game was an audio beast, and even as clear as they kind of sounded, they're not like 16+bit quality clear and you can hear the compression to a degree.

 

So if you can find an audio program that'll create and spit out usable SPC files for the sound chip, it's down to your samples, size they eat up per sample, and total size overall into your games chip size.  I don't know all the details, but that SNES document being pushed in a few threads here recently should have that data in there somewhere.

  • Thanks 1
Link to comment
Share on other sites

42 minutes ago, Tanooki said:

The SNES is a sample based audio chip.  It's 16bit internal, outputs 8bit if I remember correctly.  Due to the small bit footprint, the samples you can use aren't all that large.  Yet you have a huge count of custom samples you can create and use, ultimately space of the games ROM chip would relegate how far you can push it.  Tales of Phantasia on the SFC had a huge cart about 50% larger than the usual largest and that big chunk was used both for the utterly huge opening dialogue/singing song that goes for minutes on top of every attack/spell call verbalized by the players characters in combat.  That game was an audio beast, and even as clear as they kind of sounded, they're not like 16+bit quality clear and you can hear the compression to a degree.

 

So if you can find an audio program that'll create and spit out usable SPC files for the sound chip, it's down to your samples, size they eat up per sample, and total size overall into your games chip size.  I don't know all the details, but that SNES document being pushed in a few threads here recently should have that data in there somewhere.

Thank you for this quality post!

 

That is very interesting, this means I would need to create a sound library as well. With modern capabilities I could do as much samples as I want practically speaking. 8bit that it is quite low, nothing I ever worked with. What sampling rate do these sample have? Apart from the sound library there needs to be a communications protocol, that basically has the notation in it. I don't know how it worked back then, but I would guess that they were using midi standards as well, that were later converted into the SPC files?

What I would do is compose my music and export it to midi. Then I would transfer it to the SNES compatible format and create a sound library. Is this possible and how?

 

Another topic is the Msu1 technique. Here it seems to be possible to play CD-quality audio:

 

Quote

MSU1 is a custom coprocessor much like the DSP chips used in games like Super Mario Kart or Pilotwings, designed by byuu/Near, the author of BSNES and higan. This "chip" enables playback of CD quality lossless audio (16-bit, 44.1kHz), as well as addressing up to 4GB of data, far more than a typical SNES cartridge could ever hold. This allows ROM hacks to replace the background music of games with high quality versions that can be seamlessly looped, stream data not already contained in the ROM file and even play full-motion videos.

https://www.zeldix.net/t1607-msu1-getting-started-guide

 

Can I just export my tracks as 16bit 44.1kHz (wav or even flac?)?

 

I like both approaches and have to consult with the ModeZero development team whether or not Msu1 or the original approach is more desirable.

 

EDIT: Thinking about it. I will have to create the soundeffects as well right?

Edited by Creamhoven
Link to comment
Share on other sites

10 minutes ago, jeffythedragonslayer said:

It's not very feature-complete, but one tracker that people compose SNES music in is snesgss.

I watched a video on this and there it was stated that creating ones own soundfonts is not plausible if you want to have decent sound. I will consider SNESgss but am contemplating if going for the Msu1 and CD-quality audio might be the better option. Still I would have to the sound effects, I assume SNESgss is capable of that as well?

 

How do you feel about a homebrew SNES release with Msu1 audio?

Link to comment
Share on other sites

6 minutes ago, Creamhoven said:

I watched a video on this and there it was stated that creating ones own soundfonts is not plausible if you want to have decent sound. I will consider SNESgss but am contemplating if going for the Msu1 and CD-quality audio might be the better option. Still I would have to the sound effects, I assume SNESgss is capable of that as well?

 

How do you feel about a homebrew SNES release with Msu1 audio?

I use FL Studio to compose, myself.  I find it difficult to read pitch information in trackers.

 

I don't care what enhancement chips people use so long as they respect Nintendo's current draw recommendations - I'm not going to be looking inside the cartridge while I'm playing 😉

  • Like 1
Link to comment
Share on other sites

32 minutes ago, jeffythedragonslayer said:

I use FL Studio to compose, myself.  I find it difficult to read pitch information in trackers.

 

I don't care what enhancement chips people use so long as they respect Nintendo's current draw recommendations - I'm not going to be looking inside the cartridge while I'm playing 😉

Okay, I compose with notation software (that can export midi). I have used a atari computer tracker before, but it's not how I approach music usually. Can You describe your SNES music production workflow?

 

Edit:

I assume you do it something like this:

 

As far as I see it, I can compose in notation software, input this midi into a DAW and export the SNES compatible file with this VST.

Edited by Creamhoven
Link to comment
Share on other sites

5 hours ago, Creamhoven said:

Okay, I compose with notation software (that can export midi). I have used a atari computer tracker before, but it's not how I approach music usually. Can You describe your SNES music production workflow?

 

Edit:

I assume you do it something like this:

 

As far as I see it, I can compose in notation software, input this midi into a DAW and export the SNES compatible file with this VST.

I import William Kage's soundfonts into FL Studio, so I can tell what it would sound like if it used that game's soundfont, but I haven't written my sound driver yet.

  • Like 1
Link to comment
Share on other sites

William Kage is very approachable too btw, he's given me help before.  I'd shoot him an email.

 

In case you're wondering why SNES music tech is advancing at such a snail's pace... the whole audio subsystem feels very unique.  I just discovered that different emulator authors don't even agree on how to number the different gain modes, so I made this table to keep my sanity:

 

https://sneslab.net/wiki/Table_of_Gain_Modes

Link to comment
Share on other sites

1 hour ago, jeffythedragonslayer said:

William Kage is very approachable too btw, he's given me help before.  I'd shoot him an email.

 

In case you're wondering why SNES music tech is advancing at such a snail's pace... the whole audio subsystem feels very unique.  I just discovered that different emulator authors don't even agree on how to number the different gain modes, so I made this table to keep my sanity:

 

https://sneslab.net/wiki/Table_of_Gain_Modes

Wow, thanks for the information. I currrently cant access my DAW but as soon as I do I'm going to look into it.

 

What discourages me is, there is great music on the SNES, and I havent seen anyone do anything close to the donkey kong country games OSTs. If you have a tech guy like Kirk who brings the SNES to a new level the music has to do something special as well. With the state of things I think the Msu1 might be the only option that would be adequate for peak mode 0 graphics.

Link to comment
Share on other sites

On 5/24/2023 at 4:13 PM, Creamhoven said:

Can I just export my tracks as 16bit 44.1kHz (wav or even flac?)?

That is how I'd expect to export my tracks to the MSU1 given it advertises "CD quality audio"

 

The MSU1 utilizes cartridge audio (source: https://www.reddit.com/r/snes/comments/91l00g/msu1_on_sd2snes_no_music/) so its output is mixed in after the S-DSP's output has already been converted to analog.  (see region C5 of https://wiki.superfamicom.org/uploads/snes_schematic_color.png)


Therefore the 32kHz sample rate generally is applying only to sound effects when MSU1 is involved, as the SPC700 is recommended to be dedicated totally to them and not music (see https://helmet.kafuka.org/msu1.htm)

  • Like 1
Link to comment
Share on other sites

6 minutes ago, jeffythedragonslayer said:

That is how I'd expect to export my tracks to the MSU1 given it advertises "CD quality audio"

 

The MSU1 utilizes cartridge audio (source: https://www.reddit.com/r/snes/comments/91l00g/msu1_on_sd2snes_no_music/) so its output is mixed in after the S-DSP's output has already been converted to analog.  (see region C5 of https://wiki.superfamicom.org/uploads/snes_schematic_color.png)


Therefore the 32kHz sample rate generally is applying only to sound effects when MSU1 is involved, as the SPC700 is recommended to be dedicated totally to them and not music (see https://helmet.kafuka.org/msu1.htm)

Great. I hope there will be tools coming out, that allow for quality sfx creation. I dont quite understand it, but the DKC OSTs were made with  a special technique that allowed for high fidelity sounds, that were incredibly labour intensive to make. I hope a streamlined tool will make this possible and plausible for homebrew developers like us in the future.

 

I think 44.1kHz 16bit audio is good enough for gaming, especially retro and the 32kHz sfx soundeffects can sound great if done well I am sure.

Edited by Creamhoven
Link to comment
Share on other sites

3 hours ago, Creamhoven said:

Great. I hope there will be tools coming out, that allow for quality sfx creation. I dont quite understand it, but the DKC OSTs were made with  a special technique that allowed for high fidelity sounds, that were incredibly labour intensive to make. I hope a streamlined tool will make this possible and plausible for homebrew developers like us in the future.

 

I think 44.1kHz 16bit audio is good enough for gaming, especially retro and the 32kHz sfx soundeffects can sound great if done well I am sure.

Ah, where did you hear about DKC's music?

Link to comment
Share on other sites

10 hours ago, Creamhoven said:

Ah OK so at 3:20 I disagree when they say that the SNES can't rearrange samples on its own.  The SPC700 runs whatever sound driver the sound engineer uploads to it, and being a Turning complete CPU that is connected to ARAM (limited capacity notwithstanding), that sound driver is allowed to do whatever it wants to the samples stored there.

 

So all you need is knowledge of SPC700 assembly, what enough of the S-DSP's 128 registers do, and how to upload to the SPC, and then you can program whatever synthesizer/rearranger on the SNES you want.

Edited by jeffythedragonslayer
  • Like 2
Link to comment
Share on other sites

11 hours ago, jeffythedragonslayer said:

Ah OK so at 3:20 I disagree when they say that the SNES can't rearrange samples on its own.  The SPC700 runs whatever sound driver the sound engineer uploads to it, and being a Turning complete CPU that is connected to ARAM (limited capacity notwithstanding), that sound driver is allowed to do whatever it wants to the samples stored there.

This is good news.

11 hours ago, jeffythedragonslayer said:

So all you need is knowledge of SPC700 assembly, what enough of the S-DSP's 128 registers do, and how to upload to the SPC, and then you can program whatever synthesizer/rearranger on the SNES you want.

Okay I'm going to check on the SPC700 first.

Link to comment
Share on other sites

Here's another one I found on https://archive.org/details/SNESDevManual/book1/page/n175 guys - I've bolded the part I think is a mistake:

Quote

Refer to Main Volume (Lch, Rch) and Echo Volume (Lch, Rch).  The output of this register is the sum of main volume and echo volume with a sign bit.

Probably should say "these registers," because there are four of them, and by that I don't think they mean "the value the accumulator would get if you could run LDA MOVLL," for example.  You can see the big "ADD" circuit on the far right in the DSP Mixer/Reverb Block Diagramin fullsnes - that's what's summing the main volume and echo volume.

 

I also believe that we should retire the phrase "Master Volume," see here for rationale: https://github.com/ares-emulator/ares/pull/1122

Edited by jeffythedragonslayer
  • Like 1
Link to comment
Share on other sites

20 minutes ago, jeffythedragonslayer said:

Hey guys, I found this cool tool for dumping BRR files from SPC files:

 

https://www.smwcentral.net/?p=section&a=details&id=11485

 

It does a better job of it than split700, which is what I used to use, but it's pretty poorly advertised as such.

That is a shame! Unfortunatly I don't know about BBR and SPC yet but I hope to use it in the future!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...