Skip to content
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

Merge v3 from develop #12

Merged
merged 48 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d7be822
Add develop branch, vocalredisobuffer.jsfx
micsthepick Oct 17, 2020
d831338
Incoporate local changes from other machine
Oct 17, 2020
99f518c
add vocalredisowindows.jsfx which has the second window function to h…
Oct 21, 2020
f28afdc
fix glitches with input buffering - in the process rename some variab…
Oct 22, 2020
37153fa
set default window for second window buffer to prevent clicking
Oct 22, 2020
421c85b
added new version:
Nov 10, 2020
437a5ec
constant optimizations, remove input buffering, as this seems to be u…
micsthepick Nov 23, 2020
afdaf43
scale output correctly for vocalredisophaseinput.jsfx
micsthepick Nov 23, 2020
515a12a
performance improvements
micsthepick Jan 1, 2021
92d058f
fix the errors introduced in the last commit, still trying to get bet…
micsthepick Jan 5, 2021
33a57e7
floating multiplication is faster than addition (if it were not JSFX …
micsthepick Jan 5, 2021
f647b6e
add simplified version, that removes the ability to manually choose w…
micsthepick Apr 25, 2021
3f28f22
add vocalredisoBlurry.jsfx
micsthepick Apr 25, 2021
c48c194
fixes to get vocalredisoBlurry compiling
micsthepick Apr 25, 2021
1f5952d
add more overlap version - better frequency resolution with more overlap
micsthepick Apr 25, 2021
2bab1f6
fix "undo input corrections" for latest three files
micsthepick Apr 27, 2021
36bd4e4
bugfixes - fix mono audio glitches
micsthepick Jul 6, 2021
7fccb19
fix initial silence for vocalrediso-more-overlap
micsthepick May 5, 2022
d5be71d
delete *windows.jsfx and merge *.jsfx and *simplified.jsfx
micsthepick May 5, 2022
a885c8a
general improvements
micsthepick May 5, 2022
74a21bf
fix semicolon
micsthepick May 5, 2022
f2ea091
add weiner-deconvolve denoise variant
micsthepick May 5, 2022
541cf2b
simplify creation of buffers
micsthepick May 11, 2022
11ea976
experiments-branch
micsthepick Jun 1, 2022
29e2749
MDCT testing
micsthepick Jun 13, 2022
4ea873a
fix PDC delay, and reduce non-compensated delay
micsthepick Jun 13, 2022
843a9f2
fix original STFT version glitch on playback restart
micsthepick Jul 17, 2022
a9376b1
Merge branch 'main' into develop
micsthepick Feb 26, 2024
2d11fe4
Merge branch 'experiments' with development
micsthepick Feb 27, 2024
25249b0
consolidate
micsthepick Feb 27, 2024
6aff9b7
more consolidation
micsthepick Feb 27, 2024
d0d26c2
preliminary testing (WIP)
micsthepick Feb 27, 2024
6dad3d6
fixme ISSUE_TEMPLATES
micsthepick Feb 27, 2024
0c4465d
WDL
micsthepick Feb 27, 2024
cd93960
fix workflow?
micsthepick Feb 27, 2024
e266dec
use setup-nasm
micsthepick Feb 27, 2024
056e396
change path to test_eel.sh in YML
micsthepick Feb 27, 2024
fe8c0ff
better tests
micsthepick Feb 27, 2024
58e5c47
compile script
micsthepick Feb 27, 2024
691b7d6
I expect this new test to fail.
micsthepick Feb 27, 2024
802f992
try again
micsthepick Feb 27, 2024
cbd19fd
actually fix some bugs?
micsthepick Feb 28, 2024
cfd6330
fix up non test build
micsthepick Feb 28, 2024
38c5752
nan and inf can't be passed to a function,
micsthepick Feb 28, 2024
a8373ce
inf + nan do work!
micsthepick Feb 28, 2024
6e0c4f9
fix Blurry, better testing
micsthepick Feb 29, 2024
902d3a3
fix eel compilation and improve blurry
micsthepick Feb 29, 2024
bafbf85
readme updates
micsthepick Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report--will-not-load-.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If applicable, add screenshots to help explain your problem.
- Device: [e.g. Samsung Galaxy S 22 Note Plus]
- OS: [e.g. Android 13]
- Host [e.g. RootlessJamesDSP]
- Play store used [e.g. Google Play Store, F-Droid]
- Play store used [e.g. Google Play Store, F-Droid]
- Plugin Version [e.g. 1.0.0]

**Additional context**
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test JSFX

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v4
name: Check out repository code
with:
# Fetches all submodules recursively
submodules: 'recursive'

- name: Compile EEL2 with NO_GFX
run: |
./compile_wdl.sh

- name: Run Tests
run: |
./test_eel.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,6 @@ MigrationBackup/

# Fody - auto-generated XML schema
FodyWeavers.xsd

*.test.eel2
*.test
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "WDL"]
path = WDL
url = https://github.com/justinfrankel/WDL.git
ignore = all
2 changes: 2 additions & 0 deletions EXPERIMENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# welcome to experiments
this is where I'm keeping some alternate versions of the plugin.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ It can isolate or attenuate the vocals (center panned audio) in a mix, and as su
### Reaper
Reaper supports JSFX natively, just copy vocalrediso.jsfx to `%AppData%\REAPER\Effects` (In a subfolder if preferred)

