Language…
13 users online: BabyBlueFord, Connnnair, h.carrell, JaizePLS, Link13, MiguelShow, panasonic64, sholmes, SMW Magic, Sokobansolver, Stjopa, the_name_is_already_taken, TheJank - Guests: 90 - Bots: 325
Users: 65,998 (2,157 active)
Latest user: Luiz On

Addmusic 4.TheNextVersion Final version released

Link Thread Closed
Well, as some of you may know, I've been working on fixing Romi's addmusic for the past... While I guess. The objective of this is not to make a new tool that everyone will use, but to allow us to have non broken hacks until something better comes along *cough*addmusicm*caugh*.
What this allows:

1. Use of echo. This was completely broken before so... Well here you go.

2. Use of sound effects AND echo.

3. Your hack not killing anyone who uses an actual emulator (or SNES)'s ears.

4. Echo delay values up to 7 in levels (Depending on the music you use, explained farther down)

I also included my own flavor of more.bin (Required for this to work).
What this includes:

1. ADSR command (Handled by the normal $ED command).

2. Direct write to DSP command ($ED followed by $80, followed by the DSP register to write, then the value you want it to write)

3. Turns off echo whenever it loads a song (Should get rid of the stupid clicking you get when switching from a song with echo to one without)

4. SPC Data write. This is totally untested (So I won't even bother telling you how to activate it), but should theoretically allow you to insert data into ARAM.

5. SPC Code write. Also totally untested (And I also won't even bother telling you how to activate it). This will insert code into ARAM which will then be jumped to. This is my catch-all, if I didn't program it and you want it, program it yourself.

What this will include before final release:

1. A sample selection command, like in carol's more.bin

2. Well, that's probably it actually, maybe a re-tune sample function.

Caveats: (What, you didn't think you would get all this for free, right?):

1. Music insert size has been decreased to $1700 (5888) bytes for level music, but since it only uploads 1 song at a time, that means you can use any song in the music section right now.

2. OW music can only be $3B50 (15184) bytes. That shouldn't effect you in any way.

3. Echo on the OW is limited to 3. It was either that or not allow you to change songs one the OW... At all, I went with the latter.

4. On that subject, because only one song is uploaded at a time, no changing songs mid-level without re-uploading the song, sorry.

5. All your level songs should start with this:

Code
$ED $80 $6D $2B
$ED $80 $7D $00
$F0


That moves the echo buffer to $2B00 in ARAM, zero's out the size of the echo buffer, and turns off echo, respective to line numbers. OW songs should do this:

Code
$ED $80 $6D $68
$ED $80 $7D $00
$F0


It's quite similar, except it moves the echo buffer to $6800 instead. This is why you can only have 3 delay. If this is too annoying for you to do by hand (I know it is for me), I included a little Python script that will add that header to every .txt in the folder with it. To run it, you just need to have Python 2.5+ installed and run it. There is one in the OW and in the Level folders.

6. The ADSR command. For the love of God people, and decay of 9 is the same as a decay of 1, there is absolutely no difference EVEN IN ZSNES. That didn't used to break anything (It was just useless and you all were clearly deluding yourselves), but now it does, because my more.bin uses values for $ED above 80 for new commands, so it will break if you do that. Dur. Go through and change all your songs with more than 7 decay ($ED $SomethingBiggerThan80 $XX) to it's equivilent less than 80 value (Subract 80 from it, that's in hex).

7. Actually... I think I'm out of caveats... Hurray!

To use:
1. Extract it where you want it

2. If your ROM has used any Addmusic besides Romi's or if you have used carol's more.bin, sorry, you are out of luck. Get a new ROM.

3. Run Addmusic with the -se command with more.bin in the folder with it (Even if you have no sound effects). That will install my more.bin into the game.

4. Fix your music so it will work (Described above)

5. Use like you normally would Romi's addmusic

And that should be it.

A note about echo:
I mentioned above that you can have echo delay of up to 7 in levels. To achieve this, it depends on how many bytes your song uses. A song of length $1700 would only be able to have 5 echo ($2B00-$52FF), but for every $800 bytes less you use, you can add 1 more delay. This means if your song is less than $F00 bytes, you could use 6 delay, if it was less than $700 bytes, you could use 7 delay. To achieve this, you have to edit the header I said earlier. For every 1 delay more you want, subtract $8 from $2B in "$ED $80 $6D $2B". It may also be possible to get higher values if you are good, but I'm too lazy to list how, for someone who wants to try, music data is uploaded to $13A8 in ARAM and you have up to $5570 for echo delay, each delay takes up $800 bytes of ARAM. Do the math to figure out how much delay you can have.

A PUBLIC SERVICE ANNOUNCEMENT:
If you are going to use echo, please, please let the echo buffer clear out before yo turn on the volume. If you don't, you will get a crashing sound every time you enter a level with echo and it's just freaking annoying. To do this, first enable your echo with 0 volume for the left and right speakers. Then set up your echo as normal. Then, wait a few notes (240ms), then turn on the echo volume. That will completely fix that problem. Thank you.

Now that I've bored the heck out of you with a huge freaking post:

Link removed, because it was an old version and people were getting confused.

A note:
This is a BETA, that means I want FEEDBACK on it. Please tell me any errors you find, anything you think that would make it better (No promises), or just anything pertaining to this. It wouldn't due to realease YET ANOTHER broken addmusic. That's all, have fun.
i think i forgot to mention that i tested the first world of smwcp and the pipe world. there's the crash sound before some levels-- that's the echo clear thing i supposed. no 'real' crashes as far as i can tell.

i accidentally patched the same file twice so i still want to test the one with all the music.

edit/note: ....which i'll get to later today. ps i love you. i can finally play hacks!

you can use addmusicM songs in this addmusic?
No. Use AddmusicM if you can,

Edit:
Originally posted by Ixtab
i think i forgot to mention that i tested the first world of smwcp and the pipe world. there's the crash sound before some levels-- that's the echo clear thing i supposed. no 'real' crashes as far as i can tell.

Yes. Yes you did. And yeah, going through and clearing the echo before every single song would have taken hours of my time that I just didn't feel like using that way. (I mean, I already spent 50 minutes fixing all the people broken $ED commands :( )
Quick question:

Quote
4. On that subject, because only one song is uploaded at a time, no changing songs mid-level without re-uploading the song, sorry.

You expecting people to do this manually? Or is there something I missed that will allow people to switch songs in blocks/etc?


Oh, and I'm in full support of this, even if I'll probably never use it. Anything that makes hacks break less is awesome by me.
Originally posted by Kaijyuu
Quote
4. On that subject, because only one song is uploaded at a time, no changing songs mid-level without re-uploading the song, sorry.

You expecting people to do this manually? Or is there something I missed that will allow people to switch songs in blocks/etc?

There are Jukeblock boxes in the blocks section, that may or may not work, not sure. If not, I could make some code for it I guess.
Can we insert the new more.asm if we already inserted the Romi's one?
Yes, it will overwrite Romi's. In retrospect, I never did actually test it with carol's, I just assumed it wouldn't work. If you run xkas anti on more.asm with carol's more.bin, it should let you use this (You may not even need xkas anti, but I would just in case).
Also, when you said non broken hacks,do you mean that the SFX aren't able to destroy the music or to make the hack more compatible with emulators?
I prefer to think of it as "more compatible with the snes", since that's what it is. Both though.
I would have definitely made use of this useful advancement if I didn't already switch over to AMM. Kinda glad I don't have to deal with various addmusic bullcrap anymore.
I actually have a suggestion for this. You said it allows custom sound effects right? I've always found it annoying that you could only use certain samples to be used for SFX. You should make it so that the sample selection command could be used in custom SFX. (Or better yet, make ALL of those commands to be used in SFX, writing to the ARAM within a sound effect seems like a really useful idea to me, since it would allow for neat effects and such, but I don't know how complicated this would be.)
This is radical so far, Huflu. If it ever gets to supporting the $E5 command like Carol's more.bin then I'll definitely switch over, cause there are tons of songs that use it that I can't use because Romi's more.bin doesn't support it, and my hack overuses custom SFX. >:<

Oh, and one thing that I always disliked about Romi's Addmusic: it could only write new SFX data to $1DF9 and $1DFC, while $1DFA is almost virtually unused except for a few fairly minor sound effects, eg. Mario's jumping, chainsaw click, etc. It would be c00l to be able to write new SFX to $1DFA, even though it would be fairly useless to many people unless they're using tons of SFX at the same time.

But yeah, good job on it so far, and good luck in adding the rest of those features. I'm definitely keeping an eye on this thread.



Originally posted by Sonikku
Oh, and one thing that I always disliked about Romi's Addmusic: it could only write new SFX data to $1DF9 and $1DFC, while $1DFA is almost virtually unused except for a few fairly minor sound effects, eg. Mario's jumping, chainsaw click, etc. It would be c00l to be able to write new SFX to $1DFA, even though it would be fairly useless to many people unless they're using tons of SFX at the same time.

Yeah, that's an idea, but Nintendo decided to do something really cool and instead of using a table for 1DFA sound effects, it handled them all manually, so adding sound effects to 1DFA would be more difficult than it sounds.

Originally posted by Jimmy52905
I actually have a suggestion for this. You said it allows custom sound effects right? I've always found it annoying that you could only use certain samples to be used for SFX. You should make it so that the sample selection command could be used in custom SFX. (Or better yet, make ALL of those commands to be used in SFX, writing to the ARAM within a sound effect seems like a really useful idea to me, since it would allow for neat effects and such, but I don't know how complicated this would be.)

I already told you, but it's great for everyone else to know too. I'll look into how the sound effects are handled, but it's likely that any change to their engine would be unacceptable because of vanilla sound effects.
Originally posted by Jimmy52905
I actually have a suggestion for this. You said it allows custom sound effects right? I've always found it annoying that you could only use certain samples to be used for SFX. You should make it so that the sample selection command could be used in custom SFX. (Or better yet, make ALL of those commands to be used in SFX, writing to the ARAM within a sound effect seems like a really useful idea to me, since it would allow for neat effects and such, but I don't know how complicated this would be.)


This is a really interesting idea. Instead of having to make your own spc hacks and uploading them to aram, you could just make custom sound effects that do something such as "decrease global volume by 1" each time it is played, and achieve many different things just by sending different sound commands disguised as sound effects. Actually implementing it might be hard though...
What about misc music (p-switch, death, star, etc)? Is that still supported as in romi's addmusic?

Also, I think it would be helpful if you made macros/text commands for commonly used hex code commands. Something like allowing "%DSP($6D, $2B)" as a substitute for "$ED $80 $6D $2B". My hope is eventually different extended commands and such can be standardized so that different addmusics and more.bin can use whatever actual hex representation of the commands when they are inserted, and unrecognized commands are automatically ignored. A bit silly I guess.

If your doing something like that, you might want to have a configuration file that specifies what commands do and also possibly any header code like the stuff that moves the echo buffer for you so you don't need to put it in every song.

Also, also, for $1DFA sounds you could make use of that manual code insertion thing if you wanted :P
Your layout has been removed.
Awesome. I'm going to have to finish my DKC ports with Carol's for the time being though. Also, like I said before though, If AddmusicM or something similar becomes mandatory then I'm done with porting. AMM is unnecessarily complex to so many people.
I think a post layout goes here somewhere...
Very cool, I just tested it with a port that broke on BSNES before, and now it works perfectly. I think even these little limits and tasks (copying the values into the TXT) won't stop the not-so-advanced people to use your program in the future. I might use it for smaller hacks or something too, although I think I'll rather stick to AddmusicM later (especially if it gets fixed too). Still, very nice job, and I hope lot of people will change to this after the final version will be released.
Originally posted by KilloZapit
Also, I think it would be helpful if you made macros/text commands for commonly used hex code commands. Something like allowing "%DSP($6D, $2B)" as a substitute for "$ED $80 $6D $2B". My hope is eventually different extended commands and such can be standardized so that different addmusics and more.bin can use whatever actual hex representation of the commands when they are inserted, and unrecognized commands are automatically ignored. A bit silly I guess.

Well, the addmusic itself is actually finished as far as I can tell (I may un-restrict song length and just leave it up to the song creator to set their echo accordingly, probably a better idea), all future changes will only be with more.bin, since the tool is meant to be a band-aid until something better comes along.

Edit: Another change I'll be making is making it linux compatible, thanks to p4plus2.
Been hearing about this on IRC for a while, and I'm happy it's finally seeing the light of day. Other people have brought up most of the inquiries I would have had about it too, so that's nice.

Once we see an "official" release, I'll give this a try and wipe out all of the old addmusics (thus only having yours and addmusicM). We'll have to do a run through the music section and fix up some older tracks that may cause some damage as well.

I'm glad someone finally did this, at least.
Link Thread Closed