-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Sequences #2066
Custom Sequences #2066
Conversation
Certain sequences wouldn't play on the file select and title screen because they were too large to be cached.
Added octave drop to experimental features, which drops the octave of a note that is too high for the audio engine to actually play. Without this, some custom sequences have notes which cap at a specific value and sound terrible. At least with this they will still harmonize with the other notes. Experimental tab added to the SfxEditor to house the checkbox for the octave drop feature.
To be clear, fixes the more rampant portable ocarina bug present in my earlier builds, not the authentic one.
For miniboss fights and SfxEditor previews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this is looking really great! (and from what i can tell testing is going quite well too!) left a few comments in there (nothing major, mostly just places where a comment or two would help clear up what's going on)
looking forward to getting this merged!
#include "../../OTRGlobals.h" | ||
#include <Utils/StringHelper.h> | ||
#include "../../UIWidgets.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not something that needs to be fixed in this PR (mostly because it's kind of an all over the place thing in the codebase at the moment), but it seems like we shouldn't need these relative paths with our cmake include dir config
soh/src/code/audio_load.c
Outdated
//index = ((u16*)gAudioContext.sequenceFontTable)[seqId]; | ||
//numFonts = gAudioContext.sequenceFontTable[index++]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know this isn't part of the change but might as well delete these lines instead of just having them commented out
soh/src/code/audio_load.c
Outdated
@@ -1507,7 +1537,7 @@ s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* isDone) { | |||
|
|||
slowLoad->sample.sampleAddr = NULL; | |||
slowLoad->isDone = isDone; | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, extra space
Fixes audioseq crash when under 255 seqs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments but looking great!
std::vector<std::string> splitFileName = StringHelper::Split(fileName, "_"); | ||
std::string sequenceName = splitFileName[0]; | ||
SeqType type = SEQ_BGM_CUSTOM; | ||
if (splitFileName[splitFileName.size() - 1] == "fanfare" || splitFileName[splitFileName.size() - 1] == "Fanfare") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does tolower()
not work here? then you can simplify this check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually call tolower()
in SequenceOTRizer now when actually writing the filename so technically I could get rid of the capital letter check here. Does retro lowercase the _tag
at the end? If not I can refactor this to use tolower()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, we lower case it here: https://github.com/HarbourMasters/retro/blob/main/lib/otr/types/sequence.dart#L26
soh/src/code/code_800F9280.c
Outdated
if (seqId != newSeqId) { | ||
gAudioContext.seqReplaced[playerIdx] = 1; | ||
} else { | ||
gAudioContext.seqReplaced[playerIdx] = 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (seqId != newSeqId) { | |
gAudioContext.seqReplaced[playerIdx] = 1; | |
} else { | |
gAudioContext.seqReplaced[playerIdx] = 0; | |
} | |
gAudioContext.seqReplaced[playerIdx] = seqId != newSeqId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, definitely should've noticed this. Thanks for pointing it out.
Sort custom seqs by meta name
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wonderful! Let's (assuming you're ready to call it good @leggettc18)
One or two more formatting fixes from the review that I haven't applied yet but then I'd say it's good. |
OK, if CI is happy after this point it should be good enough. |
Whoops, one more tiny bug found fix already uploaded. |
Adds support for existing Custom Audio Sequences into the game, specifically any Sequences useable in N64 OoT Rando should be useable here. To create your custom sequence patch OTR, I have also written a small CLI utility that can be used until something more robust is made. Download the version built for your operating system here and follow the instructions on this page to create your patch OTR. You should end up with a file called
custom-music.otr
in themods
folder of your SoH installation. This tool is intended to parse pairs of.seq
and.meta
files, like N64 OoT Rando does (more details).Once you have your patch OTR in your mods folder, you can select your custom sequences in the Sfx Editor, and they will be included in the randomization when you click the "Randomize All" button. They are also separated into BGM and Fanfare categories according to the .meta file contents, currently the custom BGM sequences are available for all BGM categories in the editor.
Additionally, this PR adds a few new things to the Sfx Editor.
I would like to thank the entire SoH Development team for helping me make this a reality. Additionally, I would like to give a Special Thanks to two specific people:
EDIT: v0.2 of SequenceOTRizer has been released
Build Artifacts