Repository navigation
Conversation
Source: NotRexed/Hookshot#1063 Original proposal by: blushOFF Original head: c40dc0a4e5b518cb960d1994974c5e8435bca543 Verified source tree: 1afc6a6 Reconstructed import commit, not a claim of original authorship. Source head author: Blush <blushanderbuisness@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Longshot is preserving this upstream proposal for review. This draft is not an adopted or functionally verified fix.
Source: NotRexed/Hookshot#1063
Original contributor: blushOFF.
Original head:
c40dc0a4e5b518cb960d1994974c5e8435bca543.Exact source tree:
1afc6a695745127a767f49d112547c107ececf05.Import parent:
7dbdcdc00889ccf038ad95c7481ad6e10397f8a5(common ancestor with the migration base).The source-tree checksum matches exactly. Original commits after the common ancestor are represented by one reconstructed import commit; source links and authorship are recorded. This snapshot can contain prerequisites beyond our migration base. Review its complete diff and overlapping proposals before merging.
Validation here: copying fidelity only. Platform builds, gameplay, functional behavior and the upstream author's claims have not been independently verified. Keep draft until reviewed, rebased and tested.
Original proposal
OoT calls
nn::audioeffects that the import handler took until now, so the mixes they sit on came out dry: noreverb on the sub mixes the game gives one, no delay, and no filter on a mix. A gameplay log listed them as
unimplemented import(43nn::audiosymbols, withlr, so called). This implements them inhost/nn_audio.c.What it adds
AddReverb,Set/IsReverb*,Set/GetReverbInputOutput): run on the existing I3DL2 network, from theplain reverb's parameters: linear early, late, reverb and out gains; the early mode as the size of the early-reflection
taps (small room to cavern; none); the late mode as the late delay (room, hall, plate, cavern, maximum); pre-delay,
decay time and high-frequency decay ratio. This is an approximation of the console's reverb, not a copy of it.
AddDelay,Set/GetDelay*,Set/IsDelayEnabled,SetDelayInputOutput): a delay line per channel; whatcomes back is low-passed (
LowPassAmount), mixed with the neighbour channel's (ChannelSpread) and fed back(
FeedbackGain); out =DryGainx input + the delayed signal.HOS_AUDIO_NO_DELAY=1leaves it out.AddBiquadFilter,SetBiquadFilterParameter,SetBiquadFilterEnabled,SetBiquadFilterInputOutput): the floatTBiquadFilterParameter(flag @0, numerator @4, additive denominator @16, asaudio: honor the float voice biquad parameter ABI NotRexed/Hookshot#669 reads it for voices), transposed direct form II as the voices' filters, with the same blow-up guard.
SetSplitterBiquadFilterParameter, sub mix and final mix): two filters perdestination, applied to that destination's copy of the voice.
SetAuxEnabled,SetAuxInputOutput(aux stays pass-through),AcquireAudioOutputDeviceNotification, the device output volume and auto-tune calls,ListVirtualInputDevices, thevoice-drop parameter.
(
audio: reverb 0 on mix 7: wet rms ...), as a check that it does something.The voices' float biquad parameter is left to NotRexed/Hookshot#669.
Measured
audio: biquad filter 0 on mix 2,audio: delay 0 on mix 4, 6 channels, up to 500 ms,audio: reverb 0..2 on mix 7/8/9; the low pass the game keeps on mix 2(b 0.416 0.833 0.416, a -0.461 -0.205) now filters. 142 s of output dumped (
HOS_AUDIO_DUMP) without clipping.unimplemented importleft fornn::audio: the voices' float biquad parameter, which audio: honor the float voice biquad parameter ABI NotRexed/Hookshot#669implements.
tests/test_audio_effects.py(registered intests/run_all.pywith gcc) compiles the real delay and mix-filtersection with synthetic signals: echoes at the delay time and at the feedback, dry gain, channel spread, a NaN input,
a one-pole low pass (50 Hz kept, 12 kHz down by more than 20 dB) and unstable coefficients (silence, no burst).
Not done
reverb_frameis where they go.