aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
Commit message (Collapse)AuthorAgeFilesLines
* Increase the pitch shifter oversample factor to 8Chris Robinson2023-01-191-38/+37
| | | | | | And use 32-bit float processing. Float precision doesn't seem to be detrimental to the overall quality, while 8x oversampling seems to help against the harmonics.
* Minor code refactor for the frequency shifter effectChris Robinson2023-01-191-47/+50
|
* Improve the output scaling of the pitch shifterChris Robinson2023-01-191-1/+1
| | | | | | For tones than land exactly on a frequency bin, which are subject to the least amount of error when not adjusted, this produces a level that more closely matches the original input.
* Don't return a large-ish array on the stackChris Robinson2023-01-191-15/+17
|
* Slightly improve phase wrapping in the pitch shifterChris Robinson2023-01-191-10/+11
|
* Limit pitch shifter pitch between 0.5 and 2.Chris Robinson2023-01-181-1/+1
| | | | | | The current algorithm isn't designed to go beyond that. The course tuning property is limited to that range as well, though the fine tuning property could potentially extend it out by half a semitone.
* Use constexpr variables instead of macrosChris Robinson2023-01-181-51/+57
|
* Use a variable to handle a long value definitionChris Robinson2023-01-181-2/+3
|
* Make a variable for a reused valueChris Robinson2023-01-172-3/+3
|
* Use a better frequency bin target for pitch shiftingChris Robinson2023-01-172-23/+47
| | | | And slightly adjust the Hann window.
* Change a couple macros to constexpr variablesChris Robinson2023-01-166-18/+18
|
* Rename some members for clarityChris Robinson2023-01-121-22/+22
|
* Rename some lambda parameters to avoid shadowing warningsChris Robinson2023-01-055-15/+15
|
* Add and use mixers that process one input and output channelChris Robinson2023-01-054-8/+8
|
* Simplify handling effect output for spatial effectsChris Robinson2023-01-045-83/+140
| | | | | | | | | | | | Effects are given a 3D ambisonic buffer of the same order as the device, for processing surround sound. Effects that pass input channels to matching output channels as it processes them don't need to mix each input channel to all output channels. At most, an input channel may mix to a different output channel, if the target buffer uses a different channel layout, and need a gain adjustment, if it uses a different scaling. With a 2D output buffer, a number of channels can be skipped altogether.
* Handle UHJ better with convolution reverbChris Robinson2023-01-011-44/+66
| | | | | | It's now decoded to B-Format while being FFT'd, and processed as B-Format. Again, not that UHJ should really ever be used for convolution, but it's a valid format someone may want to use despite the overhead from converting it.
* Avoid some explicit casts and referencesChris Robinson2023-01-011-2/+1
|
* Avoid duplicate code to update the reverb delay linesChris Robinson2022-12-221-14/+7
|
* Include the reverb delay times in the fade sample countChris Robinson2022-12-201-24/+15
|
* Make sure to update the input filters with partial updatesChris Robinson2022-12-201-1/+11
|
* Clean up some reverb mixing loopsChris Robinson2022-12-191-21/+18
|
* Turn a static member function into a lambda where it's usedChris Robinson2022-12-191-31/+29
| | | | And clean up some parameters
* Remove a redundant commentChris Robinson2022-12-181-4/+1
|
* Use a size_t for the reverb decay fade countChris Robinson2022-12-181-2/+2
|
* Clear the old reverb pipeline buffer when it's doneChris Robinson2022-12-171-9/+46
|
* Rework reverb fading to toggle between pipelinesChris Robinson2022-12-171-475/+360
| | | | | | | | | | | | When non-simple properties are changed, the active reverb pipeline is switched and the new parameters set on that one. The main process function will then be set to fade out input on the old pipeline, fade in input on the new pipeline, then process and mix both pipelines. After some number of samples (calculated from its decay time), the old pipeline will stop processing. This should improve the transition from a highly reverberant environment by not harshly interpolating to the new environment, as well as better handle changes to the all-pass and T60 filters.
* Avoid manually specifying FFT template parametersChris Robinson2022-12-142-5/+5
|
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-061-1/+1
|
* Avoid some uses of the LIKELY/UNLIKELY macrosChris Robinson2022-12-051-1/+1
|
* Use complex floats for convolution reverb FFTsChris Robinson2022-11-242-24/+23
|
* Avoid using a modulo in a loopChris Robinson2022-10-181-10/+42
|
* Track if doing 2D mixing onlyChris Robinson2022-09-042-2/+3
| | | | And use it to select the proper HF scales
* Allow different HF scales for 2D mixing/outputChris Robinson2022-09-042-2/+2
| | | | | Not actually used yet, the device needs to track whether it's using 2D or 3D mixing.
* Use the difference in HF scale for upsampling ambisonicsChris Robinson2022-09-032-2/+2
|
* Revert "Don't apply the HF scaling for "upsampling" ambisonics"Chris Robinson2022-09-022-4/+42
| | | | This reverts commit bf3f63fb4c5faa45784d7433d68b7013e29ee2c1.
* Don't apply the HF scaling for "upsampling" ambisonicsChris Robinson2022-08-312-42/+4
| | | | | | | | | | | | Not sure if this is best, but it fixes the issue of upsampling lower orders to higher orders multiple times (mixing lower order to higher order, cutting back to lower order by dropping the extra channels, then upsampling again, applying the HF scale multiple times and messing up the high frequencies/energy vector), as well as having too-strong high frequencies of upsampled content in general. As it is, with the new upsampling method, the lower order signal contributes to some higher order channels, which helps offset the high frequency scaling difference (except first- to second-order, which adds nothing).
* Do a simplified update for reverb when not fadingChris Robinson2022-08-291-49/+48
|
* Always fade the main early and late delay tapsChris Robinson2022-08-291-8/+33
| | | | | | | | | These were actually missing from the current check for fading. But the EFX documentation suggests these (along with the early/late gain and panning) can be adjusted often without invoking a full change, as dynamically modeling an environment would continually change these properties as the listener moves around (changing the direction and distance to the reflective surfaces). So ensuring they're kept up-to-date would be the way to go.
* Update reverb processingChris Robinson2022-08-291-285/+290
| | | | | | | | | | | | | Separate the core delay line into early and late input delay lines. This will be necessary to allow a second late reverb processing loop to decay after a change. Also ensure the early reflection delay line is long enough to write in MAX_UPDATE_SAMPLES first without interfering with the subsequent read. And ensure the modulation delay doesn't cause an underflow on the feedback offset. Finally, move the loop inside the processing functions to minimize loop iterations.
* Upsample the reverb output as neededChris Robinson2022-08-271-35/+94
|
* Create and use 2D upsampling matricesChris Robinson2022-08-252-2/+2
|
* Inline and precompute some CalcDirectionCoeffs callsChris Robinson2022-08-185-7/+7
|
* Inline a function and remove an unnecessary parameterChris Robinson2022-08-162-2/+2
|
* Use proper array sizes for more gainsChris Robinson2022-08-1512-22/+26
|
* Change an inline function to a class methodChris Robinson2022-08-021-4/+3
|
* Ensure some mixing buffers are aligned for SIMDChris Robinson2022-07-262-2/+2
|
* Use a boolean check instead of a function pointerChris Robinson2022-05-241-7/+14
|
* Avoid dividing by a constantChris Robinson2022-05-241-4/+4
|
* Rename lerp to avoid conflicts with C++20's std::lerpChris Robinson2022-04-063-6/+6
|
* Rename Sqrt1_2 for consistencyChris Robinson2022-02-011-5/+5
|