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
Chris Robinson
661bd054aa
Use a single delay line for chorus feedback on a fixed tap
...
The outputs themselves use a variale-delay tap, but using a separate fixed-
delay tap on the feedback helps improve the perceived "wobble" with sustained
notes. This also applies to the flanger effect.
2017-12-18 13:41:12 -08:00
Chris Robinson
eee4aca40b
Apply chorus and flanger feedback on the tapped re-feed
2017-12-17 22:14:20 -08:00
Chris Robinson
04cf832fe6
Use the selected mixer for chorus and flanger output
2017-12-17 22:10:58 -08:00
Chris Robinson
2346426b6e
Make MixSamples non-static global
2017-12-17 21:48:07 -08:00
Chris Robinson
ff3d31e17f
Update flanger with the same changes as chorus
2017-12-15 17:35:46 -08:00
Chris Robinson
d281b25723
Use a separate LFO offset in the chorus effect
...
Given that the LFO range is not a power-of-two, it won't correctly wrap on
overflow.
2017-12-15 17:26:03 -08:00
Chris Robinson
2a3b5ab9e9
Use linear interpolation for the chorus delay output
2017-12-15 16:50:06 -08:00
Chris Robinson
369f52a0d7
Add an option to ignore the app's speed of sound for reverb decay
2017-09-22 05:42:04 -07:00
Chris Robinson
fc9cb2fbd8
Use the app-specified speed of sound for reverb decay
...
Specifically, the initial reverb decay as determined by the source distance,
and the reverb decayhf limit from air absorption.
2017-09-21 10:20:59 -07:00
Chris Robinson
90cedbea49
Pass the context to the auxiliary effect update method
2017-09-21 05:42:35 -07:00
Chris Robinson
e8ce8924d1
Use sqrtf for single-precision square roots
2017-06-29 10:28:37 -07:00
Chris Robinson
e9a7218a06
Remove the fastf2u conversion function
2017-06-27 07:25:08 -07:00
Chris Robinson
b4aea294c3
Calculate chorus and flanger mod delays separately from feedback
2017-06-07 12:42:54 -07:00
Chris Robinson
10ff6cba9c
Make the late lines' delay the delay average for modulation
...
Similar to the recent chorus and flanger changes, the modulation delay now
swings between -n to +n, where n is less than the delay length. This brings up
a slight issue with the linear interpolation, as modff doesn't produce the
correct fraction value for interpolation (it's inverted, with 0 being closer to
the next sample and 1 being closer to the base). So it's using nearest
interpolation for now.
2017-06-07 10:39:19 -07:00
Chris Robinson
653f0a1405
Fix handling chorus and flanger LFO displacement offset
...
The phase offset is modulo-wrapped rather than masked, so it's best to avoid
negative offsets.
2017-05-26 09:09:35 -07:00
Chris Robinson
2b14c1d623
Properly handle the chorus and flanger LFOs
...
The effects' specified delay is the average delay time, meaning the delay
offset should move between -n and +n relative to the delay, where n <= delay.
2017-05-26 08:52:07 -07:00
Chris Robinson
5691dceb38
Add a method to copy a filter's coefficients
2017-05-21 03:31:44 -07:00
Chris Robinson
edcdc1dae8
Avoid unnecessary doubles
2017-05-21 02:42:44 -07:00
Chris Robinson
0b2467ed54
Use a macro to specify the decay target gain
2017-05-21 00:01:39 -07:00
Chris Robinson
154e53b911
Reduce the main reverb filter gain limit to match the rest
2017-05-16 13:23:16 -07:00
Chris Robinson
2aa620e58f
Make reverb delay line structs use interleaved floats
2017-05-15 00:30:47 -07:00
Chris Robinson
b2760baa64
Make the reverb's early and late feedback lines interleaved
2017-05-14 23:28:22 -07:00
Chris Robinson
7cbce6806b
Update a couple comments about the reverb modulation
2017-05-13 16:08:45 -07:00
Chris Robinson
0b66b2bbe7
Replace 4 separate all-passes with one vector all-pass
...
Each 4 related all-passes now share a structure with one delay line, which uses
an interleaved sample history. Also fixes some potential rounding problems for
delay lines with interleaved samples.
2017-05-13 15:45:05 -07:00
Chris Robinson
87d4710bc4
Apply reverb modulation to the late feedback lines
...
This seems to be more in-line with the intended behavior, to allow build-up and
overlap within the reverb decay, rather than a pitch-shift on input.
Unfortunately there's no readily available implementation of this reverb model
that includes modulation to compare with, so a low depth coefficient is used to
keep it very subtle.
2017-05-12 20:53:14 -07:00
Chris Robinson
d456c799fd
Remove the 0.5 gain on the reverb output
...
Turns out to be unnecessary, as it reduced the volume below what other reverb
implementations provide with the same presets.
2017-05-11 23:26:29 -07:00
Chris Robinson
685dc24299
Restore the previous reverb B2A and A2B matrices
...
Also, untranspose the A2B matrix.
2017-05-11 21:48:47 -07:00
Chris Robinson
f880f67049
Update reverb conversion matrices and output gain
2017-05-08 13:57:31 -07:00
Chris Robinson
4e5c4b8e01
Add a slight bit of attenuation to the reverb output
2017-05-02 15:55:58 -07:00
Chris Robinson
53c3d48fe0
Change some ALuint parameters to ALsizei
2017-05-02 04:54:59 -07:00