243 Commits

Author SHA1 Message Date
Chris Robinson
20bee69955 Attempt to improve the reverb panning vectors
This should now retain the original orientation of the soundfield and merely
focus on the panning vector direction, as intended.
2018-02-08 01:18:40 -08:00
Chris Robinson
4cd04f192d Alter tha curve of the density-related delay scale
The delay scale is roughly linear with respect to room size, however the
density is not linear with room size. The density is calculated by taking the
room size cubed, then normalized by some factor. Unnormalizing the density and
taking the cube root restores the original room size to use as a delay scale.

The patch also alters the delay and all-pass line lengths to be based on a 1
meter room size, so the the room size recovered from the density acts as a
direct multiple for the desired target length.

Note that the room scale range is unchanged (5m to 50m), so the minimum and
maximum delays are the same. It should also be noted that 50m may not be the
correct room size for a density value of 1. A density value of 1 corresponds to
an environment size of roughly 2.52m when converted from EAX (DENSITY_SCALE
should be 16 rather than 125000), but sizes that low result in undesirable
resonance in the feedback, indicating other changes are necessary for that to
work.
2018-02-08 00:05:29 -08:00
Chris Robinson
da1ee3baba Revert "Don't fade the all-pass delay changes"
This reverts commit 799dfb732b4f49198d72649e86955ea82f45f229.
2018-02-04 19:57:22 -08:00
Chris Robinson
99f0377ae3 Construct error messages using parameterized values 2018-01-25 15:59:59 -08:00
Chris Robinson
2ded5547ba Provide messages for the remaining AL errors 2018-01-24 17:07:01 -08:00
Chris Robinson
e80b016cbe Use a global RowMixerFunc 2018-01-16 12:18:59 -08:00
Chris Robinson
14a0df03e8 Do more samples at once with the distortion effect 2018-01-16 08:49:15 -08:00
Chris Robinson
799dfb732b Don't fade the all-pass delay changes 2018-01-15 18:02:11 -08:00
Chris Robinson
813b06a3a4 Fix a comment regarding the T60 filter coefficients 2018-01-15 09:22:28 -08:00
Chris Robinson
47c9b0a17e Simplify preparing the T60 filters 2018-01-15 09:17:15 -08:00
Chris Robinson
7441311e3d Use separate input and outputs for the T60 and allpass processing 2018-01-15 05:37:00 -08:00
Chris Robinson
6f48dac4cc Use a proper type for the T60 decay filter 2018-01-15 05:23:35 -08:00
Chris Robinson
bc078e5158 Separate some anonymous structs into defined structs 2018-01-14 15:42:25 -08:00
Chris Robinson
63416bf28f Avoid unnecessarily using type aliases 2018-01-14 09:02:59 -08:00
Chris Robinson
7e491ef2b2 Remove a redundant lower value clamp 2018-01-14 08:25:36 -08:00
Chris Robinson
6f532fa0e5 Don't check the modulation depth for changes multiple times 2018-01-14 07:33:53 -08:00
Chris Robinson
25b3ed3532 Use separate arrays for the T60 filter states 2018-01-14 07:29:18 -08:00
Chris Robinson
7a77a20a67 Use a macro for the number of reverb lines 2018-01-14 07:25:02 -08:00
Chris Robinson
2957d85924 Only pass the needed parameters to LateT60Filter 2018-01-14 05:24:23 -08:00
Chris Robinson
2b968766b9 Pre-apply the T60 filter midgain to the HF filter coeffs 2018-01-13 09:58:47 -08:00
Chris Robinson
78cb70a5f9 Replace some freq_mult variable names with f0norm
The latter is a bit more descriptive as f0 is often used to denote the
reference frequency of a filter, so f0norm indicates the normalized reference
frequency (ref_freq / sample_rate).
2018-01-13 09:14:46 -08:00
Chris Robinson
2873abcbc0 Fix up some types for MSVC 2018-01-11 10:55:35 -08:00
Chris Robinson
ca9e6a4f94 Ensure NextPowerOf2 is being used correctly 2018-01-11 09:53:52 -08:00
Chris Robinson
ff231b42ff Reorder some loops in the equalizer and use MixSamples 2018-01-11 05:03:00 -08:00
Chris Robinson
9c33f4aea8 Use MixSamples for the dedicated and ring modulator effect output 2018-01-11 04:48:18 -08:00
Chris Robinson
f55583330b Apply the distortion gain to the mixing gains 2018-01-11 04:34:51 -08:00
Chris Robinson
15f9d15ba0 Avoid using macros to access anonymous structures 2018-01-11 03:45:23 -08:00
Chris Robinson
ef63ec3fe9 Use one macro to handle both resample padding sizes 2018-01-09 23:55:59 -08:00
Chris Robinson
de8c5b1824 Combine the chorus and flanger processing functions
Given that they're nearly identical, it should be relatively simple to use the
same effect state to process either of them, similar to the reverbs. The big
differences seem to be the delay range (much shorter with flanger) and the
defaults.
2018-01-09 23:21:16 -08:00
Chris Robinson
5d1207104a Remove standard reverb specific processing functions 2018-01-07 22:48:03 -08:00
Chris Robinson
d547f52d8f Move the UNEXPECTED macro to the main header and rename it 2018-01-07 22:20:08 -08:00
Chris Robinson
56e9cb69d3 Ensure the chorus delay and depth leave enough padding for resampling
Also use cubic resampling for the modulated tap. Applies to flanger too.
2018-01-07 21:15:18 -08:00
Chris Robinson
32330c5eef Use separate outputs for the vector reverse and scatter functions 2018-01-04 20:04:39 -08:00
Chris Robinson
e00ef16893 Avoid the modulated output tap for late reverb
And fix the output filtering. The modulation code is still there since it's
(probably) technically correct, but the interaction with the feedback loop and
filtering on the output caused improper behavior which needs to be sorted out.
2018-01-04 19:17:16 -08:00
Chris Robinson
08a4840298 Don't offset the reverb modulation sinus 2018-01-02 19:52:57 -08:00
Chris Robinson
a16f933e3a Use a float literal for float math 2018-01-02 19:44:31 -08:00
Chris Robinson
27dfb7fd11 Fix up a comment 2017-12-24 20:41:20 -08:00
Chris Robinson
6457df54bb Don't make a pass-through macro for FadedDelayLineOut 2017-12-24 20:41:20 -08:00
Chris Robinson
07f3ed0419 Use linear interpolation for reverb modulation
The core LateReverb_* functions are explicitly written out now, since the
tapping and blending done by the Faded version is a bit more complex and it's
not so easy to ensure proper optimizing on the Unfaded version.
2017-12-24 20:40:53 -08:00
Chris Robinson
dabb99de8d Don't offset the chorus/flanger delay and LFO
The delay being added to the scaled LFO will ensure a proper positive result
regardless.
2017-12-24 20:40:33 -08:00
Chris Robinson
254ebe5f96 Fade between depths in the reverb modulator 2017-12-24 16:23:30 -08:00
Chris Robinson
b32a366137 Use a separate unmodulated feedback tap for reverb 2017-12-24 14:21:13 -08:00
Chris Robinson
ce74098b40 Clarify some reverb values 2017-12-23 21:13:57 -08:00
Chris Robinson
5769efe48e Reorder some global variables 2017-12-23 18:50:38 -08:00
Chris Robinson
02051ab51a Cleanup reverb modulation scaling 2017-12-23 14:18:14 -08:00
Chris Robinson
d7895db166 Fix the lfo_offset for a 0-rate flanger 2017-12-19 19:15:34 -08:00
Chris Robinson
0f84e32520 Use MixSamples for the echo output 2017-12-19 15:13:11 -08:00
Chris Robinson
1a911be617 Update the chorus and flanger state struct less often 2017-12-19 15:12:06 -08:00
Chris Robinson
a0565dc9bb Make the echo effect only apply feedback to repeated samples 2017-12-19 14:11:37 -08:00
Chris Robinson
52569ef562 Fade gains in the chorus and flanger output 2017-12-19 13:52:05 -08:00