### VST compatible DAW (Instructions for windows)
### VST compatible DAW

#### Instructions for windows
JSFX can usually be run in a vst through [ReaPlugs by Cocos](https://www.reaper.fm/reaplugs/).
Download and install ReaPlugs, and pay attention to where it installs.
If you have Reaper installed, ReaPlugs should detect that `%AppData%\REAPER` exists and use that to load JSFX from %AppData%\REAPER\Effects instead of the local copy.
Expand All @@ -19,6 +21,12 @@ Otherwise, ReaPlugs will load effects from `...\ReaPlugs\JS` at the install loca

where \path\to\custom\folder\JS is the path to the JS folder that contains the ColorThemes, Data, Effects and presets folders that you would like ReaJs to use. (For example I run Equalizer APO and when reaper is installed, the audio service tries to load plugins from %AppData%\REAPER\Effects but is denied because of permissions)

#### Other:
try this fork of [ysfx](https://github.com/JoepVanlier/ysfx/).

### JamesDSP
simply load the eel instead of the JSFX. (not eel2)


## Using the effect:

Expand Down
1 change: 1 addition & 0 deletions WDL
Submodule WDL added at 805967
5 changes: 5 additions & 0 deletions compile_wdl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [ ! -z "$PREFIX" ] && [ "$PREFIX" = "/data/data/com.termux/files/usr" ]; then
# quick hack to enable testing in termux
export CPPFLAGS='-Dpthread_mutexattr_setprotocol(a,b)={} -Wno-unused-but-set-variable'
fi
make -C WDL/WDL/eel2 NO_GFX=1
16 changes: 16 additions & 0 deletions process_scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function process_eel_script {
local input_script="$1"
local output_script="$2"
local replace_str="$3" # New argument for the replacement

# Process the second script and append its contents to the output script
sed -r -e "s/\/\/IF${replace_str}|\/\*IF${replace_str}\{|\}IF${replace_str}\*\///" \
"$input_script" > "$output_script"
}

process_eel_script vocalrediso.jsfx-template vocalrediso.test TEST
process_eel_script vocalrediso.jsfx-template vocalrediso.eel EEL
process_eel_script vocalrediso.jsfx-template vocalrediso.jsfx JSFX
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.test TEST
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.eel EEL
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.jsfx JSFX
32 changes: 32 additions & 0 deletions test_eel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ensure latest testing script is available
./process_scripts.sh

# add defines to head of test script
cat testing_defines.eel2 vocalrediso.test > vocalrediso.test.eel2

function run_test {
local test_script="$1"
local test_output

echo "TESTING $1"

# Ensure latest testing script is available
./process_scripts.sh

# Add defines to head of test script
cat testing_defines.eel2 "$test_script" > "${test_script}.eel2"

# Run the test and capture output
test_output=$(./WDL/WDL/eel2/loose_eel "./${test_script}.eel2" 2>&1)
echo "$test_output"

# Get the last line of the output and check for failure
if echo "$test_output" | tail -n 1 | grep -q "^FAILURE"; then
echo "Failed Test Cases, will return -1!"
exit -1
fi
}

# Run tests for each script
run_test vocalrediso.test
run_test vocalredisoBlurry.test
122 changes: 122 additions & 0 deletions testing_defines.eel2
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@

// Helper functions to check for positive infinity, negative infinity, and nan
function is_pos_inf(x) (
(x * 2 == x) && x > 0;
);
function is_neg_inf(x) (
is_pos_inf(-x);
);
function is_nan(x) local(z1, z2) (
z2 = x;
z1 = x + 1;
z2 == 0 && z1 == 0;
);

function assert_equal_exact(expected, actual, message) global(failed_asserts, successful_asserts) (
is_nan(expected) && is_nan(actual) ? successful_asserts += 1 :
(is_pos_inf(expected) && is_pos_inf(actual)) || (is_neg_inf(expected) && is_neg_inf(actual)) ? successful_asserts += 1 :
expected !== actual ? (
fprintf(3, "\033[0;31mexpected: %g, was: %g. %s\033[0m\n", expected, actual, message);
failed_asserts += 1;
) : successful_asserts += 1;
);

function assert_equal_exact(expected, actual) global() (
assert_equal_exact(expected, actual, "values differ!")
);

function assert_near_equal(expected, tolerance, actual, message) global(failed_asserts, successful_asserts) (
is_nan(expected) || is_nan(actual) || is_nan(tolerance) ? successful_asserts += 1 :
(is_pos_inf(expected) || is_neg_inf(expected)) && (is_pos_inf(actual) || is_neg_inf(actual)) ? successful_asserts += 1 :
abs(expected - actual) > tolerance ? (
fprintf(3, "\033[0;31mexpected: %g (±%g), was: %g. %s\033[0m\n", expected, tolerance, actual, message);
failed_asserts += 1;
) : successful_asserts += 1;
);

function assert_near_equal(expected, tolerance, actual) global() (
assert_near_equal(expected, tolerance, actual, "values are not equal within tolerance!")
);

function assert_true(boolean, message) global(failed_asserts, successful_asserts) (
(!boolean) ? (
fprintf(3, "\033[0;31mexpected: true, was: false. %s\033[0m\n", message);
failed_asserts += 1;
) : successful_asserts += 1;
);

function assert_false(boolean, message) global(failed_asserts, successful_asserts) (
boolean ? (
fprintf(3, "\033[0;31mexpected: false, was: true. %s\033[0m\n", message);
failed_asserts += 1;
) : successful_asserts += 1;
);

function assert_true(boolean) global() (
assert_true(boolean, "");
);

function assert_false(boolean) global() (
assert_false(boolean, "");
);

function test_summary() global(failed_asserts successful_asserts) local(total) (
total = failed_asserts + successful_asserts;
failed_asserts === 0 ? fprintf(3, "\033[0;32mAll %d asserts succeeded.\033[0m\n", total) : (
successful_asserts > 0 ? printf("\033[0;34m%d of %d asserts succeeded.\033[0m\n", successful_asserts, total);
failed_asserts > 0 ? (
printf("\033[0;31m%d of %d asserts failed.\nFAILURE, see above!\033[0m\n", failed_asserts, total);
)
)
);

/*
pif = 0;
pif = 1/pif;
nif = 0;
nif = -1/nif;
lg = 2^64;

printf("z/z=%g, pif=%g, nif=%g\n", z/z, pif, nif);

assert_true( is_pos_inf(pif), " +1/0 is +inf");
assert_false(is_neg_inf(pif), " +1/0 is -inf");
assert_false( is_nan(pif), " +1/0 is nan");
assert_false(is_pos_inf(nif), " -1/0 is +inf");
assert_true( is_neg_inf(nif), " -1/0 is -inf");
assert_false( is_nan(nif), " -1/0 is nan");
assert_false(is_pos_inf(z/z), " z/z is +inf");
assert_false(is_neg_inf(z/z), " z/z is -inf");
assert_true( is_nan(z/z), " z/z is nan");
assert_false(is_pos_inf( 0), " 0 is +inf");
assert_false(is_neg_inf( 0), " 0 is -inf");
assert_false( is_nan( 0), " 0 is nan");
assert_false(is_pos_inf( lg), " 2^64 is +inf");
assert_false(is_neg_inf( lg), " 2^64 is -inf");
assert_false( is_nan( lg), " 2^64 is nan");
assert_false(is_pos_inf(-lg), "-2^64 is +inf");
assert_false(is_neg_inf(-lg), "-2^64 is -inf");
assert_false( is_nan(-lg), "-2^64 is nan");
*/

// drop in for spl(channel)
// function spl(channel) (
// 0 == channel ? spl0 :
// 1 == channel ? spl1 :
// 2 == channel ? spl2 :
// 3 == channel ? spl3 :
// 4 == channel ? spl4 :
// 5 == channel ? spl5 :
// 6 == channel ? spl6 :
// 7 == channel ? spl7 :
// 8 == channel ? spl8 :
// 9 == channel ? spl9 :
// 10 == channel ? spl10 :
// 11 == channel ? spl11 :
// 12 == channel ? spl12 :
// 13 == channel ? spl13 :
// 14 == channel ? spl14 :
// 15 == channel ? spl15 :
// 0;
// );
// does not work for writes!
Loading