Language…
21 users online: anonimzwx,  Atari2.0, codfish1002, Domokun007, gemstonezVA, Green Jerry, hhuxy, iamtheratio, Macrophaje, mario90, mathie, Maw, monkey03297, nonamelol1,  nycvega,  Ringo,  Saphros,  Segment1Zone2, SirMystic, synthie_cat, xMANGRAVYx - Guests: 278 - Bots: 329
Users: 64,795 (2,375 active)
Latest user: mathew

AddmusicK 1.1.0 Beta Release (New Beta Up 5/7)

After a few months of working on it, I've finally finished a big update to AddmusicK!

The changes are significant, so I am uploading it here first as a beta so that people can test it to verify everything is working as intended.

New features in AMK 1.1 Beta include:

-AMK now uses ASAR 1.5 instead of ASAR 1.33b, having been minorly altered to facilitate this transition.

-the AMK engine has been drastically optimized, making it be reduced significantly in size (roughly 0x400 when excluding the arpeggio commands but including all the new features). With over 50 SMAS sounds included (based on Vitor's sfx dump. Includes all SMAS sounds except for an unused variant of an unused SMW sound and the wind, which is hardcoded), it's less than 200 bytes larger than AMK 1.05 was without those sounds!

-thanks to the optimization, the entire engine is categorized neatly and near-fully-documented.

-Sound effects can now be called on ANY channel from 0-7 via 1DF9 and 1DFC. Use #0 through #7 to dictate within a sound effect file that it should be on a specific channel, or indicate #0-#7 from the sound list if you don't want to force a specific channel from within the sound text file.

-You can now directly configure the default channel SFX play on from 1DF9 and 1DFC in SPC/Settings.asm

-Sound effects can now use multiple channels. Designate multiple channels from within a text file to have that sound id play them on those channels simultaneously! See 11, 12 and 1D in 1DF9 to get an idea of the format. Use #endchannel to designate the end of the info for one channel, then proceed with #x (where x is the second channel of info).

-Sound effects can reserve their channels to prevent other sound effects from overruling them by using #reserved. 11, 12 and 1D in 1DF9 utilize this in favor of how SMW originally checked these specific ids. The pause and unpause sfx will overrule other reserved sound effects if called from 1DFA (which is how they are normally called), preventing any related issues from interrupting them.

-#endchannellooped will make a sound effect loop the last note, while #channellooped will loop the entire sound effect on that channel. If no data-end option is written into the file, it defaults to whatever it is designated in the sound list. If nothing is indicated there, it assumes it ends with a $00 (equivalent to #endchannel)

-Sound effects now have a more easily-read format. Use l$xx to designate a length in hex for the default length of a sound or designate a note length. Dotted values are also valid, so you can use l8. if you wish. While the formatting is similar to that of the music files, there are some key differences. For example, volume is set per speaker (i.e. v56,56 is the same as v56, which would be the same volume in both speakers, but a sound effect volume that is twice as loud in the right speaker would be v30,60) Look at the sound effects provided for a gist of how it is set up, as I tried to make it as intuitive as possible.


-Included among the SMAS sounds is the turning sound effect, which is normally unrolled and thus ungainly to port. The doomship sound effect requires the distortion guitar sound to work properly. If you are dire on space and won't use it without the instrument being present, just omit the ! in the sample group text next to "default/11 SMW @17.brr" since it is currently the only sfx using it.

By including these sounds by default, I hope that this will bring a bigger incentive for spriters to utilize them as they could safely assume that these sounds are accessible by others.

-Includes a fixed SMW jump sound, which should be virtually identical in function to what the original SMW used but without the hassle of unrolled code

-A custom pause/unpause sound has been included that is based on the SMW pause/unpause sound. However, instead of stopping the music when paused, it now merely lowers the volume of the notes. This should result in less music breaking from long notes being interrupted. An alternate pause sound that works more like SMW's but stops all music channels the instant it is paused has been included separately within the download if this does not tickle your fancy.

-Several sound effects now call themselves to channel 6 or 7 instead of their regular channel to try to lower the amount of conflicts present due to 1DFA sounds being called to channel 6 or 7 due to AMK.

-Additional sounds not your cup of tea and just want a smaller program? Included is an alternative sound list which maintains the channels used in AMK 1.05. Only the skidding sfx from SMAS is included in this alternative file in slot 1D for 1DFC as the original sound that was present in 1D is removed, thus this serves as a safety net if for some reason someone used that sound id (not likely).



-Drastically reduced slowdown within music by reducing the polling for updating the pitch to only when the pitch on a channel is actually altered in value. Test songs that originally slowed down by nearly 50% now only slow down by around 5% and most songs now have negligible-to-very-little slowdown.

You can reduce slowdown even further at the cost of pitch accuracy by using tags #efficient or #semiefficient within your song files to alter how it processes information.



-Sound effects now have clearcut ways to read pitchbend info. PitchBend designates a starting note and a finishing note and PitchBend2 continues from a previous note to the designated pitch.

Examples of the syntax include PitchBend(o4a,32,16,o4b), PitchBend2(32,16,o3c), PitchBend $WW,$XX,$YY,$ZZ, PitchBend2 $XX,$YY,$ZZ

Omit the delay byte (The first length designated, or second byte after the pitchbend command) to save space by writing, for example, PitchBend(o4a,16,o4b), PitchBend $WW,$YY,$ZZ, PitchBend2 $YY,$ZZ or PitchBend2(16,o3c). The program assumes a delay of $00 then and reacts accordingly.

-Sound effects with pitchbends are now compressed if they have no delay. SMW, SMAS and YI all avoid using delays in their pitchbends, so this reduces the size occupied significantly.

-All sound effects included have been converted into this more readable formatting, making it easy for users to understand the mechanics and get an idea of how to make their own custom sounds.

-Sound effects can be looped with an intro by using "/". While an example is not included, think of something along the lines of the Mega Man X charging sound effect for an idea of the potential.



-Custom percussion is now present as a feature. Designate up to 10 different percussion instruments using a familiar setup similar to custom instruments.

An example would be "default/06 SMW @22.brr" $8C $E0 $70 $07 $00 o2a. The only difference from custom instruments is that you designate a default pitch with an octave. See the boss text for more info, and as a proof of concept, it lowers the percussion by one octave.

-A new syntax is included for percussion notes #$D0-#$D9. "%". Like a-g and r, you can use % in conjunction with lengths i.e. "l8 %16 %32 %%%%". To designate which percussion note this actually is, use either %<x> (where x is a value from 0 to 9 i.e. %<6>16 or l16 %<6>) or %x,l (where l is the length i.e. %6,16). Both formats were desired, so I included each of them!

-A musician's mode has been set up. Use argument "-m" in the command line to make it not insert code related to sound effects or any sound effects at all without constantly manipulating your lists! Ideal for people that use AMK as a de facto SNES tracker.

-SPC700 output was originally conflicting with input, causing it to sometimes drop commands sent by the 5A22. It no longer sends constant output for now to the 5A22 mid-song to avoid this issue.

-SFX dumping has been fixed, allowing SFX that use noise to render properly to SPCs. Use "-dumpsfx" to dump the SFX to SPCs/1DF9 and SPCs/1DFC.

-Arpeggio functions are now excluded by default. Enable them from Settings.asm by setting !IncludeArpeggio to !true instead of !false if you really need it, although it will increase the size of the program noticeably if you do.

-The groundwork for a PWM engine by 6646 and I is placed, although it is currently not functional. It should be ready by the release candidate for AMK 1.1.

-Asynchronous loops are now possible! Make a channel loop independently from the other channels by including $F4 $0F at the beginning of that channel. No #option is needed to get this running.

-6646's new syntax mentioned in the standard AMK thread has been included. See this post for more information.

-To make it easier to set arguments via command line, I included a .bat that launches AddmusicK.exe for your convenience.

These new features should be used with "#amk 3" to work properly, as they are certainly not compatible with 1.05's .exe even though I designed these changes such that people should be able to safely migrate from 1.05 to 1.1. Please back up your ROMs before doing so though, please, as this is still being tested as an open beta.

Known issues:

-Sound effects that use only one channel and call a routine via code insert two bytes of garbage data which affects the sounds. As the Hurry Up sound is now polyphonic and the pause-related sounds now have a second channel for an echo, this won't affect the sound files currently included, although I plan on resolving this issue and giving an alternative pause sound that uses only one channel.
-A handful of features are currently not fully tested, including the loop break syntax ":". It'd be great if I could get some verification on their functionality
-Generation of ARAM images has been temporarily disabled
-AMK will occasionally claim that the ROM is using AMM instead of AMK due to how drastic the overhaul is. I need to adjust how it recognizes the engine to eliminate this issue and allow it to be overruled.
-the source files are not currently included, as I am still making changes
-When using musician mode via "-m", songs that are set up to be altered by riding Yoshi do not play the Yoshi channels due to having no sound effects present to activate this property
-Very light notes sometimes are registered as silence when paused, this is currently being tweaked so that the rate that volume is reduced when paused is non-linear to avoid this

Plans for the release version of 1.1 not present in this beta:

-A re-disassembled soundtrack for Super Mario World, fixing the various inaccuracies among the text files (which sometimes contain additional or missing notes or commands)
-A minor update to ASAR to fix some improper SPC700 syntax for tset1 and tclr1
-fixing the known issues listed above
-update the ARAM image generator feature to be usable again
-completed PWM, including the ability to have song-specific PWM routines
-include the source files
-include an option to generate global songs for a single local
-include an option where if you use -norom and no text files are designated, it defaults to generating spcs from a list
-provide some custom sound effects, including some altered YI sounds that use SMW samples by default
-create some custom sound effects for Bowser so that the SMW Bowser fight is a bit more salvagable with AMK than it currently is
-update the readme

I hope people enjoy the effort I put into this upgrade. As this is an open beta, please mention any issues you find here so I can clear them up and, like I mentioned before, please back up your ROMs before making the transition to ensure everything is fine.

Download Link

-Codec


EDIT:

New features in the 5/7 build:

-the ability to have quick transitions between SMW level themes (and the boss theme), between SMW OW themes, SMW Credits themes and SMW's bowser fight themes has been implemented go into SNES/patch.asm and set "!fastTransition" to "!true" to try it out as it actually makes the fight and credits in a playable state again! Do note that I set the org position in the new SampleChecker.asm to org $108000 for testing purposes. Move it around to wherever you have room if that's not free for you.
-as a consequence of testing this, all samples have been set to important in the default sample group as it seems AMK only will set the importance of a sample on the first attempt to locate it (i.e. I tried to make a sample group where all samples were important separate from the default, but it just resulted in some not being included based on the song). This should hopefully be fixed in the release candidate by making an easy way to group songs with a padding value. DO note though that I may not be able to get around that sfx still get dropped when transitioning songs as in earlier AMK builds, although I am toying around with an idea that may be able to get around this.
-fixed a bug that would occasionally crash the soundchip if a song didn't loop due to changes in how they were compiled
-included some sound effects from the GBA ports done by ear (can't rip them yet directly). They're not in the default sound effect list, which only has SMW and SMAS sounds, but a list with them is also included. Speaking of which, I will be changing the sound ids for several SMAS and GBA sounds in the next major 1.1 release (in order to remove several of the less necessary sounds, such as the unused ones), although the SMAS sounds themselves should be accurate.
-included two new .bat files for your convenience. AddmusicK+SFX.bat (launches AddmusicK like normal, but also will compile SFX SPCs) and Trackmusic.bat.
-Trackmusic.bat is a new feature, which allows you to quickly compile SPCs without SFX or SFX-related code being included and without needing to use a ROM or arguments! In fact, you can use a separate list from Addmusic_list.txt called "trackmusic_list.txt", which will be referenced to determine which SPCs you want to produce, keeping your ROM songs and your tracker music separate while remaining in the same folder! Do note though that SPCs for both are currently placed in the regular SPC folder. I may change that so that the ones made using the Trackmusic.bat are instead loaded into "TrackSPC" or something like that. Also, if you do not have a "trackmusic_list.txt" in your folder (the zip provides one, though), it assumes that it should read the "addmusic_list.txt" instead. Don't worry though, in either case, it won't include the global songs, providing the maximum amount of space possible!
-made the NINTENDO logo load moderately faster by making it upload only the one sample it uses for the coin sound
Awesome! I'll try it.
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!

Not a big fan of all those sound effects being included by default when literally nothing will be using them out of the box and .asm files can simply instruct the user to enable them if needed. That's just me wanting it to be neat though, in practice it likely will not affect anyone ever given that it's a measly 200 byte increase from the old AMK, which is like nothing.

Nice job either way!
Your layout has been removed.
Really nice update, but what I'm not understanding is the percussion part. Does it mean that we can specify a note to play an instrument like the percussion midi channel? If so then best update ever.

If you're still adding new commands, I'd personally recommend an automatic panning fade that goes from left to right, like tremolo but it doesn't reset when a new note is played. Example

Again, very good update, AMK was almost dead so something like this was really needed.
I love you
Uhhhhhh, why can't I use function notation for pitch bend syntax in regular songs? I feel baited.
Originally posted by Pinci
Really nice update, but what I'm not understanding is the percussion part. Does it mean that we can specify a note to play an instrument like the percussion midi channel? If so then best update ever.


The N-SPC engine uses #$D0-#$D9 (#$D9 is unused by SMW, but can be set in custom percussion) as default percussion notes with predetermined notes that call samples without needing additional steps related to calling those instruments. AMK already could call these, but the way it did so was MASSIVELY unintuitive. (Ever noticed the percussion instrument spam in certain text files? This is why since if you call subsequent notes, it tries to play them as normal notes instead)

The % syntax allows you to call these in a fashion that is more logical. To answer your question, basically it is similar to percussion midi in that regard. It's worth mentioning though that if you are using a sample with multiple pitches, that the amount of times it is used will determine if it's more effective to set it as a custom instrument or custom percussion, as you'll need to duplicate the 7 bytes related to instrument data for the percussion note (with the 7th of course being the pitch). Songs that use a lot of percussion notes that switch samples often benefit the most.

Originally posted by Pinci
If you're still adding new commands, I'd personally recommend an automatic panning fade that goes from left to right, like tremolo but it doesn't reset when a new note is played. Example

Again, very good update, AMK was almost dead so something like this was really needed.


I'll consider this. By the way, thanks for the kind regards!

Originally posted by nobody1089
Uhhhhhh, why can't I use function notation for pitch bend syntax in regular songs? I feel baited.


I haven't added functions similar to PitchBend to song syntax, those are specific to sound effects. However, I am highly considering doing so since it'd probably be intuitive.
This all seems amazing so far, but have you considered re-implementing the "$F4 $04" square wave ratio reset and the "$FA $XX" oscillation frequency of square wave effects for AddMusicK?
Kipernal for some reason removed these effects when they were originally available for AddMusicM, but I still think they can still be a cool effect to make use of, The "$F4 $04" command itself has not been replaced in any way, just disabled, but the "$FA $XX" command can be changed into something like "$FA $05 $XX" or something to co-exist with the other "$FA" commands with AddMusicK.
I still think people should try to make more use of it to possibly make their ports sound better or give them cool effects.
Hey y'all, Scott here!

PFP by: https://twitter.com/GinCalico (🔞 Warning)
Thanks a lot for the release. Apparently -m disables sound effects, but not global songs. Should -m omit all global songs to save more space?
Originally posted by AntiDuck
*adding back $F4 $04 and $FA $XX*


Seconding this. Kipernal's removal of them was pretty disappointing when I needed it for a number of ports.
Originally posted by Sayuri
Originally posted by AntiDuck
*adding back $F4 $04 and $FA $XX*


Seconding this. Kipernal's removal of them was pretty disappointing when I needed it for a number of ports.

Originally posted by Codec
Plans for the release version of 1.1 not present in this beta:

-completed PWM, including the ability to have song-specific PWM routines

It's in the works. (maybe you should read things more carefully!)

side note: <3 amk is best thx u
soundcloud / bandcamp / twitter / buy/stream my EP / buy my touhou music / buy my NEW album!!!
I was supposed to be leaving forever, but this update is everything I've ever asked for and more. Finally AMK is in an usable state. I'm glad the few remaining actual hackers out there will finally be allowed to make good-sounding hacks again. The old SFX merge was horrible.

Now I swear this is the True Final Post.
Unless you can release an update to remove shitposters?


TRUE FINAL EDIT FOR OLD TIMES' SAKE: Forgot that most people didn't see my thread or my custom titles. Didn't want to derail the thread by dropping that bomb, sorry for any and all cancer that may occur.
see you next week
HackPortsASM"Uploader"

Originally posted by aCrowned
I was supposed to be leaving forever


Wait what the fuck?! Where did this come from? Well, sorry to see you go.
Please no derailing y'all

EDIT: and no drama ok? You know where complaints go and it's not in this thread
It's easily the best thing I've done
So why the empty numb?
Readable SFX files?

Multichannel SFX?

Fixed -dumpsfx?

Correct Percussion notes without spamming @XX?

T H E R E I S A G O D

A request: Would it be possible to track the current position of the song, and modify it?

And a really weird question: I can't find that weird byte in ARAM that pauses the song for X bytes, then goes back to the loop point ($000C in AMK1.0.X). I tried making use of that byte in my hack. Is it gone? Or was it remapped?
Hacks:
Originally posted by Coolmario
A request: Would it be possible to track the current position of the song, and modify it?


From viewing the text? No. From viewing the byte positions in ARAM? Use AMPlayer's Memory Editor and observe bytes 30-3F (2 bytes per channel, 16-bit).

Manually altering them with commands? Same deal, hijack 30-3F, but it will get messy.

Originally posted by Coolmario
And a really weird question: I can't find that weird byte in ARAM that pauses the song for X bytes, then goes back to the loop point ($000C in AMK1.0.X). I tried making use of that byte in my hack. Is it gone? Or was it remapped?


It was moved to $1C from $0C, labelled "!SongCheckWait". I moved around several bytes to organize the ARAM better since bytes on the first page (0x00zz) are accessible by certain opcodes (although technically they can access the second page (0x01zz) using setp and clrp).

In addition, several bytes that were used as boolean flags have been compressed into single bits, taking advantage of the branch bit set/clear opcodes that the SPC700 has and the utility of the channel processing flag byte, which can be used to "and" a channel-bitwise value to get a boolean result instead of cluttering the first 0x400 bytes that are used for other forms of information. Freeing up this area was important to me for plans for the future.

Check S0_Labels.asm to see what all the ARAM values before 0x400 are used for as I went and labelled as much as I could to make it very clear what something is used for whenever possible.
Originally posted by Sinc-X
Is it just me or is $F4 $02 completely broken in the update?


Looked into it, seems I accidentally left a debug constant test value in where the value that $F4 $02 modifies usually is, making the program always assume it was #$02. The F4 function itself was fine, it's just that the value wasn't being accessed.

I reuploaded it now.