From c357ed8bca0e966fa49da407266bc442f4de90bb Mon Sep 17 00:00:00 2001 From: Christopher Johnson Date: Sat, 13 Dec 2025 17:44:06 -0500 Subject: [PATCH] PurestDualPan --- Airwindopedia.txt | 12 +- plugins/LinuxVST/CMakeLists.txt | 1 + .../src/ConsoleHBuss/ConsoleHBuss.cpp | 2 +- .../LinuxVST/src/ConsoleHBuss/ConsoleHBuss.h | 19 +- .../src/ConsoleHBuss/ConsoleHBussProc.cpp | 572 ++--- .../src/ConsoleHChannel/ConsoleHChannel.cpp | 8 +- .../src/ConsoleHChannel/ConsoleHChannel.h | 24 +- .../ConsoleHChannel/ConsoleHChannelProc.cpp | 1832 +++++++------- .../LinuxVST/src/ConsoleHPre/ConsoleHPre.cpp | 9 +- .../LinuxVST/src/ConsoleHPre/ConsoleHPre.h | 19 +- .../src/ConsoleHPre/ConsoleHPreProc.cpp | 1866 +++++++------- .../src/ConsoleX2Buss/ConsoleX2Buss.cpp | 178 +- .../src/ConsoleX2Buss/ConsoleX2Buss.h | 65 +- .../src/ConsoleX2Buss/ConsoleX2BussProc.cpp | 1305 +++++----- .../src/ConsoleX2Channel/ConsoleX2Channel.cpp | 296 +-- .../src/ConsoleX2Channel/ConsoleX2Channel.h | 96 +- .../ConsoleX2Channel/ConsoleX2ChannelProc.cpp | 1612 ++++++------ .../src/ConsoleX2Pre/ConsoleX2Pre.cpp | 281 +-- .../LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.h | 89 +- .../src/ConsoleX2Pre/ConsoleX2PreProc.cpp | 1642 ++++++------ plugins/LinuxVST/src/Dynamics3/Dynamics3.cpp | 148 ++ plugins/LinuxVST/src/Dynamics3/Dynamics3.h | 81 + .../LinuxVST/src/Dynamics3/Dynamics3Proc.cpp | 160 ++ .../src/PunchyDeluxe/PunchyDeluxeProc.cpp | 44 +- .../src/PunchyGuitar/PunchyGuitarProc.cpp | 44 +- plugins/MacAU/ConsoleHBuss/ConsoleHBuss.cpp | 286 +-- plugins/MacAU/ConsoleHBuss/ConsoleHBuss.h | 19 +- .../christopherjohnson.pbxuser | 58 +- .../christopherjohnson.perspectivev3 | 35 +- .../MacAU/ConsoleHChannel/ConsoleHChannel.cpp | 924 ++++--- .../MacAU/ConsoleHChannel/ConsoleHChannel.h | 24 +- .../christopherjohnson.pbxuser | 55 +- .../christopherjohnson.perspectivev3 | 85 +- plugins/MacAU/ConsoleHPre/ConsoleHPre.cpp | 618 ++--- plugins/MacAU/ConsoleHPre/ConsoleHPre.h | 18 +- .../christopherjohnson.pbxuser | 73 +- .../christopherjohnson.perspectivev3 | 42 +- plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.cpp | 751 +++--- plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.h | 98 +- .../christopherjohnson.pbxuser | 54 +- .../christopherjohnson.perspectivev3 | 36 +- .../ConsoleX2Channel/ConsoleX2Channel.cpp | 967 ++++---- .../MacAU/ConsoleX2Channel/ConsoleX2Channel.h | 148 +- .../christopherjohnson.pbxuser | 74 +- .../christopherjohnson.perspectivev3 | 54 +- plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.cpp | 724 +++--- plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.h | 136 +- .../christopherjohnson.pbxuser | 57 +- .../christopherjohnson.perspectivev3 | 33 +- plugins/MacAU/Dynamics3/Dynamics3.cpp | 293 +++ plugins/MacAU/Dynamics3/Dynamics3.exp | 1 + plugins/MacAU/Dynamics3/Dynamics3.h | 142 ++ plugins/MacAU/Dynamics3/Dynamics3.r | 61 + .../christopherjohnson.mode1v3 | 1359 ++++++++++ .../christopherjohnson.pbxuser | 131 + .../christopherjohnson.perspectivev3 | 1484 +++++++++++ .../Dynamics3.xcodeproj/project.pbxproj | 490 ++++ plugins/MacAU/Dynamics3/Dynamics3Version.h | 58 + .../Dynamics3/English.lproj/InfoPlist.strings | Bin 0 -> 382 bytes plugins/MacAU/Dynamics3/Info.plist | 28 + plugins/MacAU/Dynamics3/StarterAU_Prefix.pch | 5 + plugins/MacAU/Dynamics3/version.plist | 16 + plugins/MacAU/Dynamics3Mono/Dynamics3Mono.cpp | 258 ++ plugins/MacAU/Dynamics3Mono/Dynamics3Mono.exp | 1 + plugins/MacAU/Dynamics3Mono/Dynamics3Mono.h | 156 ++ plugins/MacAU/Dynamics3Mono/Dynamics3Mono.r | 61 + .../christopherjohnson.mode1v3 | 1358 ++++++++++ .../christopherjohnson.pbxuser | 137 + .../christopherjohnson.perspectivev3 | 1507 +++++++++++ .../Dynamics3Mono.xcodeproj/project.pbxproj | 490 ++++ .../Dynamics3Mono/Dynamics3MonoVersion.h | 58 + .../English.lproj/InfoPlist.strings | Bin 0 -> 398 bytes plugins/MacAU/Dynamics3Mono/Info.plist | 28 + plugins/MacAU/Dynamics3Mono/version.plist | 16 + plugins/MacAU/PunchyDeluxe/PunchyDeluxe.cpp | 22 +- .../christopherjohnson.pbxuser | 62 +- .../christopherjohnson.perspectivev3 | 38 +- plugins/MacAU/PunchyGuitar/PunchyGuitar.cpp | 11 +- .../christopherjohnson.pbxuser | 95 +- .../christopherjohnson.perspectivev3 | 84 +- .../MacSignedAU/ConsoleHBuss/ConsoleHBuss.cpp | 286 +-- .../MacSignedAU/ConsoleHBuss/ConsoleHBuss.h | 19 +- .../UserInterfaceState.xcuserstate | Bin 18205 -> 14427 bytes .../ConsoleHChannel/ConsoleHChannel.cpp | 924 ++++--- .../ConsoleHChannel/ConsoleHChannel.h | 24 +- .../UserInterfaceState.xcuserstate | Bin 18201 -> 14428 bytes .../MacSignedAU/ConsoleHPre/ConsoleHPre.cpp | 618 ++--- plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.h | 18 +- .../UserInterfaceState.xcuserstate | Bin 16366 -> 14340 bytes .../ConsoleX2Buss/ConsoleX2Buss.cpp | 751 +++--- .../MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.h | 98 +- .../UserInterfaceState.xcuserstate | Bin 18223 -> 14460 bytes .../ConsoleX2Channel/ConsoleX2Channel.cpp | 967 ++++---- .../ConsoleX2Channel/ConsoleX2Channel.h | 148 +- .../UserInterfaceState.xcuserstate | Bin 16533 -> 14522 bytes .../MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.cpp | 724 +++--- .../MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.h | 136 +- .../UserInterfaceState.xcuserstate | Bin 18104 -> 14326 bytes plugins/MacSignedAU/Dynamics3/Dynamics3.cpp | 293 +++ plugins/MacSignedAU/Dynamics3/Dynamics3.exp | 2 + plugins/MacSignedAU/Dynamics3/Dynamics3.h | 142 ++ plugins/MacSignedAU/Dynamics3/Dynamics3.r | 61 + .../christopherjohnson.mode1v3 | 1359 ++++++++++ .../christopherjohnson.pbxuser | 131 + .../christopherjohnson.perspectivev3 | 1484 +++++++++++ .../Dynamics3.xcodeproj/project.pbxproj | 965 ++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 17960 bytes .../xcshareddata/xcschemes/Dynamics3.xcscheme | 67 + .../xcschemes/xcschememanagement.plist | 22 + .../MacSignedAU/Dynamics3/Dynamics3Version.h | 58 + plugins/MacSignedAU/Dynamics3/Info.plist | 47 + .../Dynamics3/StarterAU_Prefix.pch | 5 + .../Dynamics3/en.lproj/InfoPlist.strings | Bin 0 -> 382 bytes plugins/MacSignedAU/Dynamics3/version.plist | 16 + .../Dynamics3Mono/Dynamics3Mono.cpp | 258 ++ .../Dynamics3Mono/Dynamics3Mono.exp | 2 + .../MacSignedAU/Dynamics3Mono/Dynamics3Mono.h | 156 ++ .../MacSignedAU/Dynamics3Mono/Dynamics3Mono.r | 61 + .../christopherjohnson.mode1v3 | 1358 ++++++++++ .../christopherjohnson.pbxuser | 137 + .../christopherjohnson.perspectivev3 | 1507 +++++++++++ .../Dynamics3Mono.xcodeproj/project.pbxproj | 965 ++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 18121 bytes .../xcschemes/Dynamics3Mono.xcscheme | 67 + .../xcschemes/xcschememanagement.plist | 22 + .../Dynamics3Mono/Dynamics3MonoVersion.h | 58 + plugins/MacSignedAU/Dynamics3Mono/Info.plist | 47 + .../Dynamics3Mono/en.lproj/InfoPlist.strings | Bin 0 -> 398 bytes .../MacSignedAU/Dynamics3Mono/version.plist | 16 + .../MacSignedAU/PunchyDeluxe/PunchyDeluxe.cpp | 22 +- .../UserInterfaceState.xcuserstate | Bin 18192 -> 14431 bytes .../MacSignedAU/PunchyGuitar/PunchyGuitar.cpp | 11 +- .../UserInterfaceState.xcuserstate | Bin 18101 -> 14235 bytes .../UserInterfaceState.xcuserstate | Bin 22963 -> 20768 bytes .../xcschemes/ConsoleHBuss.xcscheme | 4 +- .../ConsoleHBuss/source/ConsoleHBuss.cpp | 2 +- .../ConsoleHBuss/source/ConsoleHBuss.h | 19 +- .../ConsoleHBuss/source/ConsoleHBussProc.cpp | 572 ++--- .../UserInterfaceState.xcuserstate | Bin 23058 -> 20864 bytes .../xcschemes/ConsoleHChannel.xcscheme | 4 +- .../source/ConsoleHChannel.cpp | 8 +- .../ConsoleHChannel/source/ConsoleHChannel.h | 24 +- .../source/ConsoleHChannelProc.cpp | 1832 +++++++------- .../UserInterfaceState.xcuserstate | Bin 24655 -> 20682 bytes .../xcschemes/ConsoleHPre.xcscheme | 4 +- .../ConsoleHPre/source/ConsoleHPre.cpp | 9 +- .../ConsoleHPre/source/ConsoleHPre.h | 19 +- .../ConsoleHPre/source/ConsoleHPreProc.cpp | 1866 +++++++------- .../UserInterfaceState.xcuserstate | Bin 25841 -> 23387 bytes .../xcschemes/ConsoleX2Buss.xcscheme | 4 +- .../ConsoleX2Buss/source/ConsoleX2Buss.cpp | 178 +- .../ConsoleX2Buss/source/ConsoleX2Buss.h | 65 +- .../source/ConsoleX2BussProc.cpp | 1305 +++++----- .../UserInterfaceState.xcuserstate | Bin 24808 -> 20854 bytes .../xcschemes/ConsoleX2Channel.xcscheme | 4 +- .../source/ConsoleX2Channel.cpp | 296 +-- .../source/ConsoleX2Channel.h | 96 +- .../source/ConsoleX2ChannelProc.cpp | 1612 ++++++------ .../UserInterfaceState.xcuserstate | Bin 24677 -> 20734 bytes .../xcschemes/ConsoleX2Pre.xcscheme | 4 +- .../ConsoleX2Pre/source/ConsoleX2Pre.cpp | 281 +-- .../ConsoleX2Pre/source/ConsoleX2Pre.h | 89 +- .../ConsoleX2Pre/source/ConsoleX2PreProc.cpp | 1642 ++++++------ .../christopherjohnson.pbxuser | 108 + .../christopherjohnson.perspectivev3 | 1503 +++++++++++ .../Dynamics3.xcodeproj/project.pbxproj | 462 ++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 24532 bytes .../UserInterfaceState.xcuserstate | Bin 0 -> 10373 bytes .../Dynamics3.xcodeproj/spiadmin.mode1v3 | 1372 ++++++++++ .../Dynamics3.xcodeproj/spiadmin.pbxuser | 143 ++ .../xcshareddata/xcschemes/Dynamics3.xcscheme | 67 + .../xcschemes/xcschememanagement.plist | 22 + .../xcschemes/xcschememanagement.plist | 22 + .../xcschemes/«PROJECTNAME».xcscheme | 57 + plugins/MacSignedVST/Dynamics3/mac/Info.plist | 24 + plugins/MacSignedVST/Dynamics3/mac/PkgInfo | 1 + .../Dynamics3/mac/xcode_vst_prefix.h | 17 + .../Dynamics3/source/Dynamics3.cpp | 148 ++ .../MacSignedVST/Dynamics3/source/Dynamics3.h | 81 + .../Dynamics3/source/Dynamics3Proc.cpp | 160 ++ .../UserInterfaceState.xcuserstate | Bin 24677 -> 20734 bytes .../xcschemes/PunchyDeluxe.xcscheme | 4 +- .../PunchyDeluxe/source/PunchyDeluxeProc.cpp | 44 +- .../UserInterfaceState.xcuserstate | Bin 24676 -> 20740 bytes .../xcschemes/PunchyGuitar.xcscheme | 4 +- .../PunchyGuitar/source/PunchyGuitarProc.cpp | 44 +- .../christopherjohnson.pbxuser | 50 +- .../christopherjohnson.perspectivev3 | 37 +- .../ConsoleHBuss/source/ConsoleHBuss.cpp | 2 +- .../MacVST/ConsoleHBuss/source/ConsoleHBuss.h | 19 +- .../ConsoleHBuss/source/ConsoleHBussProc.cpp | 572 ++--- .../christopherjohnson.pbxuser | 74 +- .../christopherjohnson.perspectivev3 | 34 +- .../source/ConsoleHChannel.cpp | 8 +- .../ConsoleHChannel/source/ConsoleHChannel.h | 24 +- .../source/ConsoleHChannelProc.cpp | 1832 +++++++------- .../christopherjohnson.pbxuser | 52 +- .../christopherjohnson.perspectivev3 | 47 +- .../MacVST/ConsoleHPre/source/ConsoleHPre.cpp | 9 +- .../MacVST/ConsoleHPre/source/ConsoleHPre.h | 19 +- .../ConsoleHPre/source/ConsoleHPreProc.cpp | 1866 +++++++------- .../christopherjohnson.pbxuser | 52 +- .../christopherjohnson.perspectivev3 | 28 +- .../ConsoleX2Buss/source/ConsoleX2Buss.cpp | 178 +- .../ConsoleX2Buss/source/ConsoleX2Buss.h | 65 +- .../source/ConsoleX2BussProc.cpp | 1305 +++++----- .../christopherjohnson.pbxuser | 62 +- .../christopherjohnson.perspectivev3 | 38 +- .../source/ConsoleX2Channel.cpp | 296 +-- .../source/ConsoleX2Channel.h | 96 +- .../source/ConsoleX2ChannelProc.cpp | 1612 ++++++------ .../christopherjohnson.pbxuser | 64 +- .../christopherjohnson.perspectivev3 | 36 +- .../ConsoleX2Pre/source/ConsoleX2Pre.cpp | 281 +-- .../MacVST/ConsoleX2Pre/source/ConsoleX2Pre.h | 89 +- .../ConsoleX2Pre/source/ConsoleX2PreProc.cpp | 1642 ++++++------ .../christopherjohnson.pbxuser | 108 + .../christopherjohnson.perspectivev3 | 1503 +++++++++++ .../Dynamics3.xcodeproj/project.pbxproj | 2201 +++++++++++++++++ .../contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 12075 bytes .../UserInterfaceState.xcuserstate | Bin 0 -> 10373 bytes .../Dynamics3.xcodeproj/spiadmin.mode1v3 | 1372 ++++++++++ .../Dynamics3.xcodeproj/spiadmin.pbxuser | 143 ++ .../xcschemes/Gain.xcscheme | 80 + .../xcschemes/xcschememanagement.plist | 22 + .../xcschemes/xcschememanagement.plist | 22 + .../xcschemes/«PROJECTNAME».xcscheme | 57 + plugins/MacVST/Dynamics3/mac/Info.plist | 24 + plugins/MacVST/Dynamics3/mac/PkgInfo | 1 + .../MacVST/Dynamics3/mac/xcode_vst_prefix.h | 17 + plugins/MacVST/Dynamics3/source/Dynamics3.cpp | 148 ++ plugins/MacVST/Dynamics3/source/Dynamics3.h | 81 + .../MacVST/Dynamics3/source/Dynamics3Proc.cpp | 160 ++ .../christopherjohnson.pbxuser | 44 +- .../christopherjohnson.perspectivev3 | 75 +- .../PunchyDeluxe.xcodeproj/project.pbxproj | 4 +- .../PunchyDeluxe/source/PunchyDeluxeProc.cpp | 44 +- .../christopherjohnson.pbxuser | 36 +- .../christopherjohnson.perspectivev3 | 37 +- .../PunchyGuitar/source/PunchyGuitarProc.cpp | 44 +- .../ConsoleHBuss/.vs/VSTProject/v14/.suo | Bin 22528 -> 22528 bytes plugins/WinVST/ConsoleHBuss/ConsoleHBuss.cpp | 2 +- plugins/WinVST/ConsoleHBuss/ConsoleHBuss.h | 19 +- .../WinVST/ConsoleHBuss/ConsoleHBussProc.cpp | 572 ++--- .../ConsoleHChannel/.vs/VSTProject/v14/.suo | Bin 23040 -> 22528 bytes .../ConsoleHChannel/ConsoleHChannel.cpp | 8 +- .../WinVST/ConsoleHChannel/ConsoleHChannel.h | 24 +- .../ConsoleHChannel/ConsoleHChannelProc.cpp | 1832 +++++++------- .../ConsoleHPre/.vs/VSTProject/v14/.suo | Bin 22528 -> 23040 bytes plugins/WinVST/ConsoleHPre/ConsoleHPre.cpp | 9 +- plugins/WinVST/ConsoleHPre/ConsoleHPre.h | 19 +- .../WinVST/ConsoleHPre/ConsoleHPreProc.cpp | 1866 +++++++------- .../ConsoleX2Buss/.vs/VSTProject/v14/.suo | Bin 22528 -> 22528 bytes .../WinVST/ConsoleX2Buss/ConsoleX2Buss.cpp | 178 +- plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.h | 65 +- .../ConsoleX2Buss/ConsoleX2BussProc.cpp | 1305 +++++----- .../ConsoleX2Channel/.vs/VSTProject/v14/.suo | Bin 23040 -> 23040 bytes .../ConsoleX2Channel/ConsoleX2Channel.cpp | 296 +-- .../ConsoleX2Channel/ConsoleX2Channel.h | 96 +- .../ConsoleX2Channel/ConsoleX2ChannelProc.cpp | 1612 ++++++------ .../ConsoleX2Pre/.vs/VSTProject/v14/.suo | Bin 23040 -> 22528 bytes plugins/WinVST/ConsoleX2Pre/ConsoleX2Pre.cpp | 281 +-- plugins/WinVST/ConsoleX2Pre/ConsoleX2Pre.h | 89 +- .../WinVST/ConsoleX2Pre/ConsoleX2PreProc.cpp | 1642 ++++++------ .../Dynamics3/.vs/Console4Channel64/v14/.suo | Bin 0 -> 32768 bytes .../WinVST/Dynamics3/.vs/VSTProject/v14/.suo | Bin 0 -> 22528 bytes plugins/WinVST/Dynamics3/Dynamics3.cpp | 148 ++ plugins/WinVST/Dynamics3/Dynamics3.h | 81 + plugins/WinVST/Dynamics3/Dynamics3Proc.cpp | 160 ++ plugins/WinVST/Dynamics3/VSTProject.sln | 28 + plugins/WinVST/Dynamics3/VSTProject.vcxproj | 183 ++ .../Dynamics3/VSTProject.vcxproj.filters | 48 + .../WinVST/Dynamics3/VSTProject.vcxproj.user | 19 + plugins/WinVST/Dynamics3/vstplug.def | 3 + .../PunchyDeluxe/.vs/VSTProject/v14/.suo | Bin 24576 -> 23040 bytes .../WinVST/PunchyDeluxe/PunchyDeluxeProc.cpp | 44 +- .../PunchyGuitar/.vs/VSTProject/v14/.suo | Bin 22528 -> 22528 bytes .../WinVST/PunchyGuitar/PunchyGuitarProc.cpp | 44 +- what.txt | 1 + 286 files changed, 53993 insertions(+), 25943 deletions(-) create mode 100755 plugins/LinuxVST/src/Dynamics3/Dynamics3.cpp create mode 100755 plugins/LinuxVST/src/Dynamics3/Dynamics3.h create mode 100755 plugins/LinuxVST/src/Dynamics3/Dynamics3Proc.cpp create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.cpp create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.exp create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.h create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.r create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj create mode 100755 plugins/MacAU/Dynamics3/Dynamics3Version.h create mode 100755 plugins/MacAU/Dynamics3/English.lproj/InfoPlist.strings create mode 100755 plugins/MacAU/Dynamics3/Info.plist create mode 100755 plugins/MacAU/Dynamics3/StarterAU_Prefix.pch create mode 100755 plugins/MacAU/Dynamics3/version.plist create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.cpp create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.exp create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.h create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.r create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj create mode 100755 plugins/MacAU/Dynamics3Mono/Dynamics3MonoVersion.h create mode 100755 plugins/MacAU/Dynamics3Mono/English.lproj/InfoPlist.strings create mode 100755 plugins/MacAU/Dynamics3Mono/Info.plist create mode 100755 plugins/MacAU/Dynamics3Mono/version.plist create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.cpp create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.exp create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.h create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.r create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj create mode 100644 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme create mode 100644 plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacSignedAU/Dynamics3/Dynamics3Version.h create mode 100755 plugins/MacSignedAU/Dynamics3/Info.plist create mode 100755 plugins/MacSignedAU/Dynamics3/StarterAU_Prefix.pch create mode 100755 plugins/MacSignedAU/Dynamics3/en.lproj/InfoPlist.strings create mode 100755 plugins/MacSignedAU/Dynamics3/version.plist create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.cpp create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.exp create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.h create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.r create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj create mode 100644 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcshareddata/xcschemes/Dynamics3Mono.xcscheme create mode 100644 plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Dynamics3MonoVersion.h create mode 100755 plugins/MacSignedAU/Dynamics3Mono/Info.plist create mode 100755 plugins/MacSignedAU/Dynamics3Mono/en.lproj/InfoPlist.strings create mode 100755 plugins/MacSignedAU/Dynamics3Mono/version.plist create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser create mode 100644 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme create mode 100755 plugins/MacSignedVST/Dynamics3/mac/Info.plist create mode 100755 plugins/MacSignedVST/Dynamics3/mac/PkgInfo create mode 100755 plugins/MacSignedVST/Dynamics3/mac/xcode_vst_prefix.h create mode 100755 plugins/MacSignedVST/Dynamics3/source/Dynamics3.cpp create mode 100755 plugins/MacSignedVST/Dynamics3/source/Dynamics3.h create mode 100755 plugins/MacSignedVST/Dynamics3/source/Dynamics3Proc.cpp create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/Gain.xcscheme create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme create mode 100755 plugins/MacVST/Dynamics3/mac/Info.plist create mode 100755 plugins/MacVST/Dynamics3/mac/PkgInfo create mode 100755 plugins/MacVST/Dynamics3/mac/xcode_vst_prefix.h create mode 100755 plugins/MacVST/Dynamics3/source/Dynamics3.cpp create mode 100755 plugins/MacVST/Dynamics3/source/Dynamics3.h create mode 100755 plugins/MacVST/Dynamics3/source/Dynamics3Proc.cpp create mode 100755 plugins/WinVST/Dynamics3/.vs/Console4Channel64/v14/.suo create mode 100755 plugins/WinVST/Dynamics3/.vs/VSTProject/v14/.suo create mode 100755 plugins/WinVST/Dynamics3/Dynamics3.cpp create mode 100755 plugins/WinVST/Dynamics3/Dynamics3.h create mode 100755 plugins/WinVST/Dynamics3/Dynamics3Proc.cpp create mode 100755 plugins/WinVST/Dynamics3/VSTProject.sln create mode 100755 plugins/WinVST/Dynamics3/VSTProject.vcxproj create mode 100755 plugins/WinVST/Dynamics3/VSTProject.vcxproj.filters create mode 100755 plugins/WinVST/Dynamics3/VSTProject.vcxproj.user create mode 100755 plugins/WinVST/Dynamics3/vstplug.def diff --git a/Airwindopedia.txt b/Airwindopedia.txt index 100ab48a6..a8e2983c6 100644 --- a/Airwindopedia.txt +++ b/Airwindopedia.txt @@ -47,7 +47,7 @@ Tape: TapeHack, ToTape8, ToTape7, ToTape6, FromTape, Tape, IronOxideClassic2, Ir Tone Color: BussColors4, Channel9, Apicolypse, Neverland, Elation, Calibre, Cider, Crystal, Precious, Luxor, Channel8, Channel7, Channel6, Channel5, Channel4 -Utility: SoftClock2, SoftClock, DubPlate2, DubPlate, CansAW, Cans, Monitoring3, Monitoring2, Monitoring, BitShiftPan, BitShiftGain, PurestGain, PurestFade, EveryTrim, HermeTrim, SlewOnly, SubsOnly, PeaksOnly, Golem, DCVoltage, LRConvolve2, LRConvolve, EdIsDim, MidSide, uLawEncode, uLawDecode, RightoMono, LeftoMono, Balanced, Flipity, MoNoam, VoiceTrick, DeCrackle, ContentHideD +Utility: SoftClock2, SoftClock, BitShiftPan, BitShiftGain, PurestGain, PurestDualPan, PurestFade, Monitoring3, Monitoring2, Monitoring, EveryTrim, HermeTrim, DubPlate2, DubPlate, CansAW, Cans, SlewOnly, SubsOnly, PeaksOnly, Golem, DCVoltage, LRConvolve2, LRConvolve, EdIsDim, MidSide, uLawEncode, uLawDecode, RightoMono, LeftoMono, Balanced, Flipity, MoNoam, VoiceTrick, DeCrackle, ContentHideD XYZ Filters: ZBandpass2, ZHighpass2, ZLowpass2, ZNotch2, ZRegion2, ZBandpass, ZHighpass, ZLowpass, ZNotch, ZRegion, YBandpass, YNotBandpass, YHighpass, YNotHighpass, YLowpass, YNotLowpass, YNotch, YNotNotch, XBandpass. XHighpass, XLowpass, XNotch, XRegion @@ -4374,6 +4374,14 @@ Anyway, it’s yours if you want it. There are many odd ways to do EQ code. This Me, I’m more interested in dark reverbs and deeper spaces and bass, so this was never my pet plugin: maybe it can be yours :) +############ PurestDualPan is an updated PurestGain but as a dual pan. + +This one's by patron request: as in, one specific patron REALLY wanted a PurestDualPan, so now everybody has one :) + +It is using dezippering, but instead of the much slower one from PurestGain, it's the quicker and more direct one from out of the Z filter plugins. It's using the pan law I used in Console9 and later, that uses sine functions to come up with a pan law. And it's using a quirky little audio taper in its left and right gain controls, so that 0.5 is unity gain, but full crank is actually 3.069492192001773 because it's 2 to the power of the golden ratio, same for the taper of attenuating anything. This produces a funny sort of taper that I like, and also makes it impossible to reference the actual control's number in any useful way. So, behave as if you can't see numbers, they certainly won't be what you think they are and there's no predicting what they will be in dB terms. + +I have a Bit Shift one also, but it doesn't strictly count as that because it requires an add as part of the algorithm. This one counts as a PurestGain, though! If you're a PurestGain fan, this is the same only as a dual pan. + ############ PurestConsoleBuss is the most free from coloration Console system. ############ PurestConsoleChannel is the most free from coloration Console system. @@ -4496,7 +4504,7 @@ That’s a surprising amount to say about a gain plugin, but that’s Airwindows ############ PurestSaturation is an experiment in softclipping. -Not so long ago, I pushed and pulled the parameters of a sin() function (thing called a Taylor series expansion) to produce TapeHack, which is a softclip that uses the wrong valus for a sin() softclip, to produce another softclip that feels more retro and vintage. +Not so long ago, I pushed and pulled the parameters of a sin() function (thing called a Taylor series expansion) to produce TapeHack, which is a softclip that uses the wrong values for a sin() softclip, to produce another softclip that feels more retro and vintage. But what if we did something weirder? Specifically, doing this requires that you divide by increasingly huge numbers. For a real sin() these are factorials (very huge indeed). For TapeHack, I doctored these until the shape of the softclip did exactly what I wanted. diff --git a/plugins/LinuxVST/CMakeLists.txt b/plugins/LinuxVST/CMakeLists.txt index b0b8beab5..4291652d4 100755 --- a/plugins/LinuxVST/CMakeLists.txt +++ b/plugins/LinuxVST/CMakeLists.txt @@ -188,6 +188,7 @@ add_airwindows_plugin(DubSub2) add_airwindows_plugin(DustBunny) add_airwindows_plugin(Dynamics) add_airwindows_plugin(Dynamics2) +add_airwindows_plugin(Dynamics3) add_airwindows_plugin(Dyno) add_airwindows_plugin(EQ) add_airwindows_plugin(Edge) diff --git a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.cpp b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.cpp index c72d32c91..a43c7d260 100755 --- a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.cpp +++ b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.cpp @@ -34,7 +34,7 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 diff --git a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.h b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.h index b2dd09fca..9c239ca3a 100755 --- a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.h +++ b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBuss.h @@ -95,25 +95,16 @@ private: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBussProc.cpp b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBussProc.cpp index ace7e9f96..91a6ee2fc 100755 --- a/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBussProc.cpp +++ b/plugins/LinuxVST/src/ConsoleHBuss/ConsoleHBussProc.cpp @@ -28,37 +28,47 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; double sloRez = pow(1.0-THR,10.0) / overallscale; @@ -248,101 +258,79 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -405,47 +393,39 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -487,35 +467,45 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-THR, 6.0) * 8.0; @@ -707,101 +697,79 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -864,47 +832,39 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.cpp b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.cpp index 2d49c52ca..9ee7ba52c 100755 --- a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.cpp +++ b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.cpp @@ -61,10 +61,10 @@ ConsoleHChannel::ConsoleHChannel(audioMasterCallback audioMaster) : } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.h b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.h index c3cb7a9f5..7a20001ea 100755 --- a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.h +++ b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannel.h @@ -145,26 +145,18 @@ private: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannelProc.cpp b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannelProc.cpp index 9910d71bc..f2b5d4449 100755 --- a/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannelProc.cpp +++ b/plugins/LinuxVST/src/ConsoleHChannel/ConsoleHChannelProc.cpp @@ -22,6 +22,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -159,393 +173,359 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -572,7 +552,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { @@ -654,6 +634,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -671,110 +652,123 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -791,393 +785,359 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1204,7 +1164,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.cpp b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.cpp index 49e8d328d..c500b6c68 100755 --- a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.cpp +++ b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.cpp @@ -60,10 +60,11 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxFL = 0.0; bezMaxFR = 0.0; - bezCompS[bez_cycle] = 1.0; bezGateL = 2.0; bezGateR = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.h b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.h index 066568e3a..f242a79cb 100755 --- a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.h +++ b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPre.h @@ -146,25 +146,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxFL; - double bezMaxFR; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; double bezGateL; + double bezMaxR; + double bezMinR; double bezGateR; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPreProc.cpp b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPreProc.cpp index 11dc2eb7e..88ffee948 100755 --- a/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPreProc.cpp +++ b/plugins/LinuxVST/src/ConsoleHPre/ConsoleHPreProc.cpp @@ -22,6 +22,7 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -158,398 +172,373 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -644,6 +633,7 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -661,110 +651,123 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -780,398 +783,373 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.cpp b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.cpp index d27cd2cec..a5f742744 100755 --- a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.cpp @@ -12,17 +12,17 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.5; - B = 0.5; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 1.0; - J = 0.5; - K = 0.5; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -44,7 +44,7 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -94,17 +94,17 @@ static float pinParameter(float data) VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; + chunkData[0] = HIG; + chunkData[1] = HMG; + chunkData[2] = LMG; + chunkData[3] = BSG; + chunkData[4] = HIF; + chunkData[5] = HMF; + chunkData[6] = LMF; + chunkData[7] = BSF; + chunkData[8] = THR; + chunkData[9] = PAN; + chunkData[10] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -116,17 +116,17 @@ VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); + HIG = pinParameter(chunkData[0]); + HMG = pinParameter(chunkData[1]); + LMG = pinParameter(chunkData[2]); + BSG = pinParameter(chunkData[3]); + HIF = pinParameter(chunkData[4]); + HMF = pinParameter(chunkData[5]); + LMF = pinParameter(chunkData[6]); + BSF = pinParameter(chunkData[7]); + THR = pinParameter(chunkData[8]); + PAN = pinParameter(chunkData[9]); + FAD = pinParameter(chunkData[10]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -136,85 +136,85 @@ VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Buss::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Buss::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Buss::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Buss::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: float2string (A, text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Buss::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.h b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.h index f13fa39c5..1fa28c929 100755 --- a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.h +++ b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2Buss.h @@ -16,17 +16,17 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, + kParamHIG =0, + kParamHMG =1, + kParamLMG =2, + kParamBSG =3, + kParamHIF =4, + kParamHMF =5, + kParamLMF =6, + kParamBSF =7, + kParamTHR =8, + kParamPAN =9, + kParamFAD =10, kNumParameters = 11 }; // @@ -62,17 +62,17 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float PAN; + float FAD; enum { biq_freq, @@ -108,26 +108,17 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 - + //Dynamics2 custom for buss + double avg32L[33]; double avg32R[33]; double avg16L[17]; diff --git a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2BussProc.cpp b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2BussProc.cpp index ccc0d1399..55c705365 100755 --- a/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2BussProc.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Buss/ConsoleX2BussProc.cpp @@ -21,133 +21,142 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -167,198 +176,177 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -403,47 +391,39 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -478,133 +458,142 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -624,198 +613,177 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -860,48 +828,39 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.cpp b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.cpp index 1d253c15a..2129cd918 100755 --- a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.cpp @@ -12,24 +12,24 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; - R = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -50,10 +50,10 @@ ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -130,24 +130,24 @@ static float pinParameter(float data) VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; - chunkData[17] = R; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = PAN; + chunkData[17] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -159,24 +159,24 @@ VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); - R = pinParameter(chunkData[17]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + PAN = pinParameter(chunkData[16]); + FAD = pinParameter(chunkData[17]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -186,120 +186,120 @@ VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPrese void ConsoleX2Channel::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; - case kParamR: R = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Channel::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; - case kParamR: return R; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Channel::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; - case kParamR: float2string (R, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Channel::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.h b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.h index 7862eafbc..2b57ebb85 100755 --- a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.h +++ b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2Channel.h @@ -16,24 +16,24 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, - kParamR =17, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamPAN =16, + kParamFAD =17, kNumParameters = 18 }; // const int dscBuf = 256; @@ -70,24 +70,24 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; - float R; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float PAN; + float FAD; enum { biq_freq, @@ -123,26 +123,18 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2ChannelProc.cpp b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2ChannelProc.cpp index 906bc23a4..127bf13bc 100755 --- a/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2ChannelProc.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Channel/ConsoleX2ChannelProc.cpp @@ -21,149 +21,158 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -173,307 +182,265 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -525,7 +492,7 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 } //blank out lowpass if just switched off } //Cabs2 - + double gainR = (panA*temp)+(panB*(1.0-temp)); double gainL = 1.57079633-gainR; gainR = sin(gainR); gainL = sin(gainL); @@ -581,149 +548,158 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -733,307 +709,265 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.cpp b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.cpp index 1d6244eab..37598510d 100755 --- a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.cpp @@ -12,23 +12,23 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -49,10 +49,11 @@ ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -128,23 +129,23 @@ static float pinParameter(float data) VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -156,23 +157,23 @@ VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + FAD = pinParameter(chunkData[16]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -182,115 +183,115 @@ VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Pre::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Pre::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Pre::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Pre::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Pre::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.h b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.h index 3fa48a8f8..5ea8485af 100755 --- a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.h +++ b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2Pre.h @@ -16,23 +16,23 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamFAD =16, kNumParameters = 17 }; // const int dscBuf = 256; @@ -69,23 +69,23 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float FAD; enum { biq_freq, @@ -124,23 +124,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; - double bezGate; - //Dynamics2 + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; + double bezGateL; + double bezMaxR; + double bezMinR; + double bezGateR; + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2PreProc.cpp b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2PreProc.cpp index 4c8abed86..18ab0486d 100755 --- a/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2PreProc.cpp +++ b/plugins/LinuxVST/src/ConsoleX2Pre/ConsoleX2PreProc.cpp @@ -21,148 +21,157 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - - inTrimA = inTrimB; inTrimB = Q*2.0; + + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -172,309 +181,285 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -526,7 +511,7 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa } //blank out lowpass if just switched off } //Cabs2 - + double gain = (inTrimA*temp)+(inTrimB*(1.0-temp)); if (gain > 1.0) gain *= gain; if (gain < 1.0) gain = 1.0-pow(1.0-gain,2); @@ -567,149 +552,158 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst overallscale *= getSampleRate(); int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = Q*2.0; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -718,310 +712,286 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleR = *in2; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section + inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/LinuxVST/src/Dynamics3/Dynamics3.cpp b/plugins/LinuxVST/src/Dynamics3/Dynamics3.cpp new file mode 100755 index 000000000..47424b601 --- /dev/null +++ b/plugins/LinuxVST/src/Dynamics3/Dynamics3.cpp @@ -0,0 +1,148 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Dynamics3(audioMaster);} + +Dynamics3::Dynamics3(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 1.0; + B = 0.5; + C = 0.5; + D = 0.0; + + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + setUniqueID(kUniqueId); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +Dynamics3::~Dynamics3() {} +VstInt32 Dynamics3::getVendorVersion () {return 1000;} +void Dynamics3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void Dynamics3::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 Dynamics3::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 Dynamics3::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void Dynamics3::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float Dynamics3::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Dynamics3::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Dynamics3::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Dynamics3::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Dynamics3::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Dynamics3::getEffectName(char* name) { + vst_strncpy(name, "Dynamics3", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Dynamics3::getPlugCategory() {return kPlugCategEffect;} + +bool Dynamics3::getProductString(char* text) { + vst_strncpy (text, "airwindows Dynamics3", kVstMaxProductStrLen); return true; +} + +bool Dynamics3::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugins/LinuxVST/src/Dynamics3/Dynamics3.h b/plugins/LinuxVST/src/Dynamics3/Dynamics3.h new file mode 100755 index 000000000..9e23dffc8 --- /dev/null +++ b/plugins/LinuxVST/src/Dynamics3/Dynamics3.h @@ -0,0 +1,81 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#define __Dynamics3_H + +#ifndef __audioeffect__ +#include "audioeffectx.h" +#endif + +#include +#include +#include + +enum { + kParamA =0, + kParamB =1, + kParamC =2, + kParamD =3, + kNumParameters = 4 +}; // + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'dyn3'; //Change this to what the AU identity is! + +class Dynamics3 : + public AudioEffectX +{ +public: + Dynamics3(audioMasterCallback audioMaster); + ~Dynamics3(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual VstInt32 getChunk (void** data, bool isPreset); + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + float C; + float D; + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif diff --git a/plugins/LinuxVST/src/Dynamics3/Dynamics3Proc.cpp b/plugins/LinuxVST/src/Dynamics3/Dynamics3Proc.cpp new file mode 100755 index 000000000..86a8fb63e --- /dev/null +++ b/plugins/LinuxVST/src/Dynamics3/Dynamics3Proc.cpp @@ -0,0 +1,160 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +void Dynamics3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Dynamics3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugins/LinuxVST/src/PunchyDeluxe/PunchyDeluxeProc.cpp b/plugins/LinuxVST/src/PunchyDeluxe/PunchyDeluxeProc.cpp index 140e739fc..0eef3c796 100755 --- a/plugins/LinuxVST/src/PunchyDeluxe/PunchyDeluxeProc.cpp +++ b/plugins/LinuxVST/src/PunchyDeluxe/PunchyDeluxeProc.cpp @@ -77,7 +77,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -90,7 +99,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { @@ -190,7 +208,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -203,7 +230,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { diff --git a/plugins/LinuxVST/src/PunchyGuitar/PunchyGuitarProc.cpp b/plugins/LinuxVST/src/PunchyGuitar/PunchyGuitarProc.cpp index 02396a754..1cffc39b1 100755 --- a/plugins/LinuxVST/src/PunchyGuitar/PunchyGuitarProc.cpp +++ b/plugins/LinuxVST/src/PunchyGuitar/PunchyGuitarProc.cpp @@ -90,7 +90,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -161,7 +170,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) @@ -291,7 +309,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -362,7 +389,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) diff --git a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.cpp b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.cpp index 52730ece3..c910af101 100755 --- a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.cpp +++ b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.cpp @@ -250,7 +250,7 @@ ComponentResult ConsoleHBuss::Reset(AudioUnitScope inScope, AudioUnitElement in //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -303,35 +303,45 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; @@ -522,101 +532,79 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -679,47 +667,39 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); diff --git a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.h b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.h index f792f878f..d4fb96ddc 100755 --- a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.h +++ b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.h @@ -161,25 +161,16 @@ public: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser index fe7246d6f..592194ba0 100755 --- a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser @@ -49,55 +49,61 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784133817; - PBXWorkspaceStateSaveDate = 784133817; + PBXPerProjectTemplateStateSaveDate = 787078932; + PBXWorkspaceStateSaveDate = 787078932; }; perUserProjectItems = { - 8B7D6D372EBCF553000B38FA /* PBXTextBookmark */ = 8B7D6D372EBCF553000B38FA /* PBXTextBookmark */; - 8B7D6D382EBCF553000B38FA /* PBXBookmark */ = 8B7D6D382EBCF553000B38FA /* PBXBookmark */; - 8B7D6D392EBCF553000B38FA /* PBXTextBookmark */ = 8B7D6D392EBCF553000B38FA /* PBXTextBookmark */; + 8B5AB4512EE9C16E00A3F512 /* PBXTextBookmark */ = 8B5AB4512EE9C16E00A3F512 /* PBXTextBookmark */; + 8B5AB4802EE9C90D00A3F512 /* PBXTextBookmark */ = 8B5AB4802EE9C90D00A3F512 /* PBXTextBookmark */; + 8B5AB4FB2EE9E4A600A3F512 /* PBXTextBookmark */ = 8B5AB4FB2EE9E4A600A3F512 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B7D6D372EBCF553000B38FA /* PBXTextBookmark */ = { + 8B5AB4512EE9C16E00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* ConsoleHBussVersion.h */; name = "ConsoleHBussVersion.h: 1"; rLen = 0; rLoc = 0; rType = 0; - vrLen = 37; + vrLen = 258; vrLoc = 0; }; - 8B7D6D382EBCF553000B38FA /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BA05A660720730100365D66 /* ConsoleHBuss.cpp */; - }; - 8B7D6D392EBCF553000B38FA /* PBXTextBookmark */ = { + 8B5AB4802EE9C90D00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ConsoleHBuss.cpp */; - name = "ConsoleHBuss.cpp: 523"; + name = "ConsoleHBuss.cpp: 330"; rLen = 0; - rLoc = 25931; + rLoc = 14515; rType = 0; - vrLen = 64; - vrLoc = 33450; + vrLen = 246; + vrLoc = 19603; + }; + 8B5AB4FB2EE9E4A600A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* ConsoleHBuss.cpp */; + name = "ConsoleHBuss.cpp: 330"; + rLen = 0; + rLoc = 14515; + rType = 0; + vrLen = 205; + vrLoc = 19603; }; 8BA05A660720730100365D66 /* ConsoleHBuss.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {858, 13752}}"; - sepNavSelRange = "{25931, 0}"; - sepNavVisRange = "{33450, 64}"; - sepNavWindowFrame = "{{22, 52}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {777, 13086}}"; + sepNavSelRange = "{14515, 0}"; + sepNavVisRange = "{19603, 205}"; + sepNavWindowFrame = "{{8, 43}, {912, 826}}"; }; }; 8BA05A690720730100365D66 /* ConsoleHBussVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 1098}}"; sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{1072, 1918}"; + sepNavVisRange = "{0, 258}"; sepNavWindowFrame = "{{15, 47}, {912, 826}}"; }; }; @@ -110,10 +116,10 @@ }; 8BC6025B073B072D006C4272 /* ConsoleHBuss.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 4068}}"; - sepNavSelRange = "{6440, 589}"; - sepNavVisRange = "{5857, 1011}"; - sepNavWindowFrame = "{{7, 35}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 3852}}"; + sepNavSelRange = "{6108, 234}"; + sepNavVisRange = "{5836, 1099}"; + sepNavWindowFrame = "{{7, 38}, {912, 826}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 index 003562331..99fd7397f 100755 --- a/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 @@ -324,7 +324,7 @@ 185 RubberWindowFrame - 14 348 810 487 0 0 1440 878 + 30 321 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -352,11 +352,11 @@ _historyCapacity 0 bookmark - 8B7D6D392EBCF553000B38FA + 8B5AB4FB2EE9E4A600A3F512 history - 8B7D6D372EBCF553000B38FA - 8B7D6D382EBCF553000B38FA + 8B5AB4512EE9C16E00A3F512 + 8B5AB4802EE9C90D00A3F512 SplitCount @@ -370,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 86}} + {{0, 0}, {603, 117}} RubberWindowFrame - 14 348 810 487 0 0 1440 878 + 30 321 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 86pt + 117pt Proportion - 355pt + 324pt Tabs @@ -395,9 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 328}} + {{10, 27}, {603, 297}} RubberWindowFrame - 14 348 810 487 0 0 1440 878 + 30 321 810 487 0 0 1440 878 Module XCDetailModule @@ -451,7 +451,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 297}} + {{10, 27}, {603, 414}} Module PBXBuildResultsModule @@ -479,11 +479,11 @@ TableOfContents - 8B7D6D3A2EBCF553000B38FA + 8B5AB4C82EE9DF1B00A3F512 1CA23ED40692098700951B8B - 8B7D6D3B2EBCF553000B38FA + 8B5AB4C92EE9DF1B00A3F512 8BC0F9EC2EBA6E4D0094F441 - 8B7D6D3C2EBCF553000B38FA + 8B5AB4CA2EE9DF1B00A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -636,7 +636,7 @@ StatusbarIsVisible TimeStamp - 784135507.44360995 + 787080358.34075296 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -653,11 +653,10 @@ 5 WindowOrderList - 8B7D6D3D2EBCF553000B38FA - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleHBuss/ConsoleHBuss.xcodeproj + /Users/christopherjohnson/Desktop/ConsoleHBuss/ConsoleHBuss.xcodeproj WindowString - 14 348 810 487 0 0 1440 878 + 30 321 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.cpp b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.cpp index 46710e57a..45fba7a83 100755 --- a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.cpp +++ b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.cpp @@ -405,10 +405,10 @@ ComponentResult ConsoleHChannel::Reset(AudioUnitScope inScope, AudioUnitElement } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -477,6 +477,7 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -494,110 +495,123 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = GetParameter( kParam_CRS ); + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_ATK ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_RLS ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_GAT ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass @@ -613,393 +627,359 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1026,7 +1006,7 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.h b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.h index a294e5093..874810e44 100755 --- a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.h +++ b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.h @@ -236,26 +236,18 @@ public: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser index ac05bc3f1..3c4027976 100755 --- a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser @@ -3,6 +3,8 @@ 089C1669FE841209C02AAC07 /* Project object */ = { activeBuildConfigurationName = Release; activeTarget = 8D01CCC60486CAD60068D4B7 /* ConsoleHChannel */; + breakpoints = ( + ); codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */; perUserDictionary = { PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { @@ -49,19 +51,54 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784126220; - PBXWorkspaceStateSaveDate = 784126220; + PBXPerProjectTemplateStateSaveDate = 787147691; + PBXWorkspaceStateSaveDate = 787147691; + }; + perUserProjectItems = { + 8B5AB22C2EE76C7800A3F512 /* PBXTextBookmark */ = 8B5AB22C2EE76C7800A3F512 /* PBXTextBookmark */; + 8B5AB5822EE9FF0600A3F512 /* PBXTextBookmark */ = 8B5AB5822EE9FF0600A3F512 /* PBXTextBookmark */; + 8B60124E2EEAEBDF003E53A7 /* PBXTextBookmark */ = 8B60124E2EEAEBDF003E53A7 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B5AB22C2EE76C7800A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* ConsoleHChannel.cpp */; + name = "ConsoleHChannel.cpp: 653"; + rLen = 0; + rLoc = 31796; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 8B5AB5822EE9FF0600A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* ConsoleHChannel.h */; + name = "ConsoleHChannel.h: 153"; + rLen = 25; + rLoc = 6299; + rType = 0; + vrLen = 25; + vrLoc = 48; + }; + 8B60124E2EEAEBDF003E53A7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* ConsoleHChannel.h */; + name = "ConsoleHChannel.h: 153"; + rLen = 25; + rLoc = 6299; + rType = 0; + vrLen = 25; + vrLoc = 48; + }; 8BA05A660720730100365D66 /* ConsoleHChannel.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1308, 19872}}"; - sepNavSelRange = "{29117, 23722}"; - sepNavVisRange = "{52032, 1445}"; - sepNavWindowFrame = "{{5, 52}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {957, 19062}}"; + sepNavSelRange = "{24289, 0}"; + sepNavVisRange = "{28191, 1735}"; + sepNavWindowFrame = "{{10, 38}, {926, 840}}"; }; }; 8BA05A690720730100365D66 /* ConsoleHChannelVersion.h */ = { @@ -81,10 +118,10 @@ }; 8BC6025B073B072D006C4272 /* ConsoleHChannel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 4878}}"; + sepNavIntBoundsRect = "{{0, 0}, {696, 5652}}"; sepNavSelRange = "{6299, 25}"; - sepNavVisRange = "{5969, 1043}"; - sepNavWindowFrame = "{{7, 52}, {912, 826}}"; + sepNavVisRange = "{48, 25}"; + sepNavWindowFrame = "{{7, 43}, {912, 826}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 index 6a8f77268..092e33268 100755 --- a/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 @@ -300,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 3 + 4 2 1 0 @@ -324,7 +324,7 @@ 246 RubberWindowFrame - 11 327 810 487 0 0 1440 878 + 10 391 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -340,7 +340,7 @@ PBXProjectModuleGUID 8BC0F9BC2EBA650A0094F441 PBXProjectModuleLabel - + ConsoleHChannel.h PBXSplitModuleInNavigatorKey Split0 @@ -348,7 +348,16 @@ PBXProjectModuleGUID 8BC0F9BD2EBA650A0094F441 PBXProjectModuleLabel - + ConsoleHChannel.h + _historyCapacity + 0 + bookmark + 8B60124E2EEAEBDF003E53A7 + history + + 8B5AB22C2EE76C7800A3F512 + 8B5AB5822EE9FF0600A3F512 + SplitCount 1 @@ -361,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {542, 0}} + {{0, 0}, {542, 69}} RubberWindowFrame - 11 327 810 487 0 0 1440 878 + 10 391 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 0pt + 69pt Proportion - 441pt + 372pt Tabs @@ -386,9 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {542, 414}} + {{10, 27}, {542, 345}} RubberWindowFrame - 11 327 810 487 0 0 1440 878 + 10 391 810 487 0 0 1440 878 Module XCDetailModule @@ -442,7 +451,7 @@ GeometryConfiguration Frame - {{10, 27}, {542, 414}} + {{10, 27}, {542, 401}} Module PBXBuildResultsModule @@ -470,11 +479,11 @@ TableOfContents - 8B7D6C432EBCD116000B38FA + 8B60124F2EEAEBDF003E53A7 1CA23ED40692098700951B8B - 8B7D6C442EBCD116000B38FA + 8B6012502EEAEBDF003E53A7 8BC0F9BC2EBA650A0094F441 - 8B7D6C452EBCD116000B38FA + 8B6012512EEAEBDF003E53A7 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -511,7 +520,7 @@ Identifier perspective.debug IsVertical - 1 + Layout @@ -525,12 +534,12 @@ GeometryConfiguration Frame - {{0, 0}, {810, 0}} + {{0, 0}, {424, 270}} Module PBXDebugCLIModule Proportion - 0% + 270pt ContentConfiguration @@ -579,8 +588,6 @@ GeometryConfiguration - DebugConsoleDrawerSize - {100, 120} DebugConsoleVisible None DebugConsoleWindowFrame @@ -589,31 +596,53 @@ {{200, 200}, {500, 300}} Frame {{0, 7}, {810, 438}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 185 + + Frame + {{395, 0}, {415, 213}} + Module PBXDebugSessionModule Proportion - 443pt + 438pt Name Debug ServiceClasses - XCModuleDock XCModuleDock PBXDebugCLIModule PBXDebugSessionModule - XCConsole + PBXDebugProcessAndThreadModule + PBXDebugProcessViewModule + PBXDebugThreadViewModule + PBXDebugStackFrameViewModule + PBXNavigatorGroup TableOfContents - 1CC8E6A5069209BD00BB180A - 1CC8E6A6069209BD00BB180A + 8B5AB4AC2EE9CAE100A3F512 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - 1CC8E6A7069209BD00BB180A + 8B5AB4AD2EE9CAE100A3F512 + 8B5AB4AE2EE9CAE100A3F512 + 8B5AB4AF2EE9CAE100A3F512 + 8B5AB4B02EE9CAE100A3F512 + 8B5AB4B12EE9CAE100A3F512 + ToolbarConfigUserDefaultsMinorVersion + 2 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -627,7 +656,7 @@ StatusbarIsVisible TimeStamp - 784128789.89908004 + 787147743.49609303 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -644,11 +673,11 @@ 5 WindowOrderList - 8B7D6C792EBCDB15000B38FA + 8B6012522EEAEBDF003E53A7 /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleHChannel/ConsoleHChannel.xcodeproj WindowString - 11 327 810 487 0 0 1440 878 + 10 391 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ConsoleHPre/ConsoleHPre.cpp b/plugins/MacAU/ConsoleHPre/ConsoleHPre.cpp index 0434ad068..1237038be 100755 --- a/plugins/MacAU/ConsoleHPre/ConsoleHPre.cpp +++ b/plugins/MacAU/ConsoleHPre/ConsoleHPre.cpp @@ -379,10 +379,10 @@ void ConsoleHPre::ConsoleHPreKernel::Reset() } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPosition[count] = 0.0; @@ -440,6 +440,7 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -457,109 +458,123 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } + //SmoothEQ3 - high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = GetParameter( kParam_CRS ); + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_ATK ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_RLS ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_GAT ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass @@ -572,220 +587,219 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, double inputSampleL = *sourceP; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17; - double darkSampleL = inputSampleL; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} - darkSampleL /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} - darkSampleL /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} - darkSampleL /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} - darkSampleL /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} - darkSampleL /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} + darkSampleL /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} + darkSampleL /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} + darkSampleL /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} + darkSampleL /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} + darkSampleL /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL,1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + //begin Discontinuity section + inputSampleL *= moreTapeHack; + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezMaxF = fmax(bezMaxF,fabs(inputSampleL)); - if (bezCompF[bez_cycle] > 1.0) { - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + } //makeup gain + + double ctrl = fabs(inputSampleL); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage. - if (bezCompS[bez_cycle] > 1.0) { - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate; - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacAU/ConsoleHPre/ConsoleHPre.h b/plugins/MacAU/ConsoleHPre/ConsoleHPre.h index e5f31970d..438287cdd 100755 --- a/plugins/MacAU/ConsoleHPre/ConsoleHPre.h +++ b/plugins/MacAU/ConsoleHPre/ConsoleHPre.h @@ -245,20 +245,18 @@ public: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPosition[23]; double iirHAngle[23]; diff --git a/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser index 24a3a2895..97a5b6ba0 100755 --- a/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser @@ -10,7 +10,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 292, + 258, 20, 48, 43, @@ -49,18 +49,49 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784132118; - PBXWorkspaceStateSaveDate = 784132118; + PBXPerProjectTemplateStateSaveDate = 787147774; + PBXWorkspaceStateSaveDate = 787147774; }; perUserProjectItems = { + 8B5AB3F02EE9AD0700A3F512 /* PBXTextBookmark */ = 8B5AB3F02EE9AD0700A3F512 /* PBXTextBookmark */; + 8B5AB64E2EEA336F00A3F512 /* PBXTextBookmark */ = 8B5AB64E2EEA336F00A3F512 /* PBXTextBookmark */; + 8B60125F2EEAEC1F003E53A7 /* PBXTextBookmark */ = 8B60125F2EEAEC1F003E53A7 /* PBXTextBookmark */; 8B7D6CFB2EBCEAA2000B38FA /* PlistBookmark */ = 8B7D6CFB2EBCEAA2000B38FA /* PlistBookmark */; - 8B7D6CFC2EBCEAA2000B38FA /* PBXBookmark */ = 8B7D6CFC2EBCEAA2000B38FA /* PBXBookmark */; - 8B7D6CFD2EBCEAA2000B38FA /* PBXTextBookmark */ = 8B7D6CFD2EBCEAA2000B38FA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B5AB3F02EE9AD0700A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* ConsoleHPre.cpp */; + name = "ConsoleHPre.cpp: 776"; + rLen = 0; + rLoc = 37785; + rType = 0; + vrLen = 50; + vrLoc = 38606; + }; + 8B5AB64E2EEA336F00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* ConsoleHPre.h */; + name = "ConsoleHPre.h: 260"; + rLen = 0; + rLoc = 9114; + rType = 0; + vrLen = 66; + vrLoc = 3; + }; + 8B60125F2EEAEC1F003E53A7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* ConsoleHPre.h */; + name = "ConsoleHPre.h: 260"; + rLen = 0; + rLoc = 9114; + rType = 0; + vrLen = 66; + vrLoc = 3; + }; 8B7D6CFB2EBCEAA2000B38FA /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -71,28 +102,14 @@ ); name = /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleHPre/Info.plist; rLen = 0; - rLoc = 9223372036854775807; - }; - 8B7D6CFC2EBCEAA2000B38FA /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BA05A660720730100365D66 /* ConsoleHPre.cpp */; - }; - 8B7D6CFD2EBCEAA2000B38FA /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* ConsoleHPre.cpp */; - name = "ConsoleHPre.cpp: 779"; - rLen = 0; - rLoc = 37534; - rType = 0; - vrLen = 502; - vrLoc = 38930; + rLoc = 9223372036854775808; }; 8BA05A660720730100365D66 /* ConsoleHPre.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1092, 15588}}"; - sepNavSelRange = "{37534, 0}"; - sepNavVisRange = "{38930, 502}"; - sepNavWindowFrame = "{{15, 47}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {957, 15498}}"; + sepNavSelRange = "{22818, 0}"; + sepNavVisRange = "{21953, 2061}"; + sepNavWindowFrame = "{{528, 50}, {912, 826}}"; }; }; 8BA05A690720730100365D66 /* ConsoleHPreVersion.h */ = { @@ -105,10 +122,10 @@ }; 8BC6025B073B072D006C4272 /* ConsoleHPre.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 6300}}"; - sepNavSelRange = "{8314, 0}"; - sepNavVisRange = "{9159, 663}"; - sepNavWindowFrame = "{{7, 42}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {741, 5598}}"; + sepNavSelRange = "{9114, 0}"; + sepNavVisRange = "{3, 66}"; + sepNavWindowFrame = "{{9, 52}, {912, 826}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 index c946dc79f..fb37f7c31 100755 --- a/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 @@ -309,7 +309,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 453}} PBXTopSmartGroupGIDs @@ -319,14 +319,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 471}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 7 195 841 654 0 0 1440 878 + 539 212 807 512 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -342,7 +342,7 @@ PBXProjectModuleGUID 8BD7274A1D46E5A5000176F0 PBXProjectModuleLabel - ConsoleHPre.cpp + ConsoleHPre.h PBXSplitModuleInNavigatorKey Split0 @@ -350,15 +350,16 @@ PBXProjectModuleGUID 8BD7274B1D46E5A5000176F0 PBXProjectModuleLabel - ConsoleHPre.cpp + ConsoleHPre.h _historyCapacity 0 bookmark - 8B7D6CFD2EBCEAA2000B38FA + 8B60125F2EEAEC1F003E53A7 history 8B7D6CFB2EBCEAA2000B38FA - 8B7D6CFC2EBCEAA2000B38FA + 8B5AB3F02EE9AD0700A3F512 + 8B5AB64E2EEA336F00A3F512 SplitCount @@ -372,18 +373,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 202}} + {{0, 0}, {497, 125}} RubberWindowFrame - 7 195 841 654 0 0 1440 878 + 539 212 807 512 0 0 1440 878 Module PBXNavigatorGroup Proportion - 202pt + 125pt Proportion - 406pt + 341pt Tabs @@ -397,9 +398,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 379}} + {{10, 27}, {497, 314}} RubberWindowFrame - 7 195 841 654 0 0 1440 878 + 539 212 807 512 0 0 1440 878 Module XCDetailModule @@ -453,7 +454,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 339}} + {{10, 27}, {531, 507}} Module PBXBuildResultsModule @@ -462,7 +463,7 @@ Proportion - 531pt + 497pt Name @@ -481,11 +482,11 @@ TableOfContents - 8B7D6CFE2EBCEAA2000B38FA + 8B6012602EEAEC1F003E53A7 1CA23ED40692098700951B8B - 8B7D6CFF2EBCEAA2000B38FA + 8B6012612EEAEC1F003E53A7 8BD7274A1D46E5A5000176F0 - 8B7D6D002EBCEAA2000B38FA + 8B6012622EEAEC1F003E53A7 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -658,7 +659,7 @@ StatusbarIsVisible TimeStamp - 784132770.80356503 + 787147807.16772997 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -675,10 +676,11 @@ 5 WindowOrderList + 8B6012632EEAEC1F003E53A7 /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleHPre/ConsoleHPre.xcodeproj WindowString - 7 195 841 654 0 0 1440 878 + 539 212 807 512 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.cpp b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.cpp index 461571bde..0d3023bbf 100755 --- a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.cpp +++ b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.cpp @@ -59,17 +59,17 @@ ConsoleX2Buss::ConsoleX2Buss(AudioUnit component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_PAN, kDefaultValue_ParamPAN ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -106,85 +106,85 @@ ComponentResult ConsoleX2Buss::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterAUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterEUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterIUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_PAN: + AUBase::FillInParameterName (outParameterInfo, kParameterPANName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamPAN; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -276,7 +276,7 @@ ComponentResult ConsoleX2Buss::Reset(AudioUnitScope inScope, AudioUnitElement i //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -317,133 +317,141 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (GetParameter( kParam_A )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_B )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_D )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_E )-0.5; - double highmidRef = GetParameter( kParam_F )-0.5; - double lowmidRef = GetParameter( kParam_G )-0.5; - double bassRef = GetParameter( kParam_H )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale; + double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_THR ), 12.360679774997898) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_THR ),10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = GetParameter( kParam_J )*1.57079633; - inTrimA = inTrimB; inTrimB = GetParameter( kParam_K )*2.0; + panA = panB; panB = GetParameter( kParam_PAN )*1.57079633; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { @@ -462,198 +470,176 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)nSampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -698,48 +684,39 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); diff --git a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.h b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.h index daa78a49b..1fa9b9337 100755 --- a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.h +++ b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.h @@ -54,45 +54,49 @@ #pragma mark ____ConsoleX2Buss Parameters // parameters -static const float kDefaultValue_ParamA = 0.5; -static const float kDefaultValue_ParamB = 0.5; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 1.0; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 0.5; +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; -static CFStringRef kParameterAUnit = CFSTR("eq"); -static CFStringRef kParameterAName = CFSTR("High"); -static CFStringRef kParameterBName = CFSTR("HMid"); -static CFStringRef kParameterCName = CFSTR("LMid"); -static CFStringRef kParameterDName = CFSTR("Bass"); -static CFStringRef kParameterEUnit = CFSTR("freq"); -static CFStringRef kParameterEName = CFSTR("HighF"); -static CFStringRef kParameterFName = CFSTR("HMidF"); -static CFStringRef kParameterGName = CFSTR("LMidF"); -static CFStringRef kParameterHName = CFSTR("BassF"); -static CFStringRef kParameterIUnit = CFSTR("dyn"); -static CFStringRef kParameterIName = CFSTR("Thresh"); -static CFStringRef kParameterJName = CFSTR("Pan"); -static CFStringRef kParameterKName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamPAN = 0.5; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterPANName = CFSTR("Pan"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, + kParam_HIG =0, + kParam_HMG =1, + kParam_LMG =2, + kParam_BSG =3, + kParam_HIF =4, + kParam_HMF =5, + kParam_LMF =6, + kParam_BSF =7, + kParam_THR =8, + kParam_PAN =9, + kParam_FAD =10, //Add your parameters here... kNumberOfParameters=11 }; @@ -155,7 +159,7 @@ public: biq_sR1, biq_sR2, biq_total - }; //coefficient interpolating bessel filter, stereo + }; //coefficient interpolating filter, stereo double highA[biq_total]; double highB[biq_total]; double highC[biq_total]; @@ -176,25 +180,16 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss double avg32L[33]; double avg32R[33]; @@ -217,6 +212,7 @@ public: double panB; double inTrimA; double inTrimB; + uint32_t fpdL; uint32_t fpdR; }; diff --git a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser index 46c9c9a12..03bb34a9b 100755 --- a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser @@ -51,19 +51,19 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783619597; - PBXWorkspaceStateSaveDate = 783619597; + PBXPerProjectTemplateStateSaveDate = 787087708; + PBXWorkspaceStateSaveDate = 787087708; }; perUserProjectItems = { - 8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E332EB51644008B9860 /* PBXTextBookmark */; - 8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E342EB51644008B9860 /* PBXTextBookmark */; - 8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E352EB51644008B9860 /* PBXTextBookmark */; + 8B5AB4362EE9BF2400A3F512 /* PBXTextBookmark */ = 8B5AB4362EE9BF2400A3F512 /* PBXTextBookmark */; + 8B5AB4382EE9BF2400A3F512 /* PBXTextBookmark */ = 8B5AB4382EE9BF2400A3F512 /* PBXTextBookmark */; + 8B5AB5B52EEA141600A3F512 /* PBXTextBookmark */ = 8B5AB5B52EEA141600A3F512 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = { + 8B5AB4362EE9BF2400A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */; name = "ConsoleX2BussVersion.h: 1"; @@ -73,32 +73,32 @@ vrLen = 258; vrLoc = 0; }; - 8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = { + 8B5AB4382EE9BF2400A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */; - name = "ConsoleX2Buss.cpp: 317"; - rLen = 20897; - rLoc = 14098; + name = "ConsoleX2Buss.cpp: 373"; + rLen = 0; + rLoc = 16939; rType = 0; - vrLen = 285; - vrLoc = 14098; + vrLen = 267; + vrLoc = 16825; }; - 8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = { + 8B5AB5B52EEA141600A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */; - name = "ConsoleX2Buss.cpp: 317"; - rLen = 20897; - rLoc = 14098; + name = "ConsoleX2Buss.cpp: 373"; + rLen = 0; + rLoc = 16939; rType = 0; - vrLen = 285; - vrLoc = 14098; + vrLen = 188; + vrLoc = 16866; }; 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 13716}}"; - sepNavSelRange = "{14098, 20897}"; - sepNavVisRange = "{14098, 285}"; - sepNavWindowFrame = "{{5, 38}, {912, 826}}"; + sepNavIntBoundsRect = "{{0, 0}, {921, 13572}}"; + sepNavSelRange = "{16939, 0}"; + sepNavVisRange = "{16866, 188}"; + sepNavWindowFrame = "{{14, 51}, {1146, 827}}"; }; }; 8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */ = { @@ -106,7 +106,7 @@ sepNavIntBoundsRect = "{{0, 0}, {554, 1098}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 258}"; - sepNavWindowFrame = "{{38, 66}, {1066, 786}}"; + sepNavWindowFrame = "{{431, 92}, {1066, 786}}"; }; }; 8BA05A7F072073D200365D66 /* AUBase.cpp */ = { @@ -118,10 +118,10 @@ }; 8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 4086}}"; - sepNavSelRange = "{6056, 1375}"; - sepNavVisRange = "{4948, 1224}"; - sepNavWindowFrame = "{{10, 38}, {838, 820}}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 4014}}"; + sepNavSelRange = "{7268, 0}"; + sepNavVisRange = "{3342, 1138}"; + sepNavWindowFrame = "{{5, 58}, {838, 820}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 index 9d073fd2b..fbded4459 100755 --- a/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 @@ -324,7 +324,7 @@ 185 RubberWindowFrame - 5 284 810 487 0 0 1440 878 + 7 327 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -352,11 +352,11 @@ _historyCapacity 0 bookmark - 8B5C9E352EB51644008B9860 + 8B5AB5B52EEA141600A3F512 history - 8B5C9E332EB51644008B9860 - 8B5C9E342EB51644008B9860 + 8B5AB4362EE9BF2400A3F512 + 8B5AB4382EE9BF2400A3F512 SplitCount @@ -370,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 117}} RubberWindowFrame - 5 284 810 487 0 0 1440 878 + 7 327 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 117pt Proportion - 309pt + 324pt Tabs @@ -395,9 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 297}} RubberWindowFrame - 5 284 810 487 0 0 1440 878 + 7 327 810 487 0 0 1440 878 Module XCDetailModule @@ -451,7 +451,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 401}} + {{10, 27}, {603, 414}} Module PBXBuildResultsModule @@ -479,11 +479,11 @@ TableOfContents - 8B5C9E362EB51644008B9860 + 8B5AB58F2EEA016D00A3F512 1CA23ED40692098700951B8B - 8B5C9E372EB51644008B9860 + 8B5AB5902EEA016D00A3F512 8BD95EC52E957B6B00D77499 - 8B5C9E382EB51644008B9860 + 8B5AB5912EEA016D00A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -656,7 +656,7 @@ StatusbarIsVisible TimeStamp - 783619652.93727398 + 787092502.83642006 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -673,11 +673,11 @@ 5 WindowOrderList - 8B5C9E392EB51644008B9860 - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj + 8B5AB5B62EEA141600A3F512 + /Users/christopherjohnson/Desktop/ConsoleX2Buss/ConsoleX2Buss.xcodeproj WindowString - 5 284 810 487 0 0 1440 878 + 7 327 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.cpp b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.cpp index 16bc56f26..ee8c55520 100755 --- a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.cpp +++ b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.cpp @@ -59,24 +59,24 @@ ConsoleX2Channel::ConsoleX2Channel(AudioUnit component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); - SetParameter(kParam_L, kDefaultValue_ParamL ); - SetParameter(kParam_M, kDefaultValue_ParamM ); - SetParameter(kParam_N, kDefaultValue_ParamN ); - SetParameter(kParam_O, kDefaultValue_ParamO ); - SetParameter(kParam_P, kDefaultValue_ParamP ); - SetParameter(kParam_Q, kDefaultValue_ParamQ ); - SetParameter(kParam_R, kDefaultValue_ParamR ); + SetParameter(kParam_TRM, kDefaultValue_ParamTRM ); + SetParameter(kParam_MOR, kDefaultValue_ParamMOR ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_ATK, kDefaultValue_ParamATK ); + SetParameter(kParam_RLS, kDefaultValue_ParamRLS ); + SetParameter(kParam_GAT, kDefaultValue_ParamGAT ); + SetParameter(kParam_LOP, kDefaultValue_ParamLOP ); + SetParameter(kParam_HIP, kDefaultValue_ParamHIP ); + SetParameter(kParam_PAN, kDefaultValue_ParamPAN ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -113,135 +113,135 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_TRM: + AUBase::FillInParameterName (outParameterInfo, kParameterTRMName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Indexed; outParameterInfo.minValue = 0; outParameterInfo.maxValue = 4; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamTRM; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_MOR: + AUBase::FillInParameterName (outParameterInfo, kParameterMORName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamMOR; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterCUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterGUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterKUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_L: - AUBase::FillInParameterName (outParameterInfo, kParameterLName, false); + case kParam_ATK: + AUBase::FillInParameterName (outParameterInfo, kParameterATKName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamL; + outParameterInfo.defaultValue = kDefaultValue_ParamATK; break; - case kParam_M: - AUBase::FillInParameterName (outParameterInfo, kParameterMName, false); + case kParam_RLS: + AUBase::FillInParameterName (outParameterInfo, kParameterRLSName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamM; + outParameterInfo.defaultValue = kDefaultValue_ParamRLS; break; - case kParam_N: - AUBase::FillInParameterName (outParameterInfo, kParameterNName, false); + case kParam_GAT: + AUBase::FillInParameterName (outParameterInfo, kParameterGATName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamN; + outParameterInfo.defaultValue = kDefaultValue_ParamGAT; break; - case kParam_O: - AUBase::FillInParameterName (outParameterInfo, kParameterOName, false); + case kParam_LOP: + AUBase::FillInParameterName (outParameterInfo, kParameterLOPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterOUnit; + outParameterInfo.unitName = kParameterLOPUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamO; + outParameterInfo.defaultValue = kDefaultValue_ParamLOP; break; - case kParam_P: - AUBase::FillInParameterName (outParameterInfo, kParameterPName, false); + case kParam_HIP: + AUBase::FillInParameterName (outParameterInfo, kParameterHIPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamP; + outParameterInfo.defaultValue = kDefaultValue_ParamHIP; break; - case kParam_Q: - AUBase::FillInParameterName (outParameterInfo, kParameterQName, false); + case kParam_PAN: + AUBase::FillInParameterName (outParameterInfo, kParameterPANName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamQ; + outParameterInfo.defaultValue = kDefaultValue_ParamPAN; break; - case kParam_R: - AUBase::FillInParameterName (outParameterInfo, kParameterRName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamR; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -332,10 +332,10 @@ ComponentResult ConsoleX2Channel::Reset(AudioUnitScope inScope, AudioUnitElemen lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -403,149 +403,158 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0; - switch ((int)GetParameter( kParam_A )){ + double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); + switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(GetParameter( kParam_MOR )*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (GetParameter( kParam_C )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_D )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_F )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_G )-0.5; - double highmidRef = GetParameter( kParam_H )-0.5; - double lowmidRef = GetParameter( kParam_I )-0.5; - double bassRef = GetParameter( kParam_J )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = GetParameter( kParam_Q )*1.57079633; - inTrimA = inTrimB; inTrimB = GetParameter( kParam_R )*2.0; + panA = panB; panB = GetParameter( kParam_PAN )*1.57079633; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { @@ -554,307 +563,265 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off + + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.h b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.h index 7cc14906a..8e5812c89 100755 --- a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.h +++ b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.h @@ -54,67 +54,75 @@ #pragma mark ____ConsoleX2Channel Parameters // parameters -static const int kDefaultValue_ParamA = 1; -static const float kDefaultValue_ParamB = 0.0; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 0.5; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 1.0; -static const float kDefaultValue_ParamL = 0.5; -static const float kDefaultValue_ParamM = 0.5; -static const float kDefaultValue_ParamN = 0.0; -static const float kDefaultValue_ParamO = 1.0; -static const float kDefaultValue_ParamP = 0.0; -static const float kDefaultValue_ParamQ = 0.5; -static const float kDefaultValue_ParamR = 0.5; +static const int kDefaultValue_ParamTRM = 1; +static const float kDefaultValue_ParamMOR = 0.0; -static CFStringRef kParameterAName = CFSTR("Trim"); -static CFStringRef kParameterBName = CFSTR("More"); -static CFStringRef kParameterCUnit = CFSTR("eq"); -static CFStringRef kParameterCName = CFSTR("High"); -static CFStringRef kParameterDName = CFSTR("HMid"); -static CFStringRef kParameterEName = CFSTR("LMid"); -static CFStringRef kParameterFName = CFSTR("Bass"); -static CFStringRef kParameterGUnit = CFSTR("freq"); -static CFStringRef kParameterGName = CFSTR("HighF"); -static CFStringRef kParameterHName = CFSTR("HMidF"); -static CFStringRef kParameterIName = CFSTR("LMidF"); -static CFStringRef kParameterJName = CFSTR("BassF"); -static CFStringRef kParameterKUnit = CFSTR("dyn"); -static CFStringRef kParameterKName = CFSTR("Thresh"); -static CFStringRef kParameterLName = CFSTR("Attack"); -static CFStringRef kParameterMName = CFSTR("Release"); -static CFStringRef kParameterNName = CFSTR("Gate"); -static CFStringRef kParameterOUnit = CFSTR("fltr"); -static CFStringRef kParameterOName = CFSTR("Lowpass"); -static CFStringRef kParameterPName = CFSTR("Hipass"); -static CFStringRef kParameterQName = CFSTR("Pan"); -static CFStringRef kParameterRName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; + +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamATK = 0.5; +static const float kDefaultValue_ParamRLS = 0.5; +static const float kDefaultValue_ParamGAT = 0.0; + +static const float kDefaultValue_ParamLOP = 1.0; +static const float kDefaultValue_ParamHIP = 0.0; +static const float kDefaultValue_ParamPAN = 0.5; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterTRMName = CFSTR("Trim"); +static CFStringRef kParameterMORName = CFSTR("More"); + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterATKName = CFSTR("Attack"); +static CFStringRef kParameterRLSName = CFSTR("Release"); +static CFStringRef kParameterGATName = CFSTR("Gate"); + +static CFStringRef kParameterLOPUnit = CFSTR("fltr"); +static CFStringRef kParameterLOPName = CFSTR("Lowpass"); +static CFStringRef kParameterHIPName = CFSTR("Hipass"); +static CFStringRef kParameterPANName = CFSTR("Pan"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, - kParam_L =11, - kParam_M =12, - kParam_N =13, - kParam_O =14, - kParam_P =15, - kParam_Q =16, - kParam_R =17, + kParam_TRM =0, + kParam_MOR =1, + kParam_HIG =2, + kParam_HMG =3, + kParam_LMG =4, + kParam_BSG =5, + kParam_HIF =6, + kParam_HMF =7, + kParam_LMF =8, + kParam_BSF =9, + kParam_THR =10, + kParam_ATK =11, + kParam_RLS =12, + kParam_GAT =13, + kParam_LOP =14, + kParam_HIP =15, + kParam_PAN =16, + kParam_FAD =17, //Add your parameters here... kNumberOfParameters=18 }; @@ -200,26 +208,18 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser index 97de010b9..ca001efae 100755 --- a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser @@ -12,7 +12,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 364, + 300, 20, 48, 43, @@ -51,38 +51,48 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783603960; - PBXWorkspaceStateSaveDate = 783603960; + PBXPerProjectTemplateStateSaveDate = 787092677; + PBXWorkspaceStateSaveDate = 787092677; }; perUserProjectItems = { - 8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE12EB4E21700F51381 /* PBXTextBookmark */; - 8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE22EB4E21700F51381 /* PBXTextBookmark */; + 8B5AB49F2EE9CADD00A3F512 /* PBXTextBookmark */ = 8B5AB49F2EE9CADD00A3F512 /* PBXTextBookmark */; + 8B5AB4A02EE9CADD00A3F512 /* PBXTextBookmark */ = 8B5AB4A02EE9CADD00A3F512 /* PBXTextBookmark */; + 8B5AB5F62EEA1E3300A3F512 /* PBXTextBookmark */ = 8B5AB5F62EEA1E3300A3F512 /* PBXTextBookmark */; 8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = 8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */; - 8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = 8BAA80A32EA691D900A83054 /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = { + 8B5AB49F2EE9CADD00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */; - name = "ConsoleX2Channel.cpp: 377"; + fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */; + name = "ConsoleX2Channel.h: 237"; rLen = 0; - rLoc = 16627; + rLoc = 8174; rType = 0; - vrLen = 22; - vrLoc = 54; + vrLen = 181; + vrLoc = 74; }; - 8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = { + 8B5AB4A02EE9CADD00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */; - name = "ConsoleX2Channel.cpp: 377"; + name = "ConsoleX2Channel.cpp: 600"; rLen = 0; - rLoc = 16627; + rLoc = 26751; rType = 0; - vrLen = 22; - vrLoc = 54; + vrLen = 134; + vrLoc = 26171; + }; + 8B5AB5F62EEA1E3300A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */; + name = "ConsoleX2Channel.cpp: 600"; + rLen = 0; + rLoc = 26751; + rType = 0; + vrLen = 90; + vrLoc = 26215; }; 8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = { isa = PBXTextBookmark; @@ -96,10 +106,10 @@ }; 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {696, 17226}}"; - sepNavSelRange = "{16627, 0}"; - sepNavVisRange = "{54, 22}"; - sepNavWindowFrame = "{{6, 88}, {931, 746}}"; + sepNavIntBoundsRect = "{{0, 0}, {867, 16470}}"; + sepNavSelRange = "{26751, 0}"; + sepNavVisRange = "{26215, 90}"; + sepNavWindowFrame = "{{11, 97}, {931, 746}}"; }; }; 8BA05A670720730100365D66 /* ConsoleX2Channel.exp */ = { @@ -114,8 +124,8 @@ uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{1277, 1741}"; - sepNavWindowFrame = "{{777, 92}, {1066, 786}}"; + sepNavVisRange = "{1179, 1839}"; + sepNavWindowFrame = "{{374, 92}, {1066, 786}}"; }; }; 8BA05A7F072073D200365D66 /* AUBase.cpp */ = { @@ -125,22 +135,12 @@ sepNavVisRange = "{0, 1336}"; }; }; - 8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */; - name = "ConsoleX2Channel.h: 235"; - rLen = 0; - rLoc = 8160; - rType = 0; - vrLen = 76; - vrLoc = 7715; - }; 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 5058}}"; - sepNavSelRange = "{8317, 299}"; - sepNavVisRange = "{3331, 1640}"; - sepNavWindowFrame = "{{2, 39}, {656, 839}}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 5688}}"; + sepNavSelRange = "{7629, 237}"; + sepNavVisRange = "{6149, 1155}"; + sepNavWindowFrame = "{{16, 53}, {802, 825}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 index 8aed517aa..ba11fb5ac 100755 --- a/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 @@ -282,7 +282,7 @@ PBXSmartGroupTreeModuleColumnWidthsKey - 185 + 249 PBXSmartGroupTreeModuleColumnsKey_v4 @@ -307,7 +307,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {185, 428}} + {{0, 0}, {249, 428}} PBXTopSmartGroupGIDs @@ -317,19 +317,19 @@ GeometryConfiguration Frame - {{0, 0}, {202, 446}} + {{0, 0}, {266, 446}} GroupTreeTableConfiguration MainColumn - 185 + 249 RubberWindowFrame - 9 258 810 487 0 0 1440 878 + 1 358 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule Proportion - 202pt + 266pt Dock @@ -352,12 +352,12 @@ _historyCapacity 0 bookmark - 8B692BE22EB4E21700F51381 + 8B5AB5F62EEA1E3300A3F512 history 8B9629D92E9AC7DA000EAC04 - 8BAA80A32EA691D900A83054 - 8B692BE12EB4E21700F51381 + 8B5AB49F2EE9CADD00A3F512 + 8B5AB4A02EE9CADD00A3F512 SplitCount @@ -371,9 +371,9 @@ GeometryConfiguration Frame - {{0, 0}, {603, 51}} + {{0, 0}, {539, 51}} RubberWindowFrame - 9 258 810 487 0 0 1440 878 + 1 358 810 487 0 0 1440 878 Module PBXNavigatorGroup @@ -396,9 +396,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 363}} + {{10, 27}, {539, 363}} RubberWindowFrame - 9 258 810 487 0 0 1440 878 + 1 358 810 487 0 0 1440 878 Module XCDetailModule @@ -452,7 +452,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 345}} + {{10, 27}, {539, 328}} Module PBXBuildResultsModule @@ -461,7 +461,7 @@ Proportion - 603pt + 539pt Name @@ -480,11 +480,11 @@ TableOfContents - 8B692BE32EB4E21700F51381 + 8B5AB5C72EEA14CA00A3F512 1CA23ED40692098700951B8B - 8B692BE42EB4E21700F51381 + 8B5AB5C82EEA14CA00A3F512 8BD95EA72E957B1200D77499 - 8B692BE52EB4E21700F51381 + 8B5AB5C92EEA14CA00A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -633,14 +633,14 @@ TableOfContents - 8BD964DD2E95AA8E00D77499 + 8B5AB4132EE9B1F300A3F512 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - 8BD964DE2E95AA8E00D77499 - 8BD964DF2E95AA8E00D77499 - 8BD964E02E95AA8E00D77499 - 8BD964E12E95AA8E00D77499 - 8BD964E22E95AA8E00D77499 + 8B5AB4142EE9B1F300A3F512 + 8B5AB4152EE9B1F300A3F512 + 8B5AB4162EE9B1F300A3F512 + 8B5AB4172EE9B1F300A3F512 + 8B5AB4182EE9B1F300A3F512 ToolbarConfigUserDefaultsMinorVersion 2 @@ -657,7 +657,7 @@ StatusbarIsVisible TimeStamp - 783606295.64856899 + 787095091.46855199 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -674,10 +674,10 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj + /Users/christopherjohnson/Desktop/ConsoleX2Channel/ConsoleX2Channel.xcodeproj WindowString - 9 258 810 487 0 0 1440 878 + 1 358 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.cpp b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.cpp index 9871e43f7..45914e1bd 100755 --- a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.cpp +++ b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.cpp @@ -59,23 +59,23 @@ ConsoleX2Pre::ConsoleX2Pre(AudioUnit component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); - SetParameter(kParam_L, kDefaultValue_ParamL ); - SetParameter(kParam_M, kDefaultValue_ParamM ); - SetParameter(kParam_N, kDefaultValue_ParamN ); - SetParameter(kParam_O, kDefaultValue_ParamO ); - SetParameter(kParam_P, kDefaultValue_ParamP ); - SetParameter(kParam_Q, kDefaultValue_ParamQ ); + SetParameter(kParam_TRM, kDefaultValue_ParamTRM ); + SetParameter(kParam_MOR, kDefaultValue_ParamMOR ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_ATK, kDefaultValue_ParamATK ); + SetParameter(kParam_RLS, kDefaultValue_ParamRLS ); + SetParameter(kParam_GAT, kDefaultValue_ParamGAT ); + SetParameter(kParam_LOP, kDefaultValue_ParamLOP ); + SetParameter(kParam_HIP, kDefaultValue_ParamHIP ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -112,128 +112,128 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_TRM: + AUBase::FillInParameterName (outParameterInfo, kParameterTRMName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Indexed; outParameterInfo.minValue = 0; outParameterInfo.maxValue = 4; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamTRM; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_MOR: + AUBase::FillInParameterName (outParameterInfo, kParameterMORName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamMOR; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterCUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterGUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterKUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_L: - AUBase::FillInParameterName (outParameterInfo, kParameterLName, false); + case kParam_ATK: + AUBase::FillInParameterName (outParameterInfo, kParameterATKName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamL; + outParameterInfo.defaultValue = kDefaultValue_ParamATK; break; - case kParam_M: - AUBase::FillInParameterName (outParameterInfo, kParameterMName, false); + case kParam_RLS: + AUBase::FillInParameterName (outParameterInfo, kParameterRLSName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamM; + outParameterInfo.defaultValue = kDefaultValue_ParamRLS; break; - case kParam_N: - AUBase::FillInParameterName (outParameterInfo, kParameterNName, false); + case kParam_GAT: + AUBase::FillInParameterName (outParameterInfo, kParameterGATName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamN; + outParameterInfo.defaultValue = kDefaultValue_ParamGAT; break; - case kParam_O: - AUBase::FillInParameterName (outParameterInfo, kParameterOName, false); + case kParam_LOP: + AUBase::FillInParameterName (outParameterInfo, kParameterLOPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterOUnit; + outParameterInfo.unitName = kParameterLOPUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamO; + outParameterInfo.defaultValue = kDefaultValue_ParamLOP; break; - case kParam_P: - AUBase::FillInParameterName (outParameterInfo, kParameterPName, false); + case kParam_HIP: + AUBase::FillInParameterName (outParameterInfo, kParameterHIPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamP; + outParameterInfo.defaultValue = kDefaultValue_ParamHIP; break; - case kParam_Q: - AUBase::FillInParameterName (outParameterInfo, kParameterQName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamQ; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -306,10 +306,10 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Reset() lowIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPosition[count] = 0.0; @@ -366,323 +366,321 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0; - switch ((int)GetParameter( kParam_A )){ + double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); + switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(GetParameter( kParam_MOR )*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (GetParameter( kParam_C )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_D )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_F )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_G )-0.5; - double highmidRef = GetParameter( kParam_H )-0.5; - double lowmidRef = GetParameter( kParam_I )-0.5; - double bassRef = GetParameter( kParam_J )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { double inputSampleL = *sourceP; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17; - double darkSampleL = inputSampleL; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} - darkSampleL /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} - darkSampleL /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} - darkSampleL /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} - darkSampleL /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} - darkSampleL /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} + darkSampleL /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} + darkSampleL /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} + darkSampleL /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} + darkSampleL /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} + darkSampleL /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL,1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highIIR = (highIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highIIR; trebleL -= highmidL; - - midIIR = (midIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midIIR; highmidL -= lowmidL; - - lowIIR = (lowIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highIIR = (highIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highIIR; trebleL -= highmidL; + + midIIR = (midIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midIIR; highmidL -= lowmidL; + + lowIIR = (lowIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fabs(inputSampleL) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) inputSampleL *= ((bezCThresh*0.5)+1.0); - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezMaxF = fmax(bezMaxF,fabs(inputSampleL)); - if (bezCompF[bez_cycle] > 1.0) { - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate; - //Dynamics2 + if (bezThresh > 0.0) { + if (fabs(inputSampleL) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + double ctrl = fabs(inputSampleL); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.h b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.h index 87cb61544..71ba7313a 100755 --- a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.h +++ b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.h @@ -54,64 +54,72 @@ #pragma mark ____ConsoleX2Pre Parameters // parameters -static const int kDefaultValue_ParamA = 1; -static const float kDefaultValue_ParamB = 0.0; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 0.5; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 1.0; -static const float kDefaultValue_ParamL = 0.5; -static const float kDefaultValue_ParamM = 0.5; -static const float kDefaultValue_ParamN = 0.0; -static const float kDefaultValue_ParamO = 1.0; -static const float kDefaultValue_ParamP = 0.0; -static const float kDefaultValue_ParamQ = 0.5; +static const int kDefaultValue_ParamTRM = 1; +static const float kDefaultValue_ParamMOR = 0.0; -static CFStringRef kParameterAName = CFSTR("Trim"); -static CFStringRef kParameterBName = CFSTR("More"); -static CFStringRef kParameterCUnit = CFSTR("eq"); -static CFStringRef kParameterCName = CFSTR("High"); -static CFStringRef kParameterDName = CFSTR("HMid"); -static CFStringRef kParameterEName = CFSTR("LMid"); -static CFStringRef kParameterFName = CFSTR("Bass"); -static CFStringRef kParameterGUnit = CFSTR("freq"); -static CFStringRef kParameterGName = CFSTR("HighF"); -static CFStringRef kParameterHName = CFSTR("HMidF"); -static CFStringRef kParameterIName = CFSTR("LMidF"); -static CFStringRef kParameterJName = CFSTR("BassF"); -static CFStringRef kParameterKUnit = CFSTR("dyn"); -static CFStringRef kParameterKName = CFSTR("Thresh"); -static CFStringRef kParameterLName = CFSTR("Attack"); -static CFStringRef kParameterMName = CFSTR("Release"); -static CFStringRef kParameterNName = CFSTR("Gate"); -static CFStringRef kParameterOUnit = CFSTR("fltr"); -static CFStringRef kParameterOName = CFSTR("Lowpass"); -static CFStringRef kParameterPName = CFSTR("Hipass"); -static CFStringRef kParameterQName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; + +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamATK = 0.5; +static const float kDefaultValue_ParamRLS = 0.5; +static const float kDefaultValue_ParamGAT = 0.0; + +static const float kDefaultValue_ParamLOP = 1.0; +static const float kDefaultValue_ParamHIP = 0.0; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterTRMName = CFSTR("Trim"); +static CFStringRef kParameterMORName = CFSTR("More"); + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterATKName = CFSTR("Attack"); +static CFStringRef kParameterRLSName = CFSTR("Release"); +static CFStringRef kParameterGATName = CFSTR("Gate"); + +static CFStringRef kParameterLOPUnit = CFSTR("fltr"); +static CFStringRef kParameterLOPName = CFSTR("Lowpass"); +static CFStringRef kParameterHIPName = CFSTR("Hipass"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, - kParam_L =11, - kParam_M =12, - kParam_N =13, - kParam_O =14, - kParam_P =15, - kParam_Q =16, + kParam_TRM =0, + kParam_MOR =1, + kParam_HIG =2, + kParam_HMG =3, + kParam_LMG =4, + kParam_BSG =5, + kParam_HIF =6, + kParam_HMF =7, + kParam_LMF =8, + kParam_BSF =9, + kParam_THR =10, + kParam_ATK =11, + kParam_RLS =12, + kParam_GAT =13, + kParam_LOP =14, + kParam_HIP =15, + kParam_FAD =16, //Add your parameters here... kNumberOfParameters=17 }; @@ -208,20 +216,18 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPosition[23]; double iirHAngle[23]; diff --git a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser index a8111bca7..150259503 100755 --- a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser @@ -51,12 +51,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783603927; - PBXWorkspaceStateSaveDate = 783603927; + PBXPerProjectTemplateStateSaveDate = 787095378; + PBXWorkspaceStateSaveDate = 787095378; }; perUserProjectItems = { - 8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = 8B692B762EB4D66E00F51381 /* PBXTextBookmark */; - 8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = 8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */; + 8B5AB41A2EE9B1F500A3F512 /* PBXTextBookmark */ = 8B5AB41A2EE9B1F500A3F512 /* PBXTextBookmark */; + 8B5AB41C2EE9B1F500A3F512 /* PBXTextBookmark */ = 8B5AB41C2EE9B1F500A3F512 /* PBXTextBookmark */; + 8B5AB63E2EEA333200A3F512 /* PBXTextBookmark */ = 8B5AB63E2EEA333200A3F512 /* PBXTextBookmark */; 8BC5BE482EB1697700031C01 /* PBXTextBookmark */ = 8BC5BE482EB1697700031C01 /* PBXTextBookmark */; 8BD964C72E95AA0700D77499 /* PlistBookmark */ = 8BD964C72E95AA0700D77499 /* PlistBookmark */; }; @@ -64,32 +65,42 @@ userBuildSettings = { }; }; - 8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = { + 8B5AB41A2EE9B1F500A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */; - name = "ConsoleX2Pre.cpp: 698"; + fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */; + name = "ConsoleX2Pre.h: 122"; rLen = 0; - rLoc = 31458; + rLoc = 5117; rType = 0; - vrLen = 66; - vrLoc = 3; + vrLen = 114; + vrLoc = 7293; }; - 8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = { + 8B5AB41C2EE9B1F500A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */; - name = "ConsoleX2Pre.cpp: 698"; + name = "ConsoleX2Pre.cpp: 696"; rLen = 0; - rLoc = 31458; + rLoc = 31255; rType = 0; - vrLen = 40; - vrLoc = 29; + vrLen = 206; + vrLoc = 47; + }; + 8B5AB63E2EEA333200A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */; + name = "ConsoleX2Pre.cpp: 696"; + rLen = 0; + rLoc = 31255; + rType = 0; + vrLen = 206; + vrLoc = 47; }; 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1065, 13572}}"; - sepNavSelRange = "{31458, 0}"; - sepNavVisRange = "{29, 40}"; - sepNavWindowFrame = "{{19, 92}, {1066, 786}}"; + sepNavIntBoundsRect = "{{0, 0}, {1065, 13464}}"; + sepNavSelRange = "{31255, 0}"; + sepNavVisRange = "{47, 206}"; + sepNavWindowFrame = "{{13, 92}, {1066, 786}}"; }; }; 8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */ = { @@ -112,10 +123,10 @@ }; 8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 4734}}"; - sepNavSelRange = "{8318, 0}"; - sepNavVisRange = "{3264, 1603}"; - sepNavWindowFrame = "{{7, 38}, {657, 832}}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 4842}}"; + sepNavSelRange = "{7719, 250}"; + sepNavVisRange = "{4221, 1052}"; + sepNavWindowFrame = "{{19, 46}, {657, 832}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { diff --git a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 index 4f1aebcde..248b6f7d4 100755 --- a/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 @@ -302,7 +302,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 3 + 4 2 1 0 @@ -326,7 +326,7 @@ 288 RubberWindowFrame - 25 209 716 511 0 0 1440 878 + 10 90 716 511 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,12 +354,13 @@ _historyCapacity 0 bookmark - 8B692BBF2EB4DCD400F51381 + 8B5AB63E2EEA333200A3F512 history 8BD964C72E95AA0700D77499 8BC5BE482EB1697700031C01 - 8B692B762EB4D66E00F51381 + 8B5AB41A2EE9B1F500A3F512 + 8B5AB41C2EE9B1F500A3F512 SplitCount @@ -373,18 +374,18 @@ GeometryConfiguration Frame - {{0, 0}, {406, 94}} + {{0, 0}, {406, 125}} RubberWindowFrame - 25 209 716 511 0 0 1440 878 + 10 90 716 511 0 0 1440 878 Module PBXNavigatorGroup Proportion - 94pt + 125pt Proportion - 371pt + 340pt Tabs @@ -398,9 +399,9 @@ GeometryConfiguration Frame - {{10, 27}, {406, 344}} + {{10, 27}, {406, 313}} RubberWindowFrame - 25 209 716 511 0 0 1440 878 + 10 90 716 511 0 0 1440 878 Module XCDetailModule @@ -482,11 +483,11 @@ TableOfContents - 8B692B8A2EB4D8DA00F51381 + 8B5AB63F2EEA333200A3F512 1CA23ED40692098700951B8B - 8B692B8B2EB4D8DA00F51381 + 8B5AB6402EEA333200A3F512 8BD7274A1D46E5A5000176F0 - 8B692B8C2EB4D8DA00F51381 + 8B5AB6412EEA333200A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -659,7 +660,7 @@ StatusbarIsVisible TimeStamp - 783604948.76098895 + 787100466.62823403 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -676,10 +677,10 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj + /Users/christopherjohnson/Desktop/ConsoleX2Pre/ConsoleX2Pre.xcodeproj WindowString - 25 209 716 511 0 0 1440 878 + 10 90 716 511 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/Dynamics3/Dynamics3.cpp b/plugins/MacAU/Dynamics3/Dynamics3.cpp new file mode 100755 index 000000000..1b553a6ff --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.cpp @@ -0,0 +1,293 @@ +/* +* File: Dynamics3.cpp +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +/*============================================================================= + Dynamics3.cpp + +=============================================================================*/ +#include "Dynamics3.h" + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +COMPONENT_ENTRY(Dynamics3) + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::Dynamics3 +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Dynamics3::Dynamics3(AudioUnit component) + : AUEffectBase(component) +{ + CreateElements(); + Globals()->UseIndexedParameters(kNumberOfParameters); + SetParameter(kParam_A, kDefaultValue_ParamA ); + SetParameter(kParam_B, kDefaultValue_ParamB ); + SetParameter(kParam_C, kDefaultValue_ParamC ); + SetParameter(kParam_D, kDefaultValue_ParamD ); + +#if AU_DEBUG_DISPATCHER + mDebugDispatcher = new AUDebugDispatcher (this); +#endif + +} + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetParameterValueStrings +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings) +{ + + return kAudioUnitErr_InvalidProperty; +} + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetParameterInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo ) +{ + ComponentResult result = noErr; + + outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable + | kAudioUnitParameterFlag_IsReadable; + + if (inScope == kAudioUnitScope_Global) { + switch(inParameterID) + { + case kParam_A: + AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamA; + break; + case kParam_B: + AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamB; + break; + case kParam_C: + AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamC; + break; + case kParam_D: + AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamD; + break; + default: + result = kAudioUnitErr_InvalidParameter; + break; + } + } else { + result = kAudioUnitErr_InvalidParameter; + } + + + + return result; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetPropertyInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetPropertyInfo (AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable) +{ + return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable); +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// state that plugin supports only stereo-in/stereo-out processing +UInt32 Dynamics3::SupportedNumChannels(const AUChannelInfo ** outInfo) +{ + if (outInfo != NULL) + { + static AUChannelInfo info; + info.inChannels = 2; + info.outChannels = 2; + *outInfo = &info; + } + + return 1; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetProperty +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetProperty( AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData ) +{ + return AUEffectBase::GetProperty (inID, inScope, inElement, outData); +} + +// Dynamics3::Initialize +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::Initialize() +{ + ComponentResult result = AUEffectBase::Initialize(); + if (result == noErr) + Reset(kAudioUnitScope_Global, 0); + return result; +} + +#pragma mark ____Dynamics3EffectKernel + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::Dynamics3Kernel::Reset() +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::Reset(AudioUnitScope inScope, AudioUnitElement inElement) +{ + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + return noErr; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::ProcessBufferLists +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +OSStatus Dynamics3::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, + const AudioBufferList & inBuffer, + AudioBufferList & outBuffer, + UInt32 inFramesToProcess) +{ + Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData); + Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData); + Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData); + Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData); + UInt32 nSampleFrames = inFramesToProcess; + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= GetSampleRate(); + + double bezThresh = pow(1.0-GetParameter( kParam_A ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_B ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_C ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_D ),4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 + + while (nSampleFrames-- > 0) { + double inputSampleL = *inputL; + double inputSampleR = *inputR; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *outputL = inputSampleL; + *outputR = inputSampleR; + //direct stereo out + + inputL += 1; + inputR += 1; + outputL += 1; + outputR += 1; + } + return noErr; +} + diff --git a/plugins/MacAU/Dynamics3/Dynamics3.exp b/plugins/MacAU/Dynamics3/Dynamics3.exp new file mode 100755 index 000000000..17f1bd6fc --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.exp @@ -0,0 +1 @@ +_Dynamics3Entry diff --git a/plugins/MacAU/Dynamics3/Dynamics3.h b/plugins/MacAU/Dynamics3/Dynamics3.h new file mode 100755 index 000000000..96abf33d0 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.h @@ -0,0 +1,142 @@ +/* +* File: Dynamics3.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include "AUEffectBase.h" +#include "Dynamics3Version.h" + +#if AU_DEBUG_DISPATCHER + #include "AUDebugDispatcher.h" +#endif + + +#ifndef __Dynamics3_h__ +#define __Dynamics3_h__ + + +#pragma mark ____Dynamics3 Parameters + +// parameters +static const float kDefaultValue_ParamA = 1.0; +static const float kDefaultValue_ParamB = 0.5; +static const float kDefaultValue_ParamC = 0.5; +static const float kDefaultValue_ParamD = 0.0; + +static CFStringRef kParameterAName = CFSTR("Thresh"); +static CFStringRef kParameterBName = CFSTR("Attack"); +static CFStringRef kParameterCName = CFSTR("Release"); +static CFStringRef kParameterDName = CFSTR("Gate"); + +enum { + kParam_A =0, + kParam_B =1, + kParam_C =2, + kParam_D =3, + //Add your parameters here... + kNumberOfParameters=4 +}; + +#pragma mark ____Dynamics3 +class Dynamics3 : public AUEffectBase +{ +public: + Dynamics3(AudioUnit component); +#if AU_DEBUG_DISPATCHER + virtual ~Dynamics3 () { delete mDebugDispatcher; } +#endif + + virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement); + + virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, + const AudioBufferList & inBuffer, AudioBufferList & outBuffer, + UInt32 inFramesToProcess); + virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo); + + virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings); + + virtual ComponentResult GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo); + + virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable ); + + virtual ComponentResult GetProperty(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData); + + virtual ComponentResult Initialize(); + virtual bool SupportsTail () { return true; } + virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples + virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples + + /*! @method Version */ + virtual ComponentResult Version() { return kDynamics3Version; } + + private: + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + //Dynamics3 + + uint32_t fpdL; + uint32_t fpdR; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +#endif \ No newline at end of file diff --git a/plugins/MacAU/Dynamics3/Dynamics3.r b/plugins/MacAU/Dynamics3/Dynamics3.r new file mode 100755 index 000000000..a4fc56d85 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.r @@ -0,0 +1,61 @@ +/* +* File: Dynamics3.r +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include + +#include "Dynamics3Version.h" + +// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description +#define kAudioUnitResID_Dynamics3 1000 + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dynamics3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#define RES_ID kAudioUnitResID_Dynamics3 +#define COMP_TYPE kAudioUnitType_Effect +#define COMP_SUBTYPE Dynamics3_COMP_SUBTYPE +#define COMP_MANUF Dynamics3_COMP_MANF + +#define VERSION kDynamics3Version +#define NAME "Airwindows: Dynamics3" +#define DESCRIPTION "Dynamics3 AU" +#define ENTRY_POINT "Dynamics3Entry" + +#include "AUResources.r" \ No newline at end of file diff --git a/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 new file mode 100755 index 000000000..61450416d --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 @@ -0,0 +1,1359 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 8BD3CCBC148831C90062E48C + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + build + debugger-enable-breakpoints + get-info + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 299 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A7D072073D200365D66 + 8BA05A7E072073D200365D66 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 6 + 5 + 4 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {299, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {316, 463}} + GroupTreeTableConfiguration + + MainColumn + 299 + + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 316pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {467, 0}} + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 5}, {467, 458}} + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + XCDetailModule + Proportion + 458pt + + + Proportion + 467pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 8BDD47AA1A48BB8900FB2F61 + 1CE0B1FE06471DED0097A5F4 + 8BDD47AB1A48BB8900FB2F61 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 8BD3CCBD148831C90062E48C + /Developer/Library/Xcode/Project Templates/System Plug-in/Audio Unit Effect/Audio Unit Effect with Cocoa View/StarterAU.xcodeproj + + WindowString + 18 337 788 504 0 0 1440 878 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 218}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 223}, {500, 236}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 459pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 8BD3CCBD148831C90062E48C + 8BDD47AC1A48BB8900FB2F61 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 668 222 500 500 0 0 1440 878 + WindowToolGUID + 8BD3CCBD148831C90062E48C + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..1ac389561 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,131 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3 */; + codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 127, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 188, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786918597; + PBXWorkspaceStateSaveDate = 786918597; + }; + perUserProjectItems = { + 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */ = 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */; + 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */ = 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */; + }; + sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; + userBuildSettings = { + }; + }; + 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; + name = "Dynamics3.cpp: 240"; + rLen = 1179; + rLoc = 10661; + rType = 0; + vrLen = 241; + vrLoc = 10661; + }; + 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; + name = "Dynamics3.cpp: 240"; + rLen = 1179; + rLoc = 10661; + rType = 0; + vrLen = 241; + vrLoc = 10661; + }; + 8BA05A660720730100365D66 /* Dynamics3.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {975, 5508}}"; + sepNavSelRange = "{10661, 1179}"; + sepNavVisRange = "{10661, 241}"; + sepNavWindowFrame = "{{-4, 38}, {742, 840}}"; + }; + }; + 8BA05A690720730100365D66 /* Dynamics3Version.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; + sepNavSelRange = "{2907, 0}"; + sepNavVisRange = "{1699, 1271}"; + sepNavWindowFrame = "{{15, 192}, {826, 681}}"; + }; + }; + 8BA05A7F072073D200365D66 /* AUBase.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 1336}"; + }; + }; + 8BC6025B073B072D006C4272 /* Dynamics3.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1146, 2826}}"; + sepNavSelRange = "{5073, 237}"; + sepNavVisRange = "{4431, 1012}"; + sepNavWindowFrame = "{{-5, 58}, {565, 799}}"; + }; + }; + 8BD3CCB8148830B20062E48C /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8BD3CCB9148830B20062E48C /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..85ba26382 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1484 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8B17F98B2ECF53930095B409 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 810 + 810 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 185 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A56072072A900365D66 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 4 + 2 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {185, 446}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {202, 464}} + GroupTreeTableConfiguration + + MainColumn + 185 + + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 202pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8B17F9862ECF53930095B409 + PBXProjectModuleLabel + Dynamics3.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8B17F9872ECF53930095B409 + PBXProjectModuleLabel + Dynamics3.cpp + _historyCapacity + 0 + bookmark + 8B5AB2B32EE779AB00A3F512 + history + + 8B5AB2B22EE779AB00A3F512 + + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {366, 136}} + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 136pt + + + Proportion + 323pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {366, 296}} + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {603, 414}} + + Module + PBXBuildResultsModule + + + + + Proportion + 366pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AB2B42EE779AB00A3F512 + 1CA23ED40692098700951B8B + 8B5AB2B52EE779AB00A3F512 + 8B17F9862ECF53930095B409 + 8B5AB2B62EE779AB00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + 1 + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0% + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 213}} + {{395, 0}, {415, 213}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 213}} + {{0, 213}, {810, 225}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 7}, {810, 438}} + + Module + PBXDebugSessionModule + Proportion + 443pt + + + Name + Debug + ServiceClasses + + XCModuleDock + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + XCConsole + + TableOfContents + + 1CC8E6A5069209BD00BB180A + 1CC8E6A6069209BD00BB180A + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 1CC8E6A7069209BD00BB180A + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786921899.91366303 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AB2B72EE779AB00A3F512 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj + + WindowString + 47 373 573 505 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj new file mode 100755 index 000000000..d63f58632 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj @@ -0,0 +1,490 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; }; + 3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; }; + 3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; }; + 8B4119B70749654200361ABE /* Dynamics3.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* Dynamics3.r */; }; + 8BA05A6B0720730100365D66 /* Dynamics3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; }; + 8BA05A6E0720730100365D66 /* Dynamics3Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* Dynamics3Version.h */; }; + 8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; }; + 8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; }; + 8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; }; + 8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; }; + 8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; }; + 8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; }; + 8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; }; + 8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; }; + 8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; }; + 8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; }; + 8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; }; + 8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; }; + 8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; }; + 8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; }; + 8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; }; + 8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; }; + 8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; }; + 8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; }; + 8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; }; + 8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; }; + 8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; }; + 8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; }; + 8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; }; + 8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; }; + 8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; }; + 8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; }; + 8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; }; + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; }; + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; }; + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; }; + 8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; }; + 8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; }; + 8BC6025C073B072D006C4272 /* Dynamics3.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* Dynamics3.h */; }; + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; }; + F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = ""; }; + 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = ""; }; + 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = ""; }; + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + 8BA05A660720730100365D66 /* Dynamics3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Dynamics3.cpp; sourceTree = ""; }; + 8BA05A670720730100365D66 /* Dynamics3.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = Dynamics3.exp; sourceTree = ""; }; + 8BA05A680720730100365D66 /* Dynamics3.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = Dynamics3.r; sourceTree = ""; }; + 8BA05A690720730100365D66 /* Dynamics3Version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3Version.h; sourceTree = ""; }; + 8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = ""; }; + 8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = ""; }; + 8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = ""; }; + 8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = ""; }; + 8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = ""; }; + 8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = ""; }; + 8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = ""; }; + 8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = ""; }; + 8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = ""; }; + 8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = ""; }; + 8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = ""; }; + 8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = ""; }; + 8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = ""; }; + 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = ""; }; + 8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = ""; }; + 8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = ""; }; + 8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = ""; }; + 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = ""; }; + 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = ""; }; + 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = ""; }; + 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = ""; }; + 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = ""; }; + 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = ""; }; + 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = ""; }; + 8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = ""; }; + 8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = ""; }; + 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = ""; }; + 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; + 8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; + 8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; + 8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = ""; }; + 8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = ""; }; + 8BC6025B073B072D006C4272 /* Dynamics3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3.h; sourceTree = ""; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3.component; sourceTree = BUILT_PRODUCTS_DIR; }; + F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; + F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */, + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */, + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Dynamics3 */ = { + isa = PBXGroup; + children = ( + 08FB77ADFE841716C02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + ); + name = Dynamics3; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */, + 8BA05B01072074F900365D66 /* CoreServices.framework */, + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */, + 8BA05AFA072074E100365D66 /* AudioUnit.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8BA05A56072072A900365D66 /* AU Source */, + 8BA05AEB0720742700365D66 /* PublicUtility */, + 8BA05A7D072073D200365D66 /* AUPublic */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */, + ); + name = Products; + sourceTree = ""; + }; + 8BA05A56072072A900365D66 /* AU Source */ = { + isa = PBXGroup; + children = ( + 8BC6025B073B072D006C4272 /* Dynamics3.h */, + 8BA05A660720730100365D66 /* Dynamics3.cpp */, + 8BA05A670720730100365D66 /* Dynamics3.exp */, + 8BA05A680720730100365D66 /* Dynamics3.r */, + 8BA05A690720730100365D66 /* Dynamics3Version.h */, + ); + name = "AU Source"; + sourceTree = ""; + }; + 8BA05A7D072073D200365D66 /* AUPublic */ = { + isa = PBXGroup; + children = ( + 8BA05A7E072073D200365D66 /* AUBase */, + 8BA05A99072073D200365D66 /* OtherBases */, + 8BA05AA6072073D200365D66 /* Utility */, + ); + name = AUPublic; + path = Extras/CoreAudio/AudioUnits/AUPublic; + sourceTree = SYSTEM_DEVELOPER_DIR; + }; + 8BA05A7E072073D200365D66 /* AUBase */ = { + isa = PBXGroup; + children = ( + 8BA05A7F072073D200365D66 /* AUBase.cpp */, + 8BA05A80072073D200365D66 /* AUBase.h */, + 8BA05A81072073D200365D66 /* AUDispatch.cpp */, + 8BA05A82072073D200365D66 /* AUDispatch.h */, + 8BA05A83072073D200365D66 /* AUInputElement.cpp */, + 8BA05A84072073D200365D66 /* AUInputElement.h */, + 8BA05A85072073D200365D66 /* AUOutputElement.cpp */, + 8BA05A86072073D200365D66 /* AUOutputElement.h */, + 8BA05A87072073D200365D66 /* AUResources.r */, + 8BA05A88072073D200365D66 /* AUScopeElement.cpp */, + 8BA05A89072073D200365D66 /* AUScopeElement.h */, + 8BA05A8A072073D200365D66 /* ComponentBase.cpp */, + 8BA05A8B072073D200365D66 /* ComponentBase.h */, + ); + path = AUBase; + sourceTree = ""; + }; + 8BA05A99072073D200365D66 /* OtherBases */ = { + isa = PBXGroup; + children = ( + 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */, + 8BA05A9B072073D200365D66 /* AUEffectBase.h */, + ); + path = OtherBases; + sourceTree = ""; + }; + 8BA05AA6072073D200365D66 /* Utility */ = { + isa = PBXGroup; + children = ( + F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */, + F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */, + 8BA05AA7072073D200365D66 /* AUBuffer.cpp */, + 8BA05AA8072073D200365D66 /* AUBuffer.h */, + 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */, + 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */, + 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */, + 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */, + 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */, + ); + path = Utility; + sourceTree = ""; + }; + 8BA05AEB0720742700365D66 /* PublicUtility */ = { + isa = PBXGroup; + children = ( + 8BA05B050720754400365D66 /* CAAUParameter.cpp */, + 8BA05B060720754400365D66 /* CAAUParameter.h */, + 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */, + 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */, + 8BA05AE10720742100365D66 /* CAMutex.cpp */, + 8BA05AE20720742100365D66 /* CAMutex.h */, + 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */, + 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */, + 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */, + 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */, + 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */, + ); + name = PublicUtility; + path = Extras/CoreAudio/PublicUtility; + sourceTree = SYSTEM_DEVELOPER_DIR; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05A6E0720730100365D66 /* Dynamics3Version.h in Headers */, + 8BA05AAF072073D300365D66 /* AUBase.h in Headers */, + 8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */, + 8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */, + 8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */, + 8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */, + 8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */, + 8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */, + 8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */, + 8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */, + 8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */, + 8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */, + 8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */, + 8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */, + 8BA05AE80720742100365D66 /* CAMutex.h in Headers */, + 8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */, + 8BA05B080720754400365D66 /* CAAUParameter.h in Headers */, + 8BC6025C073B072D006C4272 /* Dynamics3.h in Headers */, + 3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */, + 3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */, + F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 8D01CCCD0486CAD60068D4B7 /* Frameworks */, + 8D01CCCF0486CAD60068D4B7 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = Dynamics3; + productReference = 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Dynamics3 */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D01CCCF0486CAD60068D4B7 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B4119B70749654200361ABE /* Dynamics3.r in Rez */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05A6B0720730100365D66 /* Dynamics3.cpp in Sources */, + 8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */, + 8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */, + 8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */, + 8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */, + 8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */, + 8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */, + 8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */, + 8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */, + 8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */, + 8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */, + 8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */, + 8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */, + 8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */, + 3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */, + F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3E4BA244089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXPORTED_SYMBOLS_FILE = Dynamics3.exp; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_NAME = Dynamics3; + WRAPPER_EXTENSION = component; + }; + name = Debug; + }; + 3E4BA245089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + x86_64, + ); + EXPORTED_SYMBOLS_FILE = Dynamics3.exp; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.4; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_NAME = Dynamics3; + SDKROOT = macosx10.5; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = all; + WRAPPER_EXTENSION = component; + }; + name = Release; + }; + 3E4BA248089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = c99; + SDKROOT = macosx10.6; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + 3E4BA249089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = c99; + SDKROOT = macosx10.6; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA244089833B7007656EC /* Debug */, + 3E4BA245089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA248089833B7007656EC /* Debug */, + 3E4BA249089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacAU/Dynamics3/Dynamics3Version.h b/plugins/MacAU/Dynamics3/Dynamics3Version.h new file mode 100755 index 000000000..56e1fa237 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Dynamics3Version.h @@ -0,0 +1,58 @@ +/* +* File: Dynamics3Version.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#ifndef __Dynamics3Version_h__ +#define __Dynamics3Version_h__ + + +#ifdef DEBUG + #define kDynamics3Version 0xFFFFFFFF +#else + #define kDynamics3Version 0x00010000 +#endif + +//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~// +#define Dynamics3_COMP_MANF 'Dthr' +#define Dynamics3_COMP_SUBTYPE 'dyn3' +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + +#endif + diff --git a/plugins/MacAU/Dynamics3/English.lproj/InfoPlist.strings b/plugins/MacAU/Dynamics3/English.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..0bdb43f79837060b9189c2801724b12cdb140f7e GIT binary patch literal 382 zcmZ{g%@4sq5XIlwU$Jp?(AGyH#Gxugf{Vmmv}n*u>m&T}_;n=`K{h)x`{vEen|<6J zRb(_)s-+g%Db`JqLa;MFQx1|U!5jPvJL0t>uIgautRu} zru5(Ajk?^j`tTEr#mvrC2kZQ(n`y(ej4AUEMKh2Lb&1yRo*t^)KYfN&AK&VKRevio x=qt8ssjY@;M7}22;zx`;jsxmi+XM;79N4SSwMKVQ>l0_XSfwHP3%kBHeFEQ$Kb-&o literal 0 HcmV?d00001 diff --git a/plugins/MacAU/Dynamics3/Info.plist b/plugins/MacAU/Dynamics3/Info.plist new file mode 100755 index 000000000..12f0517b5 --- /dev/null +++ b/plugins/MacAU/Dynamics3/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.airwindows.audiounit.${PRODUCT_NAME:identifier} + CFBundleName + ${PROJECTNAMEASIDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + Dthr + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacAU/Dynamics3/StarterAU_Prefix.pch b/plugins/MacAU/Dynamics3/StarterAU_Prefix.pch new file mode 100755 index 000000000..c03b5f684 --- /dev/null +++ b/plugins/MacAU/Dynamics3/StarterAU_Prefix.pch @@ -0,0 +1,5 @@ +// +// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project. +// + +#include diff --git a/plugins/MacAU/Dynamics3/version.plist b/plugins/MacAU/Dynamics3/version.plist new file mode 100755 index 000000000..11edf8a1b --- /dev/null +++ b/plugins/MacAU/Dynamics3/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 3 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + ${EXECUTABLE_NAME} + SourceVersion + 590000 + + diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.cpp b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.cpp new file mode 100755 index 000000000..1a4662810 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.cpp @@ -0,0 +1,258 @@ +/* +* File: Dynamics3Mono.cpp +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +/*============================================================================= + Dynamics3Mono.cpp + +=============================================================================*/ +#include "Dynamics3Mono.h" + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +COMPONENT_ENTRY(Dynamics3Mono) + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3Mono +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Dynamics3Mono::Dynamics3Mono(AudioUnit component) + : AUEffectBase(component) +{ + CreateElements(); + Globals()->UseIndexedParameters(kNumberOfParameters); + SetParameter(kParam_A, kDefaultValue_ParamA ); + SetParameter(kParam_B, kDefaultValue_ParamB ); + SetParameter(kParam_C, kDefaultValue_ParamC ); + SetParameter(kParam_D, kDefaultValue_ParamD ); + +#if AU_DEBUG_DISPATCHER + mDebugDispatcher = new AUDebugDispatcher (this); +#endif + +} + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetParameterValueStrings +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings) +{ + + return kAudioUnitErr_InvalidProperty; +} + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetParameterInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo ) +{ + ComponentResult result = noErr; + + outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable + | kAudioUnitParameterFlag_IsReadable; + + if (inScope == kAudioUnitScope_Global) { + switch(inParameterID) + { + case kParam_A: + AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamA; + break; + case kParam_B: + AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamB; + break; + case kParam_C: + AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamC; + break; + case kParam_D: + AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamD; + break; + default: + result = kAudioUnitErr_InvalidParameter; + break; + } + } else { + result = kAudioUnitErr_InvalidParameter; + } + + + + return result; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetPropertyInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetPropertyInfo (AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable) +{ + return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable); +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetProperty +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetProperty( AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData ) +{ + return AUEffectBase::GetProperty (inID, inScope, inElement, outData); +} + +// Dynamics3Mono::Initialize +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::Initialize() +{ + ComponentResult result = AUEffectBase::Initialize(); + if (result == noErr) + Reset(kAudioUnitScope_Global, 0); + return result; +} + +#pragma mark ____Dynamics3MonoEffectKernel + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3MonoKernel::Reset() +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void Dynamics3Mono::Dynamics3MonoKernel::Reset() +{ + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3MonoKernel::Process +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void Dynamics3Mono::Dynamics3MonoKernel::Process( const Float32 *inSourceP, + Float32 *inDestP, + UInt32 inFramesToProcess, + UInt32 inNumChannels, + bool &ioSilence ) +{ + UInt32 nSampleFrames = inFramesToProcess; + const Float32 *sourceP = inSourceP; + Float32 *destP = inDestP; + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= GetSampleRate(); + + double bezThresh = pow(1.0-GetParameter( kParam_A ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_B ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_C ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_D ),4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (nSampleFrames-- > 0) { + double inputSample = *sourceP; + if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; + + if (fabs(inputSample) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSample *= (bezThresh+1.0); + } + + double ctrl = fabs(inputSample); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) inputSample *= 1.0-(fmin(CBA*bezThresh,1.0)); + + //begin 32 bit floating point dither + int expon; frexpf((float)inputSample, &expon); + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + inputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit floating point dither + + *destP = inputSample; + + sourceP += inNumChannels; destP += inNumChannels; + } +} + diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.exp b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.exp new file mode 100755 index 000000000..9e66a20a0 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.exp @@ -0,0 +1 @@ +_Dynamics3MonoEntry diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.h b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.h new file mode 100755 index 000000000..dad4af3de --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.h @@ -0,0 +1,156 @@ +/* +* File: Dynamics3Mono.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include "AUEffectBase.h" +#include "Dynamics3MonoVersion.h" + +#if AU_DEBUG_DISPATCHER + #include "AUDebugDispatcher.h" +#endif + + +#ifndef __Dynamics3Mono_h__ +#define __Dynamics3Mono_h__ + + +#pragma mark ____Dynamics3Mono Parameters + +// parameters +static const float kDefaultValue_ParamA = 1.0; +static const float kDefaultValue_ParamB = 0.5; +static const float kDefaultValue_ParamC = 0.5; +static const float kDefaultValue_ParamD = 0.0; + +static CFStringRef kParameterAName = CFSTR("Thresh"); +static CFStringRef kParameterBName = CFSTR("Attack"); +static CFStringRef kParameterCName = CFSTR("Release"); +static CFStringRef kParameterDName = CFSTR("Gate"); + +enum { + kParam_A =0, + kParam_B =1, + kParam_C =2, + kParam_D =3, + //Add your parameters here... + kNumberOfParameters=4 +}; + +#pragma mark ____Dynamics3Mono +class Dynamics3Mono : public AUEffectBase +{ +public: + Dynamics3Mono(AudioUnit component); +#if AU_DEBUG_DISPATCHER + virtual ~Dynamics3Mono () { delete mDebugDispatcher; } +#endif + + virtual AUKernelBase * NewKernel() { return new Dynamics3MonoKernel(this); } + + virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings); + + virtual ComponentResult GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo); + + virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable ); + + virtual ComponentResult GetProperty(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData); + + virtual ComponentResult Initialize(); + virtual bool SupportsTail () { return true; } + virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples + virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples + + /*! @method Version */ + virtual ComponentResult Version() { return kDynamics3MonoVersion; } + + + +protected: + class Dynamics3MonoKernel : public AUKernelBase // most of the real work happens here + { +public: + Dynamics3MonoKernel(AUEffectBase *inAudioUnit ) + : AUKernelBase(inAudioUnit) + { + } + + // *Required* overides for the process method for this effect + // processes one channel of interleaved samples + virtual void Process( const Float32 *inSourceP, + Float32 *inDestP, + UInt32 inFramesToProcess, + UInt32 inNumChannels, + bool &ioSilence); + + virtual void Reset(); + + private: + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpd; + }; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +#endif \ No newline at end of file diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.r b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.r new file mode 100755 index 000000000..25b0ce452 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.r @@ -0,0 +1,61 @@ +/* +* File: Dynamics3Mono.r +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include + +#include "Dynamics3MonoVersion.h" + +// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description +#define kAudioUnitResID_Dynamics3Mono 1000 + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dynamics3Mono~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#define RES_ID kAudioUnitResID_Dynamics3Mono +#define COMP_TYPE kAudioUnitType_Effect +#define COMP_SUBTYPE Dynamics3Mono_COMP_SUBTYPE +#define COMP_MANUF Dynamics3Mono_COMP_MANF + +#define VERSION kDynamics3MonoVersion +#define NAME "Airwindows: Dynamics3Mono" +#define DESCRIPTION "Dynamics3Mono AU" +#define ENTRY_POINT "Dynamics3MonoEntry" + +#include "AUResources.r" \ No newline at end of file diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 new file mode 100755 index 000000000..f301be9a2 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 @@ -0,0 +1,1358 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 8BD3CCBC148831C90062E48C + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + build + debugger-enable-breakpoints + get-info + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05AEB0720742700365D66 + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 20 + 19 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 463}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {580, 269}} + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 269pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 274}, {580, 189}} + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + XCDetailModule + Proportion + 189pt + + + Proportion + 580pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 8B563EC9161B5E170067FE32 + 1CE0B1FE06471DED0097A5F4 + 8B563ECA161B5E170067FE32 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 8BD3CCBD148831C90062E48C + /Developer/Library/Xcode/Project Templates/System Plug-in/Audio Unit Effect/Audio Unit Effect/StarterAU.xcodeproj + + WindowString + 203 321 788 504 0 0 1440 878 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 218}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 223}, {500, 236}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 459pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 8BD3CCBD148831C90062E48C + 8B563ECB161B5E170067FE32 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 668 222 500 500 0 0 1440 878 + WindowToolGUID + 8BD3CCBD148831C90062E48C + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..d88658852 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,137 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */; + codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 128, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 252, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786890841; + PBXWorkspaceStateSaveDate = 786890841; + }; + perUserProjectItems = { + 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */ = 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */; + 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */ = 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */; + 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */ = 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */; + }; + sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; + userBuildSettings = { + }; + }; + 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = /Users/christopherjohnson/Desktop/Dynamics3Mono/Info.plist; + rLen = 0; + rLoc = 9223372036854775808; + }; + 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; + name = "Dynamics3Mono.h: 146"; + rLen = 0; + rLoc = 5621; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; + name = "Dynamics3Mono.h: 146"; + rLen = 0; + rLoc = 5621; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {894, 4824}}"; + sepNavSelRange = "{10055, 138}"; + sepNavVisRange = "{9517, 1479}"; + sepNavWindowFrame = "{{550, 45}, {890, 833}}"; + }; + }; + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; + sepNavSelRange = "{2935, 0}"; + sepNavVisRange = "{1372, 1626}"; + sepNavWindowFrame = "{{84, 39}, {828, 771}}"; + }; + }; + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {318, 2844}}"; + sepNavSelRange = "{5621, 0}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{612, 86}, {828, 771}}"; + }; + }; + 8BD3CCB8148830B20062E48C /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8BD3CCB9148830B20062E48C /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..0142df849 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1507 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8BD7274F1D46E5A5000176F0 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 841 + 841 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 288 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A56072072A900365D66 + 089C167CFE841241C02AAC07 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 4 + 2 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {288, 410}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {305, 428}} + GroupTreeTableConfiguration + + MainColumn + 288 + + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 305pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8BD7274A1D46E5A5000176F0 + PBXProjectModuleLabel + Dynamics3Mono.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8BD7274B1D46E5A5000176F0 + PBXProjectModuleLabel + Dynamics3Mono.h + _historyCapacity + 0 + bookmark + 8B5AAF4A2EE700FF00A3F512 + history + + 8B5AAF022EE6F6D100A3F512 + 8B5AAF2B2EE6FA8800A3F512 + + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {367, 0}} + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + Proportion + 423pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {367, 396}} + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {367, 365}} + + Module + PBXBuildResultsModule + + + + + Proportion + 367pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AAF4B2EE700FF00A3F512 + 1CA23ED40692098700951B8B + 8B5AAF4C2EE700FF00A3F512 + 8BD7274A1D46E5A5000176F0 + 8B5AAF4D2EE700FF00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0pt + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 214}} + {{395, 0}, {415, 214}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 214}} + {{0, 214}, {810, 227}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 5}, {810, 441}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 185 + + Frame + {{395, 0}, {415, 214}} + + + Module + PBXDebugSessionModule + Proportion + 441pt + + + Name + Debug + ServiceClasses + + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + PBXDebugProcessAndThreadModule + PBXDebugProcessViewModule + PBXDebugThreadViewModule + PBXDebugStackFrameViewModule + PBXNavigatorGroup + + TableOfContents + + 8BD727EC1D46ECF1000176F0 + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 8BD727ED1D46ECF1000176F0 + 8BD727EE1D46ECF1000176F0 + 8BD727EF1D46ECF1000176F0 + 8BD727F01D46ECF1000176F0 + 8BD727E71D46ECD9000176F0 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786891007.99247503 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AAF4E2EE700FF00A3F512 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj + + WindowString + 763 233 677 469 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj new file mode 100755 index 000000000..f56faf91e --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj @@ -0,0 +1,490 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; }; + 3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; }; + 3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; }; + 8B4119B70749654200361ABE /* Dynamics3Mono.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* Dynamics3Mono.r */; }; + 8BA05A6B0720730100365D66 /* Dynamics3Mono.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */; }; + 8BA05A6E0720730100365D66 /* Dynamics3MonoVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */; }; + 8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; }; + 8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; }; + 8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; }; + 8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; }; + 8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; }; + 8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; }; + 8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; }; + 8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; }; + 8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; }; + 8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; }; + 8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; }; + 8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; }; + 8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; }; + 8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; }; + 8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; }; + 8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; }; + 8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; }; + 8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; }; + 8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; }; + 8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; }; + 8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; }; + 8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; }; + 8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; }; + 8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; }; + 8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; }; + 8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; }; + 8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; }; + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; }; + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; }; + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; }; + 8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; }; + 8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; }; + 8BC6025C073B072D006C4272 /* Dynamics3Mono.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; }; + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; }; + F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = ""; }; + 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = ""; }; + 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = ""; }; + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Dynamics3Mono.cpp; sourceTree = ""; }; + 8BA05A670720730100365D66 /* Dynamics3Mono.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = Dynamics3Mono.exp; sourceTree = ""; }; + 8BA05A680720730100365D66 /* Dynamics3Mono.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = Dynamics3Mono.r; sourceTree = ""; }; + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3MonoVersion.h; sourceTree = ""; }; + 8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = ""; }; + 8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = ""; }; + 8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = ""; }; + 8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = ""; }; + 8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = ""; }; + 8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = ""; }; + 8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = ""; }; + 8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = ""; }; + 8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = ""; }; + 8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = ""; }; + 8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = ""; }; + 8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = ""; }; + 8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = ""; }; + 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = ""; }; + 8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = ""; }; + 8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = ""; }; + 8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = ""; }; + 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = ""; }; + 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = ""; }; + 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = ""; }; + 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = ""; }; + 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = ""; }; + 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = ""; }; + 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = ""; }; + 8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = ""; }; + 8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = ""; }; + 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = ""; }; + 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; + 8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; + 8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; + 8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = ""; }; + 8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = ""; }; + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3Mono.h; sourceTree = ""; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3Mono.component; sourceTree = BUILT_PRODUCTS_DIR; }; + F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; + F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */, + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */, + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Dynamics3Mono */ = { + isa = PBXGroup; + children = ( + 08FB77ADFE841716C02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + ); + name = Dynamics3Mono; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */, + 8BA05B01072074F900365D66 /* CoreServices.framework */, + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */, + 8BA05AFA072074E100365D66 /* AudioUnit.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8BA05A56072072A900365D66 /* AU Source */, + 8BA05AEB0720742700365D66 /* PublicUtility */, + 8BA05A7D072073D200365D66 /* AUPublic */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */, + ); + name = Products; + sourceTree = ""; + }; + 8BA05A56072072A900365D66 /* AU Source */ = { + isa = PBXGroup; + children = ( + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */, + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */, + 8BA05A670720730100365D66 /* Dynamics3Mono.exp */, + 8BA05A680720730100365D66 /* Dynamics3Mono.r */, + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */, + ); + name = "AU Source"; + sourceTree = ""; + }; + 8BA05A7D072073D200365D66 /* AUPublic */ = { + isa = PBXGroup; + children = ( + 8BA05A7E072073D200365D66 /* AUBase */, + 8BA05A99072073D200365D66 /* OtherBases */, + 8BA05AA6072073D200365D66 /* Utility */, + ); + name = AUPublic; + path = Extras/CoreAudio/AudioUnits/AUPublic; + sourceTree = SYSTEM_DEVELOPER_DIR; + }; + 8BA05A7E072073D200365D66 /* AUBase */ = { + isa = PBXGroup; + children = ( + 8BA05A7F072073D200365D66 /* AUBase.cpp */, + 8BA05A80072073D200365D66 /* AUBase.h */, + 8BA05A81072073D200365D66 /* AUDispatch.cpp */, + 8BA05A82072073D200365D66 /* AUDispatch.h */, + 8BA05A83072073D200365D66 /* AUInputElement.cpp */, + 8BA05A84072073D200365D66 /* AUInputElement.h */, + 8BA05A85072073D200365D66 /* AUOutputElement.cpp */, + 8BA05A86072073D200365D66 /* AUOutputElement.h */, + 8BA05A87072073D200365D66 /* AUResources.r */, + 8BA05A88072073D200365D66 /* AUScopeElement.cpp */, + 8BA05A89072073D200365D66 /* AUScopeElement.h */, + 8BA05A8A072073D200365D66 /* ComponentBase.cpp */, + 8BA05A8B072073D200365D66 /* ComponentBase.h */, + ); + path = AUBase; + sourceTree = ""; + }; + 8BA05A99072073D200365D66 /* OtherBases */ = { + isa = PBXGroup; + children = ( + 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */, + 8BA05A9B072073D200365D66 /* AUEffectBase.h */, + ); + path = OtherBases; + sourceTree = ""; + }; + 8BA05AA6072073D200365D66 /* Utility */ = { + isa = PBXGroup; + children = ( + F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */, + F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */, + 8BA05AA7072073D200365D66 /* AUBuffer.cpp */, + 8BA05AA8072073D200365D66 /* AUBuffer.h */, + 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */, + 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */, + 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */, + 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */, + 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */, + ); + path = Utility; + sourceTree = ""; + }; + 8BA05AEB0720742700365D66 /* PublicUtility */ = { + isa = PBXGroup; + children = ( + 8BA05B050720754400365D66 /* CAAUParameter.cpp */, + 8BA05B060720754400365D66 /* CAAUParameter.h */, + 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */, + 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */, + 8BA05AE10720742100365D66 /* CAMutex.cpp */, + 8BA05AE20720742100365D66 /* CAMutex.h */, + 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */, + 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */, + 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */, + 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */, + 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */, + ); + name = PublicUtility; + path = Extras/CoreAudio/PublicUtility; + sourceTree = SYSTEM_DEVELOPER_DIR; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05A6E0720730100365D66 /* Dynamics3MonoVersion.h in Headers */, + 8BA05AAF072073D300365D66 /* AUBase.h in Headers */, + 8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */, + 8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */, + 8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */, + 8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */, + 8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */, + 8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */, + 8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */, + 8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */, + 8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */, + 8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */, + 8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */, + 8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */, + 8BA05AE80720742100365D66 /* CAMutex.h in Headers */, + 8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */, + 8BA05B080720754400365D66 /* CAAUParameter.h in Headers */, + 8BC6025C073B072D006C4272 /* Dynamics3Mono.h in Headers */, + 3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */, + 3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */, + F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3Mono" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 8D01CCCD0486CAD60068D4B7 /* Frameworks */, + 8D01CCCF0486CAD60068D4B7 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3Mono; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = Dynamics3Mono; + productReference = 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3Mono" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Dynamics3Mono */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D01CCCF0486CAD60068D4B7 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B4119B70749654200361ABE /* Dynamics3Mono.r in Rez */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05A6B0720730100365D66 /* Dynamics3Mono.cpp in Sources */, + 8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */, + 8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */, + 8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */, + 8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */, + 8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */, + 8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */, + 8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */, + 8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */, + 8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */, + 8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */, + 8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */, + 8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */, + 8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */, + 3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */, + F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3E4BA244089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXPORTED_SYMBOLS_FILE = Dynamics3Mono.exp; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_NAME = Dynamics3Mono; + WRAPPER_EXTENSION = component; + }; + name = Debug; + }; + 3E4BA245089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + x86_64, + ); + EXPORTED_SYMBOLS_FILE = Dynamics3Mono.exp; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.4; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\""; + PRODUCT_NAME = Dynamics3Mono; + SDKROOT = macosx10.5; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = all; + WRAPPER_EXTENSION = component; + }; + name = Release; + }; + 3E4BA248089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = c99; + SDKROOT = macosx10.6; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + 3E4BA249089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = c99; + SDKROOT = macosx10.6; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3Mono" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA244089833B7007656EC /* Debug */, + 3E4BA245089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3Mono" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA248089833B7007656EC /* Debug */, + 3E4BA249089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacAU/Dynamics3Mono/Dynamics3MonoVersion.h b/plugins/MacAU/Dynamics3Mono/Dynamics3MonoVersion.h new file mode 100755 index 000000000..a40f9cfe0 --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/Dynamics3MonoVersion.h @@ -0,0 +1,58 @@ +/* +* File: Dynamics3MonoVersion.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#ifndef __Dynamics3MonoVersion_h__ +#define __Dynamics3MonoVersion_h__ + + +#ifdef DEBUG + #define kDynamics3MonoVersion 0xFFFFFFFF +#else + #define kDynamics3MonoVersion 0x00010000 +#endif + +//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~// +#define Dynamics3Mono_COMP_MANF 'Dthr' +#define Dynamics3Mono_COMP_SUBTYPE 'dym3' +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + +#endif + diff --git a/plugins/MacAU/Dynamics3Mono/English.lproj/InfoPlist.strings b/plugins/MacAU/Dynamics3Mono/English.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..094b7c8306b879ec8047517ce95ebcc1ccf7df04 GIT binary patch literal 398 zcmZ{gI}5@<5QL}pR~(iW#wUnk5fw#Hn}EHTs6kC6@qzw$^}7=Sf^yvMWp;LVCa + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.airwindows.audiounit.${PRODUCT_NAME:identifier} + CFBundleName + ${PROJECTNAMEASIDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + DthX + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacAU/Dynamics3Mono/version.plist b/plugins/MacAU/Dynamics3Mono/version.plist new file mode 100755 index 000000000..11edf8a1b --- /dev/null +++ b/plugins/MacAU/Dynamics3Mono/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 3 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + ${EXECUTABLE_NAME} + SourceVersion + 590000 + + diff --git a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.cpp b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.cpp index 0053bceea..18404c45b 100755 --- a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.cpp +++ b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.cpp @@ -312,14 +312,32 @@ void PunchyDeluxe::PunchyDeluxeKernel::Process( const Float32 *inSourceP, } inputSample += band; inputSample *= drive; - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { inputSample *= pad; } - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function //begin 32 bit floating point dither int expon; frexpf((float)inputSample, &expon); diff --git a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser index 038325262..cb7a078ac 100755 --- a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser @@ -49,15 +49,15 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 772137586; - PBXWorkspaceStateSaveDate = 772137586; + PBXPerProjectTemplateStateSaveDate = 786871716; + PBXWorkspaceStateSaveDate = 786871716; }; perUserProjectItems = { 8B65E1DF2E05BCBE00CB683A /* PlistBookmark */ = 8B65E1DF2E05BCBE00CB683A /* PlistBookmark */; 8B670B492E05E0D800AB1898 /* PBXTextBookmark */ = 8B670B492E05E0D800AB1898 /* PBXTextBookmark */; 8B670B4A2E05E0D800AB1898 /* PBXTextBookmark */ = 8B670B4A2E05E0D800AB1898 /* PBXTextBookmark */; - 8B670B8D2E05E3F800AB1898 /* PBXTextBookmark */ = 8B670B8D2E05E3F800AB1898 /* PBXTextBookmark */; - 8B670B8E2E05E3F800AB1898 /* PBXTextBookmark */ = 8B670B8E2E05E3F800AB1898 /* PBXTextBookmark */; + 8BE3CAB82EE6B5B7004F72BD /* PBXTextBookmark */ = 8BE3CAB82EE6B5B7004F72BD /* PBXTextBookmark */; + 8BE3CABD2EE6B5DA004F72BD /* PBXTextBookmark */ = 8BE3CABD2EE6B5DA004F72BD /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -90,44 +90,24 @@ fRef = 8BA05A660720730100365D66 /* PunchyDeluxe.cpp */; name = "PunchyDeluxe.cpp: 322"; rLen = 0; - rLoc = 14357; + rLoc = 14848; rType = 0; vrLen = 207; vrLoc = 14454; }; - 8B670B8D2E05E3F800AB1898 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A690720730100365D66 /* PunchyDeluxeVersion.h */; - name = "PunchyDeluxeVersion.h: 54"; - rLen = 0; - rLoc = 2925; - rType = 0; - vrLen = 250; - vrLoc = 2738; - }; - 8B670B8E2E05E3F800AB1898 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A690720730100365D66 /* PunchyDeluxeVersion.h */; - name = "PunchyDeluxeVersion.h: 54"; - rLen = 0; - rLoc = 2925; - rType = 0; - vrLen = 250; - vrLoc = 2738; - }; 8BA05A660720730100365D66 /* PunchyDeluxe.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {920, 6516}}"; - sepNavSelRange = "{14417, 0}"; - sepNavVisRange = "{10831, 1456}"; - sepNavWindowFrame = "{{777, 58}, {967, 804}}"; + sepNavIntBoundsRect = "{{0, 0}, {920, 6714}}"; + sepNavSelRange = "{15388, 0}"; + sepNavVisRange = "{13978, 1640}"; + sepNavWindowFrame = "{{473, 58}, {967, 804}}"; }; }; 8BA05A690720730100365D66 /* PunchyDeluxeVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1038, 1206}}"; + sepNavIntBoundsRect = "{{0, 0}, {1038, 1224}}"; sepNavSelRange = "{2925, 0}"; - sepNavVisRange = "{2738, 250}"; + sepNavVisRange = "{2744, 244}"; sepNavWindowFrame = "{{15, 69}, {967, 804}}"; }; }; @@ -153,6 +133,26 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8BE3CAB82EE6B5B7004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A690720730100365D66 /* PunchyDeluxeVersion.h */; + name = "PunchyDeluxeVersion.h: 54"; + rLen = 0; + rLoc = 2925; + rType = 0; + vrLen = 244; + vrLoc = 2744; + }; + 8BE3CABD2EE6B5DA004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A690720730100365D66 /* PunchyDeluxeVersion.h */; + name = "PunchyDeluxeVersion.h: 54"; + rLen = 0; + rLoc = 2925; + rType = 0; + vrLen = 244; + vrLoc = 2744; + }; 8D01CCC60486CAD60068D4B7 /* PunchyDeluxe */ = { activeExec = 0; }; diff --git a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 index b3cdd8e45..fc2796010 100755 --- a/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -326,7 +324,7 @@ 288 RubberWindowFrame - 852 175 841 654 0 0 1440 878 + 599 175 841 654 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,13 +352,13 @@ _historyCapacity 0 bookmark - 8B670B8E2E05E3F800AB1898 + 8BE3CABD2EE6B5DA004F72BD history 8B65E1DF2E05BCBE00CB683A 8B670B492E05E0D800AB1898 8B670B4A2E05E0D800AB1898 - 8B670B8D2E05E3F800AB1898 + 8BE3CAB82EE6B5B7004F72BD SplitCount @@ -374,18 +372,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 202}} + {{0, 0}, {531, 188}} RubberWindowFrame - 852 175 841 654 0 0 1440 878 + 599 175 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 202pt + 188pt Proportion - 406pt + 420pt Tabs @@ -399,9 +397,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 379}} - RubberWindowFrame - 852 175 841 654 0 0 1440 878 + {{10, 27}, {531, 393}} Module XCDetailModule @@ -455,7 +451,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 339}} + {{10, 27}, {531, 393}} + RubberWindowFrame + 599 175 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -483,11 +481,11 @@ TableOfContents - 8B670B8F2E05E3F800AB1898 + 8BE3CABE2EE6B5DA004F72BD 1CA23ED40692098700951B8B - 8B670B902E05E3F800AB1898 + 8BE3CABF2EE6B5DA004F72BD 8BD7274A1D46E5A5000176F0 - 8B670B912E05E3F800AB1898 + 8BE3CAC02EE6B5DA004F72BD 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -660,7 +658,7 @@ StatusbarIsVisible TimeStamp - 772137976.13086605 + 786871770.92796195 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -677,11 +675,11 @@ 5 WindowOrderList - 8B670B922E05E3F800AB1898 - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/PunchyDeluxe/PunchyDeluxe.xcodeproj + 8BE3CAC12EE6B5DA004F72BD + /Users/christopherjohnson/Desktop/PunchyDeluxe/PunchyDeluxe.xcodeproj WindowString - 852 175 841 654 0 0 1440 878 + 599 175 841 654 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/PunchyGuitar/PunchyGuitar.cpp b/plugins/MacAU/PunchyGuitar/PunchyGuitar.cpp index 6f9d1020f..9b0e66546 100755 --- a/plugins/MacAU/PunchyGuitar/PunchyGuitar.cpp +++ b/plugins/MacAU/PunchyGuitar/PunchyGuitar.cpp @@ -333,7 +333,16 @@ void PunchyGuitar::PunchyGuitarKernel::Process( const Float32 *inSourceP, } inputSample += (band*angG[9]); inputSample *= drive; - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gateroller < 1.0) diff --git a/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser index 63cb9b0f5..6334725e7 100755 --- a/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser @@ -49,18 +49,31 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 769342354; - PBXWorkspaceStateSaveDate = 769342354; + PBXPerProjectTemplateStateSaveDate = 786870753; + PBXWorkspaceStateSaveDate = 786870753; }; perUserProjectItems = { + 8B33D5B72DF3AC0A0044A4FF /* PBXTextBookmark */ = 8B33D5B72DF3AC0A0044A4FF /* PBXTextBookmark */; 8B8448722DDB4044001CED69 /* PlistBookmark */ = 8B8448722DDB4044001CED69 /* PlistBookmark */; - 8B8448732DDB4044001CED69 /* PBXTextBookmark */ = 8B8448732DDB4044001CED69 /* PBXTextBookmark */; - 8B8448742DDB4044001CED69 /* PBXTextBookmark */ = 8B8448742DDB4044001CED69 /* PBXTextBookmark */; + 8BE3CA8E2EE6B21B004F72BD /* PBXBookmark */ = 8BE3CA8E2EE6B21B004F72BD /* PBXBookmark */; + 8BE3CA9D2EE6B542004F72BD /* PBXTextBookmark */ = 8BE3CA9D2EE6B542004F72BD /* PBXTextBookmark */; + 8BE3CAA02EE6B558004F72BD /* PBXTextBookmark */ = 8BE3CAA02EE6B558004F72BD /* PBXTextBookmark */; + 8BE3CAA62EE6B558004F72BD /* PBXTextBookmark */ = 8BE3CAA62EE6B558004F72BD /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B33D5B72DF3AC0A0044A4FF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A690720730100365D66 /* PunchyGuitarVersion.h */; + name = "PunchyGuitarVersion.h: 54"; + rLen = 0; + rLoc = 2927; + rType = 0; + vrLen = 250; + vrLoc = 2739; + }; 8B8448722DDB4044001CED69 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -71,50 +84,30 @@ ); name = /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/PunchyGuitar/Info.plist; rLen = 0; - rLoc = 9223372036854775807; - }; - 8B8448732DDB4044001CED69 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BC6025B073B072D006C4272 /* PunchyGuitar.h */; - name = "PunchyGuitar.h: 66"; - rLen = 0; - rLoc = 3313; - rType = 0; - vrLen = 498; - vrLoc = 3080; - }; - 8B8448742DDB4044001CED69 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BC6025B073B072D006C4272 /* PunchyGuitar.h */; - name = "PunchyGuitar.h: 66"; - rLen = 0; - rLoc = 3313; - rType = 0; - vrLen = 498; - vrLoc = 3080; + rLoc = 9223372036854775808; }; 8BA05A660720730100365D66 /* PunchyGuitar.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1098, 6750}}"; - sepNavSelRange = "{14699, 54}"; - sepNavVisRange = "{13541, 1270}"; - sepNavWindowFrame = "{{640, 41}, {1145, 837}}"; + sepNavIntBoundsRect = "{{0, 0}, {1050, 7326}}"; + sepNavSelRange = "{15245, 0}"; + sepNavVisRange = "{13640, 1612}"; + sepNavWindowFrame = "{{32, 38}, {1097, 840}}"; }; }; 8BA05A690720730100365D66 /* PunchyGuitarVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1092, 1062}}"; + sepNavIntBoundsRect = "{{0, 0}, {1056, 1206}}"; sepNavSelRange = "{2927, 0}"; - sepNavVisRange = "{1658, 1332}"; + sepNavVisRange = "{2739, 250}"; sepNavWindowFrame = "{{15, 188}, {1139, 685}}"; }; }; 8BC6025B073B072D006C4272 /* PunchyGuitar.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1029, 3294}}"; + sepNavIntBoundsRect = "{{0, 0}, {498, 3240}}"; sepNavSelRange = "{3313, 0}"; - sepNavVisRange = "{3080, 498}"; - sepNavWindowFrame = "{{688, 77}, {749, 800}}"; + sepNavVisRange = "{3127, 400}"; + sepNavWindowFrame = "{{17, 53}, {749, 800}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { @@ -131,6 +124,40 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8BE3CA8E2EE6B21B004F72BD /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 8BA05A660720730100365D66 /* PunchyGuitar.cpp */; + }; + 8BE3CA9D2EE6B542004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* PunchyGuitar.h */; + name = "PunchyGuitar.h: 66"; + rLen = 0; + rLoc = 3313; + rType = 0; + vrLen = 400; + vrLoc = 3127; + }; + 8BE3CAA02EE6B558004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* PunchyGuitar.h */; + name = "PunchyGuitar.h: 66"; + rLen = 0; + rLoc = 3313; + rType = 0; + vrLen = 400; + vrLoc = 3127; + }; + 8BE3CAA62EE6B558004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* PunchyGuitar.cpp */; + name = "PunchyGuitar.cpp: 346"; + rLen = 0; + rLoc = 15245; + rType = 0; + vrLen = 1612; + vrLoc = 13640; + }; 8D01CCC60486CAD60068D4B7 /* PunchyGuitar */ = { activeExec = 0; }; diff --git a/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 index 10db711bc..42ebccffe 100755 --- a/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 @@ -222,7 +222,48 @@ OpenEditors - + + + Content + + PBXProjectModuleGUID + 8BE3CAA42EE6B558004F72BD + PBXProjectModuleLabel + PunchyGuitar.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8BE3CAA52EE6B558004F72BD + PBXProjectModuleLabel + PunchyGuitar.cpp + _historyCapacity + 0 + bookmark + 8BE3CAA62EE6B558004F72BD + history + + 8BE3CA8E2EE6B21B004F72BD + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1097, 743}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 32 94 1097 784 0 0 1440 878 + + + PerspectiveWidths 841 @@ -256,8 +297,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -302,7 +341,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 4 + 3 2 1 0 @@ -326,7 +365,7 @@ 288 RubberWindowFrame - 574 182 841 654 0 0 1440 878 + 44 208 841 654 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,11 +393,12 @@ _historyCapacity 0 bookmark - 8B8448742DDB4044001CED69 + 8BE3CAA02EE6B558004F72BD history 8B8448722DDB4044001CED69 - 8B8448732DDB4044001CED69 + 8B33D5B72DF3AC0A0044A4FF + 8BE3CA9D2EE6B542004F72BD SplitCount @@ -372,18 +412,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 216}} + {{0, 0}, {531, 188}} RubberWindowFrame - 574 182 841 654 0 0 1440 878 + 44 208 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 216pt + 188pt Proportion - 392pt + 420pt Tabs @@ -397,9 +437,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 365}} - RubberWindowFrame - 574 182 841 654 0 0 1440 878 + {{10, 27}, {531, 393}} Module XCDetailModule @@ -453,7 +491,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 339}} + {{10, 27}, {531, 393}} + RubberWindowFrame + 44 208 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -481,11 +521,11 @@ TableOfContents - 8B8448752DDB4044001CED69 + 8BE3CAA12EE6B558004F72BD 1CA23ED40692098700951B8B - 8B8448762DDB4044001CED69 + 8BE3CAA22EE6B558004F72BD 8BD7274A1D46E5A5000176F0 - 8B8448772DDB4044001CED69 + 8BE3CAA32EE6B558004F72BD 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -658,7 +698,7 @@ StatusbarIsVisible TimeStamp - 769343556.30281198 + 786871640.10477197 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -675,11 +715,11 @@ 5 WindowOrderList - 8B8448782DDB4044001CED69 - /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/PunchyGuitar/PunchyGuitar.xcodeproj + 8BE3CAA42EE6B558004F72BD + /Users/christopherjohnson/Desktop/PunchyGuitar/PunchyGuitar.xcodeproj WindowString - 574 182 841 654 0 0 1440 878 + 44 208 841 654 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.cpp b/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.cpp index 3ee86530c..8396654c2 100755 --- a/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.cpp +++ b/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.cpp @@ -250,7 +250,7 @@ ComponentResult ConsoleHBuss::Reset(AudioUnitScope inScope, AudioUnitElement in //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -303,35 +303,45 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; @@ -522,101 +532,79 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -679,47 +667,39 @@ OSStatus ConsoleHBuss::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); diff --git a/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.h b/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.h index f792f878f..d4fb96ddc 100755 --- a/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.h +++ b/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.h @@ -161,25 +161,16 @@ public: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleHBuss/ConsoleHBuss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index e9c4bd3ac441c1089c88f00c8d34bdc638ed30e7..0367acea0c5ea83cb7e5f734f2ebd7041dd3c95e 100644 GIT binary patch delta 6288 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 YrZ!4V2;be5hM#Ov_(`M>pQ+ma0jQmw8~^|S delta 9665 zcmch6d3;kv*Z-WEo3v??CN0pk6w;KYX_GX~N}47qYuUHbjZ&6U+E5Bzpe?IF=Ay{H zNCX5$Y0D0>%O>Imir~VcqHHRnAd7;CAcDS=h9Z4=o_~Iy-)sK3_vXyGbIv`>cg~qP zJ7(nqSX2nlyf9qr?Th-MEHn@eK}Dz-jYMUr28~1G(IhklO+(M28E7tg0WC&L&<3;- zZ9<#T>u3wwingKc=neD<`V@VJj-wOkBszsYM_-^X(P?xReS^M7m(dk;4gG>{qr2!H zdH@IjFbE+8!l4;NLn~+vN-xBK8WKPcX0U)2dO%O;1-+pU^o4$q0sSEpvLG9BAQuKe z9t?zh7y%_P5=vndjD|8OhiaG#)4&T9c$g0JU_LB>#jq6C!a7(F8(<@Bg3YiMw!u!= z18>2*a0rgT88{2)zfHU zYpld=a2(cR9ZtqZY{PDxhTGwuxEJn?`{2H~AI`zKI3EwfgYj@&gh${K%;V|!S^ONH zfuF}S@hm(W&%tx?Jp2M)=*3I$QoIbmgkQm%@#}aC-io*3?RW>?kKe=x@H_Z8K8Mfa z@9<@O1z*QE@GX1?|AFu0zX&FTC`crUA}vWYX+>HSC5a(%#6{dBjkF`}Ne9xAbRwNe zI_W}skUpe8$sxI9AQ?gmiHDSuQN%l%RFY~kkxU|!$#n88d5+8=&yzW1E?G!?WEojS z){#wQE7?Z2lQ+mm@#PswNGI5|PSAUDX*lJ;%-9=5Q}^OSq-nGVUd=j;rU^aqGD)+)nN-?jZLz z_Yrs0_bP5j7SdSXH+WvNHgo{Zr^U34&Y^SZe7b-tc1|NPAc&-`7)u>D&)W-`YEe(x zycYGQEvRB}=gNxe$}&&)PUEVpPofMYL;X?afWBGDHKpaAxQ-tdIHu|6cxc2)l#Oyw zE*g-pE-EXmuC6F7_v8g0J=M8=v(gJ|Jaue5FRyP_zu}`iMKysp^3k9Id9%J*ea6)k z4lnZzOfM~}DXpw1teRAh^3hrM1vw%j`qC(p8DLrM#gGQi| zflSZpnyS)@5*qD$N08amuVX11RUnr=mYCHrUeCy*8WP6{L19(7-4?Ll z1eDoew{xY#_W14Qx9Q|Zv}ukb(;IC$7)`D78=z4YFXH{*Ole##noiYJQQ&(h?C5wN z&GM6H()e05nVI1acNCuRe`)= z!1rQOGoL=V01SS%W({mvo|+oww?~Y=S;1z|_(#3jg;gb{%;S& z$8Pj4GHpbA&|b6;?MH8-1L!Su5WS7wp;l_6ZK<86PzOz=PU@oWjp#k}K01UBqYu!B z=m`1<9Yx1z8f{10(+;#F?L^aQ7uuC}V>b87BOU1`bLY;TJDF?_d*_bn%=>mnx~)@6 z!Q&zOe;?}l--ptl9#Z8MRTg`!PZ-V{`0}o$Wi_6vUY<$JgirAVSkgbXkpx`HTbrtO#0F&$J27`-7P{Jap z9$iO2qdXSg>`$Z6o9I^4DStzE0)*UWOi3!!)JDcX(EX;257A#p&=6<7?}AO)g6;~FGEB92? zuneUAXkV(K*$w#c=W~0`HHv5s3I;>a0wQPz?Oz9x5Jd%fIz6oXmR@b#dASl>ZW ztPt8j9Li&lDxV-EvK`BDhzAWrf{s;Hg_G(a{&AK=B50d@A|ydFil_wx&8r0?9mp1i zK_P82!3OP6#0F>!c1QsSq=FM%;D$6hhz_Ph=ulcfhtWbhoEB|BI_Ll$p%Zk5bm#(I zp(9&xJahytp(AN29Ysg8=h&T}g|r173<8GZt6?w@$-kFS#n9svas~42-4Y=rfek*^Tz8fr-de5944wOrYcG1Uj)ECc$JVq?71m zHjBas(xuL4Vdhg@vtTyNp;PEoI*lsg+TTPCzapfH$4GS&7Bc58f){q4kP5jHZ@|tz zcyY+%C}ZndVLkX@3Catsa)pgLErVB)X)V)fIjn#Q@CvMCn(=fxok*Xh&#i^mU=`Ft z9lNfgGwAblCY{Bu&of=yg>Uk*RRLaqv?~1Z{qY$zqChUst}HH`q$;dYnVptYRYsqH zKHFi((8u~T__!Xn`@I~9$6YKQQ8*Z32xC3NXJILRX6 zb2juPi;9kP8T0&0Y-l-)h!L#x=-oUTg8UZ#o>{n}MK)mZ*S|H92z5db)vbT#Z}c2&}*@=q9?EzRs=+-`}bcAvgxBPy}0pVttjdZNjk{Ygi)Tc)Fz) zC(x}8!6T34^ ztqo~XfyvQHX{b!>lecc}Tc~W|D^LmqVa@BpoB4*dws8@P$j3wC-f?Wcmdg6*R;_)X zwpMYf*fx!W&6LksR{Mw5;=1@&O$3}wNYpm6^#rl+j8d%~g(k2DXc}vLRYLqi0K=|;0Bwp**7IdC&U(PWk|F+W1UhpI6NLtz!UK#JQ+WOr{Jl08urrT^dvn+Kc`>NFL}u3A)kk_JXG;e z&8iEzucJE7R~FaPr)2k|aXCJZT4fsAr*L9vdFf7L=^N=iIcS!2pd zYjR6H6Hejzcmd0#O?V+*}f- zDzXcQSIbd>JiK?|q{?wM1-(5ZYO*UcOG`$wQk_8nUe53Vub`(N!!BNlS2KuX_IM4i z!nL>#*E1`8MZczJsOl^|w-&F#Ywr5CSv*O_1-n zHi;vE@)qm540sg6gd7P8vc#!iD#zQy{&3I_VJoJBG*Ao?qZBm{PH8HZfp2QOkNg#gePA944;&AIjl@LE#6qmZM%ofPNkKZ{V0EEGD^CyaTQbWd(@&4FX@DRa63!2S(=Zc;UMf#P#6Ph>9^$eNDz>G{GQ+bHw zA*zme3FVdbdXq;sxVg0=SOPa7Wq&AsH=KHqm6oNXk zfWgLgU8@#k5d&rN0uL%ysF4?uj4UBbec$P#y*$M7kog~hldK>wHv(q^X7Z58L!1AC znxvN01yGZ$8%?mA zyzNJ-J!CK0NA{C9$pP{fImm;S2OST39vIRacu3~K$OB`1hrCPPBkz+#bJ68V7v*JW~r{KSCk8V_kawBw;Y4;^@~AGtd6 z(20l6e&9;~mx0SGe|m%B-vlo2f#gavEVI(5G_U{NKPbHTN-$aJ~H17Y_seUr>b0;qtw#m*8@_0bCx(1P^`K68EO1P0+DG$SVC}hw-oQI;-&=HU4%8`!My(f9Ltx?SEnqZug!Homas>dBQ zH<6pnIudRY4A3T{-o@?xPqOzh*>CbN-Yak%QoAGk~}h$j3(7&8aw%!!xr2H?A&JwJNa48 z&U{WYF#dy`xj}hB`9Xt&HV2&zx)gLH=$D{-!4OP>CBb3dU}bP@a9pq^I5Aik zTpT<$xF&df@TA~pf~N-030@rhYVfMyy5QBKa8a}7Zf~Z#Xndo7NA!KmKypT6TE`{6*`8DKr$Q>~jE5uRa zXmM+Cj5t;tC-%mR6U17vUfe<4Nt`b3D()`sDef)qE6xySinGPJ;<4g+;&tNp#6L)y zNs=W!Bvq2-lC_d`lJ$~}l0A~Wl6{glB}XJ5NsdZBmV7NaBRMNMFS#JOEV&}ND!DC1 z(jci++EN-VZ6#Go_0lA%L28uRrJbee(k{|&(rm9ZN17|mlU7M*NtZ~MN|#BOOY5X- zr0b*`r2D0Zq@PO9NY6SPUcOnrMZQhGL%vJCTmG5+YM3C*5!NBBYgqTN{$Y7x z`C)^@hK3CbD-Wv)8y_|?Y;qVM_H5XUu$kVl*9Xr4bV%rbWz%SRCQytE4KKN~3bBvQ!nSXH-*EQ&nEo z3e`H*M%8B3R@HXZPSvNX)2iQ8zpL)WO^$muZgbquxO3``>b~kMb&h&~da!z^+B-}= zTs=pZ2=9uQ9=91<|%@xg6&2`Ps znwy$mHNR-{x%xc)9KBD!RR5BGg?^oWhkmbqzy5&!p#GTtbNy}oy(C4FD#?&!Ofn}~ zliW#}NduC~lg20UNzW$D@FrbPx?=!?&=78jHgq-gGK@DYGORRgF>EvJFzhnyHtaR* zHykh=G<;?_VK`;@((tw6oZ%b8MZ*t<%gJHM?UT!sS0;a){J^L;W*ZBQ!;M8okFm-) z(>U8W*Erv}(74#R#Q2i&W#g;HTH|ixKH~x7+s5~dhmA*!$BdsEy~mBGj9(aUn#3lJ zsiUdbwAl2z>4@o;Ino?&)|eB_TC?4pVs@CF=5FTh<{su=<~;L2bG~`7d5C$0xx`#* z9&esto@kzIo@t(Co^76Me#yMtyu$p7d4qYQd6W5d^M~g1=Bwsw=IiF4&3DcB%@56g zTjZ8zmIzCfCE9D5ZCPx2&9d6E&a%<6)w09#hGmcCZOaFiQS#zy<)rd9})?ci*tbf_SMr;CGxGmb2Xw%t}Y{@p4t+&nF&z5P+vE|tY*@oH*ZN;{6wu!c9 zY}0JK?K#^_+Z@|`+d|tu+vT<`+IDGM({^>+Q*9sEMfMQ8*eWXfdt1B1?y|SD zceJP5yV-l%``CxuJ@%3I(e?`aSbL3qf_<`mirs7H?XTGP*iYJTq{vg+r3_4|Nm-e4 z$eVH^um!9J3rt97`R`9LpVbjx~<;j*X5t9S0rnIu1ELNVTP= zrS?qimztTHlbWA8Bz0Ko@YK>&Z|b~M@AA|YsV}FlOkJCLF!lY^v#B?nLZ`?nafUkO z&TwZ7r_vegR68|JtJCguIGxUJ&J5=eXMwZOS>zn!oaCJ1^g5?IXE+x)UvR$YTctkxje3Eu9>b`Ue_GgGS>>% zO4lk^oolsguj{bui0hc^Q`ZUCDc5D!P1haQJ=dSEhwcz}n7g@K;cn@Ub*tSPx7Mw9 zr@Fhk2fBy5E8XMWliX9>Uib6v+3vaS1@1-epvUecpZ5eaqeBH}_rl{WM79(u8TEG;vysG-aAT&63tO&5`Cx>y*|dty@~p WwBBh$0~_%e2kzXlz`gOBR`NeXn099X diff --git a/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.cpp b/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.cpp index 28d02be31..21f13cdfb 100755 --- a/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.cpp +++ b/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.cpp @@ -405,10 +405,10 @@ ComponentResult ConsoleHChannel::Reset(AudioUnitScope inScope, AudioUnitElement } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -477,6 +477,7 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -494,110 +495,123 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = GetParameter( kParam_CRS ); + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_ATK ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_RLS ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_GAT ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass @@ -613,393 +627,359 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1026,7 +1006,7 @@ OSStatus ConsoleHChannel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.h b/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.h index a294e5093..874810e44 100755 --- a/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.h +++ b/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.h @@ -236,26 +236,18 @@ public: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleHChannel/ConsoleHChannel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index b7402d54e88a3958f7434c0f6b01b46882c01610..5955dd44ba98f356f1c46444777dfa25a567fd0d 100644 GIT binary patch delta 5871 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�pmhrxv|1nX?ac^;NbMJABxFuX* z8MmBU!ENHc;dXF4xn0~3+>hKT?hJR1yTD!Hu5mZGo7^q#k(rsLW|diE)|m}vn>ohp zG`r1>&8^J|<|K2fxtBT3oMG-~&NLU8r<&)PE6rb+x0-jD51OmZXU*5mH_X4A|1dwb z$SiV;(xSF#EqaU5!dWZaX=mwRNw6eYI$AngUbS?yq*!`d(k$tge9LqTZ&_#A zZn*3s4y>lo`e>jdjkYnAn}t)VU4CbC7?G&a4>XfxZa zHoGm>mT2o{>tS1FTWR~kw#~NNcGUKh?S$==?Tqc5-DeNP*^}(u>^c8s{w$_x%%GUr zF`Hu!$NU;|Gv;>8-I)81299ut*wM%#ai|@3huhKE(bUnx(aI6)h;t-5UUdv|6gnn5 z-f&EDV8AiQG0(BUvCy%|vBa_3vDLB5al-Ml&>6AKUPJ^?hGsQW?InFuT`M&cr=Wgdg=TVo+72|5=ig$H)^>Jmm`nfV) zgIsy8eAh@YC$PyjHK>+uWPreZ||^ z+tu6Mo9gZ59qi5a=6LhG`QF#Pqr8RQ_qo$l-B;Td9}ZF?`Hac E0*s{t!T{E6Yvxq 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 J#?OqR{|7$e%<2FD diff --git a/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.cpp b/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.cpp index f869c6c25..b28c84507 100755 --- a/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.cpp +++ b/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.cpp @@ -379,10 +379,10 @@ void ConsoleHPre::ConsoleHPreKernel::Reset() } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPosition[count] = 0.0; @@ -440,6 +440,7 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -457,109 +458,123 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, double bassGain = (GetParameter( kParam_LOW )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/GetSampleRate()); - double omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/GetSampleRate()); - omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/GetSampleRate()); + omega = 2.0*M_PI*(4000.0/GetSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/GetSampleRate()); + omega = 2.0*M_PI*(200.0/GetSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } + //SmoothEQ3 - high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = GetParameter( kParam_CRS ); + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(GetParameter( kParam_TRF ),2.0)*16000.0)+1000.0)/GetSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (GetParameter( kParam_TRB )*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_TRG ),2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(GetParameter( kParam_TRG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(GetParameter( kParam_HMF ),3.0)*7000.0)+300.0)/GetSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (GetParameter( kParam_HMB )*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_HMG ),2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(GetParameter( kParam_HMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(GetParameter( kParam_LMF ),3.0)*3000.0)+40.0)/GetSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (GetParameter( kParam_LMB )*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_LMG ),2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(GetParameter( kParam_LMG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(GetParameter( kParam_BSF ),4.0)*1000.0)+20.0)/GetSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (GetParameter( kParam_BSB )*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-GetParameter( kParam_BSG ),2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(GetParameter( kParam_BSG )+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_ATK ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_RLS ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_GAT ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass @@ -572,220 +587,219 @@ void ConsoleHPre::ConsoleHPreKernel::Process( const Float32 *inSourceP, double inputSampleL = *sourceP; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17; - double darkSampleL = inputSampleL; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} - darkSampleL /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} - darkSampleL /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} - darkSampleL /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} - darkSampleL /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} - darkSampleL /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} + darkSampleL /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} + darkSampleL /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} + darkSampleL /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} + darkSampleL /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} + darkSampleL /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL,1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + //begin Discontinuity section + inputSampleL *= moreTapeHack; + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezMaxF = fmax(bezMaxF,fabs(inputSampleL)); - if (bezCompF[bez_cycle] > 1.0) { - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + } //makeup gain + + double ctrl = fabs(inputSampleL); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage. - if (bezCompS[bez_cycle] > 1.0) { - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate; - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.h b/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.h index e5f31970d..438287cdd 100755 --- a/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.h +++ b/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.h @@ -245,20 +245,18 @@ public: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPosition[23]; double iirHAngle[23]; diff --git a/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleHPre/ConsoleHPre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 7484afce6d27c5a2de38fa1b33839c11051ca78a..1feae4ebecdf9d31f5373ad846e79673fd1b1d00 100644 GIT binary patch delta 6074 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 delta 8086 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 diff --git a/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.cpp b/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.cpp index 164e598e5..6a9a886bb 100755 --- a/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.cpp +++ b/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.cpp @@ -59,17 +59,17 @@ ConsoleX2Buss::ConsoleX2Buss(AudioUnit component) { CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_PAN, kDefaultValue_ParamPAN ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -106,85 +106,85 @@ ComponentResult ConsoleX2Buss::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterAUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterEUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterIUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_PAN: + AUBase::FillInParameterName (outParameterInfo, kParameterPANName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamPAN; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -276,7 +276,7 @@ ComponentResult ConsoleX2Buss::Reset(AudioUnitScope inScope, AudioUnitElement i //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -317,133 +317,141 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (GetParameter( kParam_A )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_B )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_D )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_E )-0.5; - double highmidRef = GetParameter( kParam_F )-0.5; - double lowmidRef = GetParameter( kParam_G )-0.5; - double bassRef = GetParameter( kParam_H )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale; + double bezCThresh = pow(1.0-GetParameter( kParam_THR ), 6.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_THR ), 12.360679774997898) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_THR ),10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = GetParameter( kParam_J )*1.57079633; - inTrimA = inTrimB; inTrimB = GetParameter( kParam_K )*2.0; + panA = panB; panB = GetParameter( kParam_PAN )*1.57079633; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { @@ -462,198 +470,176 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)nSampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -698,48 +684,39 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); diff --git a/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.h b/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.h index daa78a49b..1fa9b9337 100755 --- a/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.h +++ b/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.h @@ -54,45 +54,49 @@ #pragma mark ____ConsoleX2Buss Parameters // parameters -static const float kDefaultValue_ParamA = 0.5; -static const float kDefaultValue_ParamB = 0.5; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 1.0; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 0.5; +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; -static CFStringRef kParameterAUnit = CFSTR("eq"); -static CFStringRef kParameterAName = CFSTR("High"); -static CFStringRef kParameterBName = CFSTR("HMid"); -static CFStringRef kParameterCName = CFSTR("LMid"); -static CFStringRef kParameterDName = CFSTR("Bass"); -static CFStringRef kParameterEUnit = CFSTR("freq"); -static CFStringRef kParameterEName = CFSTR("HighF"); -static CFStringRef kParameterFName = CFSTR("HMidF"); -static CFStringRef kParameterGName = CFSTR("LMidF"); -static CFStringRef kParameterHName = CFSTR("BassF"); -static CFStringRef kParameterIUnit = CFSTR("dyn"); -static CFStringRef kParameterIName = CFSTR("Thresh"); -static CFStringRef kParameterJName = CFSTR("Pan"); -static CFStringRef kParameterKName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamPAN = 0.5; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterPANName = CFSTR("Pan"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, + kParam_HIG =0, + kParam_HMG =1, + kParam_LMG =2, + kParam_BSG =3, + kParam_HIF =4, + kParam_HMF =5, + kParam_LMF =6, + kParam_BSF =7, + kParam_THR =8, + kParam_PAN =9, + kParam_FAD =10, //Add your parameters here... kNumberOfParameters=11 }; @@ -155,7 +159,7 @@ public: biq_sR1, biq_sR2, biq_total - }; //coefficient interpolating bessel filter, stereo + }; //coefficient interpolating filter, stereo double highA[biq_total]; double highB[biq_total]; double highC[biq_total]; @@ -176,25 +180,16 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss double avg32L[33]; double avg32R[33]; @@ -217,6 +212,7 @@ public: double panB; double inTrimA; double inTrimB; + uint32_t fpdL; uint32_t fpdR; }; diff --git a/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 6ae470cc7b686db6794bfc9446fac1ef74449781..d6a103b11e7e4ae152618cb3bcef9ee42ec783a3 100644 GIT binary patch delta 5771 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 delta 9277 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 - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); - SetParameter(kParam_L, kDefaultValue_ParamL ); - SetParameter(kParam_M, kDefaultValue_ParamM ); - SetParameter(kParam_N, kDefaultValue_ParamN ); - SetParameter(kParam_O, kDefaultValue_ParamO ); - SetParameter(kParam_P, kDefaultValue_ParamP ); - SetParameter(kParam_Q, kDefaultValue_ParamQ ); - SetParameter(kParam_R, kDefaultValue_ParamR ); + SetParameter(kParam_TRM, kDefaultValue_ParamTRM ); + SetParameter(kParam_MOR, kDefaultValue_ParamMOR ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_ATK, kDefaultValue_ParamATK ); + SetParameter(kParam_RLS, kDefaultValue_ParamRLS ); + SetParameter(kParam_GAT, kDefaultValue_ParamGAT ); + SetParameter(kParam_LOP, kDefaultValue_ParamLOP ); + SetParameter(kParam_HIP, kDefaultValue_ParamHIP ); + SetParameter(kParam_PAN, kDefaultValue_ParamPAN ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -113,135 +113,135 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_TRM: + AUBase::FillInParameterName (outParameterInfo, kParameterTRMName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Indexed; outParameterInfo.minValue = 0; outParameterInfo.maxValue = 4; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamTRM; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_MOR: + AUBase::FillInParameterName (outParameterInfo, kParameterMORName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamMOR; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterCUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterGUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterKUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_L: - AUBase::FillInParameterName (outParameterInfo, kParameterLName, false); + case kParam_ATK: + AUBase::FillInParameterName (outParameterInfo, kParameterATKName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamL; + outParameterInfo.defaultValue = kDefaultValue_ParamATK; break; - case kParam_M: - AUBase::FillInParameterName (outParameterInfo, kParameterMName, false); + case kParam_RLS: + AUBase::FillInParameterName (outParameterInfo, kParameterRLSName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamM; + outParameterInfo.defaultValue = kDefaultValue_ParamRLS; break; - case kParam_N: - AUBase::FillInParameterName (outParameterInfo, kParameterNName, false); + case kParam_GAT: + AUBase::FillInParameterName (outParameterInfo, kParameterGATName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamN; + outParameterInfo.defaultValue = kDefaultValue_ParamGAT; break; - case kParam_O: - AUBase::FillInParameterName (outParameterInfo, kParameterOName, false); + case kParam_LOP: + AUBase::FillInParameterName (outParameterInfo, kParameterLOPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterOUnit; + outParameterInfo.unitName = kParameterLOPUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamO; + outParameterInfo.defaultValue = kDefaultValue_ParamLOP; break; - case kParam_P: - AUBase::FillInParameterName (outParameterInfo, kParameterPName, false); + case kParam_HIP: + AUBase::FillInParameterName (outParameterInfo, kParameterHIPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamP; + outParameterInfo.defaultValue = kDefaultValue_ParamHIP; break; - case kParam_Q: - AUBase::FillInParameterName (outParameterInfo, kParameterQName, false); + case kParam_PAN: + AUBase::FillInParameterName (outParameterInfo, kParameterPANName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamQ; + outParameterInfo.defaultValue = kDefaultValue_ParamPAN; break; - case kParam_R: - AUBase::FillInParameterName (outParameterInfo, kParameterRName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamR; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -332,10 +332,10 @@ ComponentResult ConsoleX2Channel::Reset(AudioUnitScope inScope, AudioUnitElemen lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -403,149 +403,158 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0; - switch ((int)GetParameter( kParam_A )){ + double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); + switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(GetParameter( kParam_MOR )*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (GetParameter( kParam_C )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_D )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_F )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_G )-0.5; - double highmidRef = GetParameter( kParam_H )-0.5; - double lowmidRef = GetParameter( kParam_I )-0.5; - double bassRef = GetParameter( kParam_J )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = GetParameter( kParam_Q )*1.57079633; - inTrimA = inTrimB; inTrimB = GetParameter( kParam_R )*2.0; + panA = panB; panB = GetParameter( kParam_PAN )*1.57079633; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { @@ -554,307 +563,265 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off + + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.h b/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.h index 7cc14906a..8e5812c89 100755 --- a/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.h +++ b/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.h @@ -54,67 +54,75 @@ #pragma mark ____ConsoleX2Channel Parameters // parameters -static const int kDefaultValue_ParamA = 1; -static const float kDefaultValue_ParamB = 0.0; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 0.5; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 1.0; -static const float kDefaultValue_ParamL = 0.5; -static const float kDefaultValue_ParamM = 0.5; -static const float kDefaultValue_ParamN = 0.0; -static const float kDefaultValue_ParamO = 1.0; -static const float kDefaultValue_ParamP = 0.0; -static const float kDefaultValue_ParamQ = 0.5; -static const float kDefaultValue_ParamR = 0.5; +static const int kDefaultValue_ParamTRM = 1; +static const float kDefaultValue_ParamMOR = 0.0; -static CFStringRef kParameterAName = CFSTR("Trim"); -static CFStringRef kParameterBName = CFSTR("More"); -static CFStringRef kParameterCUnit = CFSTR("eq"); -static CFStringRef kParameterCName = CFSTR("High"); -static CFStringRef kParameterDName = CFSTR("HMid"); -static CFStringRef kParameterEName = CFSTR("LMid"); -static CFStringRef kParameterFName = CFSTR("Bass"); -static CFStringRef kParameterGUnit = CFSTR("freq"); -static CFStringRef kParameterGName = CFSTR("HighF"); -static CFStringRef kParameterHName = CFSTR("HMidF"); -static CFStringRef kParameterIName = CFSTR("LMidF"); -static CFStringRef kParameterJName = CFSTR("BassF"); -static CFStringRef kParameterKUnit = CFSTR("dyn"); -static CFStringRef kParameterKName = CFSTR("Thresh"); -static CFStringRef kParameterLName = CFSTR("Attack"); -static CFStringRef kParameterMName = CFSTR("Release"); -static CFStringRef kParameterNName = CFSTR("Gate"); -static CFStringRef kParameterOUnit = CFSTR("fltr"); -static CFStringRef kParameterOName = CFSTR("Lowpass"); -static CFStringRef kParameterPName = CFSTR("Hipass"); -static CFStringRef kParameterQName = CFSTR("Pan"); -static CFStringRef kParameterRName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; + +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamATK = 0.5; +static const float kDefaultValue_ParamRLS = 0.5; +static const float kDefaultValue_ParamGAT = 0.0; + +static const float kDefaultValue_ParamLOP = 1.0; +static const float kDefaultValue_ParamHIP = 0.0; +static const float kDefaultValue_ParamPAN = 0.5; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterTRMName = CFSTR("Trim"); +static CFStringRef kParameterMORName = CFSTR("More"); + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterATKName = CFSTR("Attack"); +static CFStringRef kParameterRLSName = CFSTR("Release"); +static CFStringRef kParameterGATName = CFSTR("Gate"); + +static CFStringRef kParameterLOPUnit = CFSTR("fltr"); +static CFStringRef kParameterLOPName = CFSTR("Lowpass"); +static CFStringRef kParameterHIPName = CFSTR("Hipass"); +static CFStringRef kParameterPANName = CFSTR("Pan"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, - kParam_L =11, - kParam_M =12, - kParam_N =13, - kParam_O =14, - kParam_P =15, - kParam_Q =16, - kParam_R =17, + kParam_TRM =0, + kParam_MOR =1, + kParam_HIG =2, + kParam_HMG =3, + kParam_LMG =4, + kParam_BSG =5, + kParam_HIF =6, + kParam_HMF =7, + kParam_LMF =8, + kParam_BSF =9, + kParam_THR =10, + kParam_ATK =11, + kParam_RLS =12, + kParam_GAT =13, + kParam_LOP =14, + kParam_HIP =15, + kParam_PAN =16, + kParam_FAD =17, //Add your parameters here... kNumberOfParameters=18 }; @@ -200,26 +208,18 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index ced6364e1d36b24f89f4a04b8ba391c7d3b24ea5..1d1eb63fd4a2b7207ab907a7354bbcb2e982b119 100644 GIT binary patch delta 5604 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 delta 7898 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 kd^>!*d|&wv`HuKb_)hswhaefd3atHbT|(dWPv4pU0qUseIndexedParameters(kNumberOfParameters); - SetParameter(kParam_A, kDefaultValue_ParamA ); - SetParameter(kParam_B, kDefaultValue_ParamB ); - SetParameter(kParam_C, kDefaultValue_ParamC ); - SetParameter(kParam_D, kDefaultValue_ParamD ); - SetParameter(kParam_E, kDefaultValue_ParamE ); - SetParameter(kParam_F, kDefaultValue_ParamF ); - SetParameter(kParam_G, kDefaultValue_ParamG ); - SetParameter(kParam_H, kDefaultValue_ParamH ); - SetParameter(kParam_I, kDefaultValue_ParamI ); - SetParameter(kParam_J, kDefaultValue_ParamJ ); - SetParameter(kParam_K, kDefaultValue_ParamK ); - SetParameter(kParam_L, kDefaultValue_ParamL ); - SetParameter(kParam_M, kDefaultValue_ParamM ); - SetParameter(kParam_N, kDefaultValue_ParamN ); - SetParameter(kParam_O, kDefaultValue_ParamO ); - SetParameter(kParam_P, kDefaultValue_ParamP ); - SetParameter(kParam_Q, kDefaultValue_ParamQ ); + SetParameter(kParam_TRM, kDefaultValue_ParamTRM ); + SetParameter(kParam_MOR, kDefaultValue_ParamMOR ); + SetParameter(kParam_HIG, kDefaultValue_ParamHIG ); + SetParameter(kParam_HMG, kDefaultValue_ParamHMG ); + SetParameter(kParam_LMG, kDefaultValue_ParamLMG ); + SetParameter(kParam_BSG, kDefaultValue_ParamBSG ); + SetParameter(kParam_HIF, kDefaultValue_ParamHIF ); + SetParameter(kParam_HMF, kDefaultValue_ParamHMF ); + SetParameter(kParam_LMF, kDefaultValue_ParamLMF ); + SetParameter(kParam_BSF, kDefaultValue_ParamBSF ); + SetParameter(kParam_THR, kDefaultValue_ParamTHR ); + SetParameter(kParam_ATK, kDefaultValue_ParamATK ); + SetParameter(kParam_RLS, kDefaultValue_ParamRLS ); + SetParameter(kParam_GAT, kDefaultValue_ParamGAT ); + SetParameter(kParam_LOP, kDefaultValue_ParamLOP ); + SetParameter(kParam_HIP, kDefaultValue_ParamHIP ); + SetParameter(kParam_FAD, kDefaultValue_ParamFAD ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -112,128 +112,128 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope, if (inScope == kAudioUnitScope_Global) { switch(inParameterID) { - case kParam_A: - AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + case kParam_TRM: + AUBase::FillInParameterName (outParameterInfo, kParameterTRMName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Indexed; outParameterInfo.minValue = 0; outParameterInfo.maxValue = 4; - outParameterInfo.defaultValue = kDefaultValue_ParamA; + outParameterInfo.defaultValue = kDefaultValue_ParamTRM; break; - case kParam_B: - AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + case kParam_MOR: + AUBase::FillInParameterName (outParameterInfo, kParameterMORName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamB; + outParameterInfo.defaultValue = kDefaultValue_ParamMOR; break; - case kParam_C: - AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + case kParam_HIG: + AUBase::FillInParameterName (outParameterInfo, kParameterHIGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterCUnit; + outParameterInfo.unitName = kParameterHIGUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamC; + outParameterInfo.defaultValue = kDefaultValue_ParamHIG; break; - case kParam_D: - AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + case kParam_HMG: + AUBase::FillInParameterName (outParameterInfo, kParameterHMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamD; + outParameterInfo.defaultValue = kDefaultValue_ParamHMG; break; - case kParam_E: - AUBase::FillInParameterName (outParameterInfo, kParameterEName, false); + case kParam_LMG: + AUBase::FillInParameterName (outParameterInfo, kParameterLMGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamE; + outParameterInfo.defaultValue = kDefaultValue_ParamLMG; break; - case kParam_F: - AUBase::FillInParameterName (outParameterInfo, kParameterFName, false); + case kParam_BSG: + AUBase::FillInParameterName (outParameterInfo, kParameterBSGName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamF; + outParameterInfo.defaultValue = kDefaultValue_ParamBSG; break; - case kParam_G: - AUBase::FillInParameterName (outParameterInfo, kParameterGName, false); + case kParam_HIF: + AUBase::FillInParameterName (outParameterInfo, kParameterHIFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterGUnit; + outParameterInfo.unitName = kParameterHIFUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamG; + outParameterInfo.defaultValue = kDefaultValue_ParamHIF; break; - case kParam_H: - AUBase::FillInParameterName (outParameterInfo, kParameterHName, false); + case kParam_HMF: + AUBase::FillInParameterName (outParameterInfo, kParameterHMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamH; + outParameterInfo.defaultValue = kDefaultValue_ParamHMF; break; - case kParam_I: - AUBase::FillInParameterName (outParameterInfo, kParameterIName, false); + case kParam_LMF: + AUBase::FillInParameterName (outParameterInfo, kParameterLMFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamI; + outParameterInfo.defaultValue = kDefaultValue_ParamLMF; break; - case kParam_J: - AUBase::FillInParameterName (outParameterInfo, kParameterJName, false); + case kParam_BSF: + AUBase::FillInParameterName (outParameterInfo, kParameterBSFName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamJ; + outParameterInfo.defaultValue = kDefaultValue_ParamBSF; break; - case kParam_K: - AUBase::FillInParameterName (outParameterInfo, kParameterKName, false); + case kParam_THR: + AUBase::FillInParameterName (outParameterInfo, kParameterTHRName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterKUnit; + outParameterInfo.unitName = kParameterTHRUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamK; + outParameterInfo.defaultValue = kDefaultValue_ParamTHR; break; - case kParam_L: - AUBase::FillInParameterName (outParameterInfo, kParameterLName, false); + case kParam_ATK: + AUBase::FillInParameterName (outParameterInfo, kParameterATKName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamL; + outParameterInfo.defaultValue = kDefaultValue_ParamATK; break; - case kParam_M: - AUBase::FillInParameterName (outParameterInfo, kParameterMName, false); + case kParam_RLS: + AUBase::FillInParameterName (outParameterInfo, kParameterRLSName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamM; + outParameterInfo.defaultValue = kDefaultValue_ParamRLS; break; - case kParam_N: - AUBase::FillInParameterName (outParameterInfo, kParameterNName, false); + case kParam_GAT: + AUBase::FillInParameterName (outParameterInfo, kParameterGATName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamN; + outParameterInfo.defaultValue = kDefaultValue_ParamGAT; break; - case kParam_O: - AUBase::FillInParameterName (outParameterInfo, kParameterOName, false); + case kParam_LOP: + AUBase::FillInParameterName (outParameterInfo, kParameterLOPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit; - outParameterInfo.unitName = kParameterOUnit; + outParameterInfo.unitName = kParameterLOPUnit; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamO; + outParameterInfo.defaultValue = kDefaultValue_ParamLOP; break; - case kParam_P: - AUBase::FillInParameterName (outParameterInfo, kParameterPName, false); + case kParam_HIP: + AUBase::FillInParameterName (outParameterInfo, kParameterHIPName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamP; + outParameterInfo.defaultValue = kDefaultValue_ParamHIP; break; - case kParam_Q: - AUBase::FillInParameterName (outParameterInfo, kParameterQName, false); + case kParam_FAD: + AUBase::FillInParameterName (outParameterInfo, kParameterFADName, false); outParameterInfo.unit = kAudioUnitParameterUnit_Generic; outParameterInfo.minValue = 0.0; outParameterInfo.maxValue = 1.0; - outParameterInfo.defaultValue = kDefaultValue_ParamQ; + outParameterInfo.defaultValue = kDefaultValue_ParamFAD; break; default: result = kAudioUnitErr_InvalidParameter; @@ -306,10 +306,10 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Reset() lowIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPosition[count] = 0.0; @@ -366,323 +366,321 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0; - switch ((int)GetParameter( kParam_A )){ + double moreTapeHack = (GetParameter( kParam_MOR )*2.0)+1.0; + bool tapehackOff = (GetParameter( kParam_MOR ) == 0.0); + switch ((int)GetParameter( kParam_TRM )){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(GetParameter( kParam_MOR )*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (GetParameter( kParam_C )-0.5)*2.0; + double trebleGain = (GetParameter( kParam_HIG )-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (GetParameter( kParam_D )-0.5)*2.0; + double highmidGain = (GetParameter( kParam_HMG )-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0; + double lowmidGain = (GetParameter( kParam_LMG )-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (GetParameter( kParam_F )-0.5)*2.0; + double bassGain = (GetParameter( kParam_BSG )-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = GetParameter( kParam_G )-0.5; - double highmidRef = GetParameter( kParam_H )-0.5; - double lowmidRef = GetParameter( kParam_I )-0.5; - double bassRef = GetParameter( kParam_J )-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/GetSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/GetSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = GetParameter( kParam_HIF )-0.5; + double highmidRef = GetParameter( kParam_HMF )-0.5; + double lowmidRef = GetParameter( kParam_LMF )-0.5; + double bassRef = GetParameter( kParam_BSF )-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/GetSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/GetSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0; - double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale; - double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-GetParameter( kParam_THR ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_ATK ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_RLS ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_GAT ),4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_LOP ),0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_HIP ),overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0; + inTrimA = inTrimB; inTrimB = GetParameter( kParam_FAD )*2.0; //Console while (nSampleFrames-- > 0) { double inputSampleL = *sourceP; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17; - double darkSampleL = inputSampleL; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} - darkSampleL /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} - darkSampleL /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} - darkSampleL /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} - darkSampleL /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; - darkSampleL = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} - darkSampleL /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];} + darkSampleL /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];} + darkSampleL /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];} + darkSampleL /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];} + darkSampleL /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; + darkSampleL = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];} + darkSampleL /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL,1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highIIR = (highIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highIIR; trebleL -= highmidL; - - midIIR = (midIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midIIR; highmidL -= lowmidL; - - lowIIR = (lowIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highIIR = (highIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highIIR; trebleL -= highmidL; + + midIIR = (midIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midIIR; highmidL -= lowmidL; + + lowIIR = (lowIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fabs(inputSampleL) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) inputSampleL *= ((bezCThresh*0.5)+1.0); - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezMaxF = fmax(bezMaxF,fabs(inputSampleL)); - if (bezCompF[bez_cycle] > 1.0) { - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate; - //Dynamics2 + if (bezThresh > 0.0) { + if (fabs(inputSampleL) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + double ctrl = fabs(inputSampleL); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)nSampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.h b/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.h index 87cb61544..71ba7313a 100755 --- a/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.h +++ b/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.h @@ -54,64 +54,72 @@ #pragma mark ____ConsoleX2Pre Parameters // parameters -static const int kDefaultValue_ParamA = 1; -static const float kDefaultValue_ParamB = 0.0; -static const float kDefaultValue_ParamC = 0.5; -static const float kDefaultValue_ParamD = 0.5; -static const float kDefaultValue_ParamE = 0.5; -static const float kDefaultValue_ParamF = 0.5; -static const float kDefaultValue_ParamG = 0.5; -static const float kDefaultValue_ParamH = 0.5; -static const float kDefaultValue_ParamI = 0.5; -static const float kDefaultValue_ParamJ = 0.5; -static const float kDefaultValue_ParamK = 1.0; -static const float kDefaultValue_ParamL = 0.5; -static const float kDefaultValue_ParamM = 0.5; -static const float kDefaultValue_ParamN = 0.0; -static const float kDefaultValue_ParamO = 1.0; -static const float kDefaultValue_ParamP = 0.0; -static const float kDefaultValue_ParamQ = 0.5; +static const int kDefaultValue_ParamTRM = 1; +static const float kDefaultValue_ParamMOR = 0.0; -static CFStringRef kParameterAName = CFSTR("Trim"); -static CFStringRef kParameterBName = CFSTR("More"); -static CFStringRef kParameterCUnit = CFSTR("eq"); -static CFStringRef kParameterCName = CFSTR("High"); -static CFStringRef kParameterDName = CFSTR("HMid"); -static CFStringRef kParameterEName = CFSTR("LMid"); -static CFStringRef kParameterFName = CFSTR("Bass"); -static CFStringRef kParameterGUnit = CFSTR("freq"); -static CFStringRef kParameterGName = CFSTR("HighF"); -static CFStringRef kParameterHName = CFSTR("HMidF"); -static CFStringRef kParameterIName = CFSTR("LMidF"); -static CFStringRef kParameterJName = CFSTR("BassF"); -static CFStringRef kParameterKUnit = CFSTR("dyn"); -static CFStringRef kParameterKName = CFSTR("Thresh"); -static CFStringRef kParameterLName = CFSTR("Attack"); -static CFStringRef kParameterMName = CFSTR("Release"); -static CFStringRef kParameterNName = CFSTR("Gate"); -static CFStringRef kParameterOUnit = CFSTR("fltr"); -static CFStringRef kParameterOName = CFSTR("Lowpass"); -static CFStringRef kParameterPName = CFSTR("Hipass"); -static CFStringRef kParameterQName = CFSTR("Fader"); +static const float kDefaultValue_ParamHIG = 0.5; +static const float kDefaultValue_ParamHMG = 0.5; +static const float kDefaultValue_ParamLMG = 0.5; +static const float kDefaultValue_ParamBSG = 0.5; + +static const float kDefaultValue_ParamHIF = 0.5; +static const float kDefaultValue_ParamHMF = 0.5; +static const float kDefaultValue_ParamLMF = 0.5; +static const float kDefaultValue_ParamBSF = 0.5; + +static const float kDefaultValue_ParamTHR = 1.0; +static const float kDefaultValue_ParamATK = 0.5; +static const float kDefaultValue_ParamRLS = 0.5; +static const float kDefaultValue_ParamGAT = 0.0; + +static const float kDefaultValue_ParamLOP = 1.0; +static const float kDefaultValue_ParamHIP = 0.0; +static const float kDefaultValue_ParamFAD = 0.5; + +static CFStringRef kParameterTRMName = CFSTR("Trim"); +static CFStringRef kParameterMORName = CFSTR("More"); + +static CFStringRef kParameterHIGUnit = CFSTR("eq"); +static CFStringRef kParameterHIGName = CFSTR("High"); +static CFStringRef kParameterHMGName = CFSTR("HMid"); +static CFStringRef kParameterLMGName = CFSTR("LMid"); +static CFStringRef kParameterBSGName = CFSTR("Bass"); + +static CFStringRef kParameterHIFUnit = CFSTR("freq"); +static CFStringRef kParameterHIFName = CFSTR("HighF"); +static CFStringRef kParameterHMFName = CFSTR("HMidF"); +static CFStringRef kParameterLMFName = CFSTR("LMidF"); +static CFStringRef kParameterBSFName = CFSTR("BassF"); + +static CFStringRef kParameterTHRUnit = CFSTR("dyn"); +static CFStringRef kParameterTHRName = CFSTR("Thresh"); +static CFStringRef kParameterATKName = CFSTR("Attack"); +static CFStringRef kParameterRLSName = CFSTR("Release"); +static CFStringRef kParameterGATName = CFSTR("Gate"); + +static CFStringRef kParameterLOPUnit = CFSTR("fltr"); +static CFStringRef kParameterLOPName = CFSTR("Lowpass"); +static CFStringRef kParameterHIPName = CFSTR("Hipass"); +static CFStringRef kParameterFADName = CFSTR("Fader"); enum { - kParam_A =0, - kParam_B =1, - kParam_C =2, - kParam_D =3, - kParam_E =4, - kParam_F =5, - kParam_G =6, - kParam_H =7, - kParam_I =8, - kParam_J =9, - kParam_K =10, - kParam_L =11, - kParam_M =12, - kParam_N =13, - kParam_O =14, - kParam_P =15, - kParam_Q =16, + kParam_TRM =0, + kParam_MOR =1, + kParam_HIG =2, + kParam_HMG =3, + kParam_LMG =4, + kParam_BSG =5, + kParam_HIF =6, + kParam_HMF =7, + kParam_LMF =8, + kParam_BSF =9, + kParam_THR =10, + kParam_ATK =11, + kParam_RLS =12, + kParam_GAT =13, + kParam_LOP =14, + kParam_HIP =15, + kParam_FAD =16, //Add your parameters here... kNumberOfParameters=17 }; @@ -208,20 +216,18 @@ public: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPosition[23]; double iirHAngle[23]; diff --git a/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 6efa554242c6a6259619f7b752b64b82a0fcca28..14252eb2857a6edaa4ce13316c66f95647057714 100644 GIT binary patch delta 6129 zcmaJ^XJAxC*Pb)8JsU{2LN=Ri+0E`Zk=~>qNhgCy78yo{lUy>26cR6)NG6dF$Q&}4d`#w%`D6iENS2b7WEI&!Hj+(b zGuc9Rl09S}IYn0FVLHr!nJ^1xgC9PEIZy<}Py(f}95%ux*bG}>E9`__un+dbS8x!H zfcINC1wTL;T!c$-8Lq%@a2;;IJ-82#;4wUbm+*>G%BYb>P!ly%3$;=kjih$!pi$IG zT~wfMT7%Z1b!j8olD49)X&c&>wxeBXB2A(_=s-G%X3@cP2pvj?(QH~kN77OBT{@M{ zqw~FVF)g8`bQN7q*V2u2E8RwS(Y^F@x{vOsU(v(#C@rJE&OsbHoB$;$4 z(M6;i>WWAY)T1V)RZezZ&QMR!I$d%-Cy2T#=|fUT-(H=QYUSnUW@Qh=YW{ta#Fha# zsic2uNYyv4lghuB@a{B{$URlOS9;1Io`9!J3@ai7(14nNneKx*h9P8V4{km`YnaE@ z;!r`y+L*(9esUqD*EreUGle#5#Dkks$vI@sE}j4L z+8zD16&io%Xahv~yVMTzH?LjQ->OC}%Zc&~EFw#a$YQL4^-hsxq=*!Aj3uO$Odu=# zyMiq-wXh~yv2J-}Ms3s_sa*7G@+pZfCZCWsSR47nTCxsfunzaCtWsARNY7TX%|EP) zSz1E2lN}_HKR1dE^zS0O`RZHb=B5=E^OrYa{EY0aAX}x2{p0}Qy!Zke7LhNp5$Eou zD%M1Dn4BcK)#Mv;gnUbmlJCg(j* zu?u#^L`>o<+!it~mVvYcL?8wUCSz|*#X+xOgB*fMbO|UR2$a|jyJL?Mr~*~VBkYO2 zxD`!mh{Jzd7vcXTbVTE75dN>hMu-3t_Q4eFiyB+AyQKV=LCkha%qJj{R0TUYHuq9V zL<9SkGXieb;I9=09c$YvDE6AHx39SayCDAK5v|3Obln?`TIKcjxhCMJHGgd%7 zs1FUGA#dwrCVFrH4&<$eFZqVf;=ih!;^hScEy>VwIuu;L*a^c^Lqd{sGSdppY5C@u z#&u)NUE(V+wS{*5-e4+EcL}r&B)pt>5Emex3K`a`L>CVUfr{aMMbHI@1XPD>1SEm9 zV&I??q-LO_2S}G8e+fMI=2oB&W(TaiDKF?>UP?KEQtD7?Jp+c2=#`KO9vA=vVGv}& zV0;I2F%R=`1Qy`Pl`s^Bkut~u4<}9;j>1B0;{zif(~9#%vpKn%1zL=Si2*zBffo>b zFb>AU1RRZH@Le2>@1YlQB@y6#m<%7l6mD%QpX|dTEXL*B$cg}cs!wsvg@v4K@G;DT z`LF=T;dq>Y6H8$cEQTep6er315?7`_puoq{Pe~OU67jOW+ z^dC1wuvs{B^L>Mf25J`$!Pow35rPB`!#BKi+eb|IZwjj!21nr-uX^|nzQ>PnPBF*7 zm}8&K{XULJ7T`xX8-RHleu6XbGk%Qoa6T?5g^X}yC>D`7t1Fdx2#xy&DLPLvdM9JSGX*1z1Gp@OIIj1vd`#F8R-j-}jum__iC za+=thzf(~^uX#X4G=xO2p<*hbQYxczs-QtsNrPz>S`}B~DqM}9;2QiC*Wx-{j~j5~ z8X8JfR82KhOLbIFtI_H-j2dtgZpJOR6}RCR_`(Ow2i1KL=7Vt5^ovhZj>;OAHQJMz zl+Sk$|7A-jRcLEZ`iOx8J-JE4hi2t>&+?4)ceVEL$5^fY0~VWqrPbmMAt9u9!f;P^ zTy}C=dR_>Zy7G;Z)}*!h5@{{mUPPmDM?geETX#=>V<|4*Gc2#XBxpU57SsB)0q(@l z->4FOi@r^CCA2YZLYv|)+>LumXe<$EbNq}GbT1nFa&!Iz4FvzvhGACPo_6}z@OV;2 z6L24A@qV6{UmJ$^36vmB=JiRt;eo$=^`xm>W@sw3eS=5v0&kxODy(;#%&h#J-1wYKkAJT%yLt}I<#eON={xu>9xbMMRE6L1 zsB8RfB5Sz|dF|8D_&wG;O~=yrsF!jDpguZ|j;9moL^6)PPbc&3b`1T{za(;<3(w;( zTo{hwue`P3xiUJ9PNy^YoSAeMolX7pBRYr9r62o8*#`&xh$rwTJd4M%%zw+?sP%$? zw}p6;D-B&jm-1Q5I4g>K$7Oo5^RotId2+kOWoLRu;VBOAhku-7cumpebcKJK!z3=I zD|tyxbGQuUn{5%9K-Z9Qe3Lzmq+B`aI=bF}+)<5f;Ny-vbcPe$*(SP~Zs|QdEq_qO zxdwm6GpQk&{&lheH3QbS(;apEbis??0`1g(q%e(0w|AwfV>@#lp*Qhr9 zpwig;AE16g52S`@;##+<$VdCEJf4-p0LO~ymn8AOe5;_}!2lf&;YF^{^cxQR2>muS zq*}&^+*}@~f7!!JUVQc+(?^fd<8(5e5J+En=C0#qp1Je?&fJgm^y|!>#cO!wb=H2b zfO9U8w)6PgUunA-NE=?Q%#!~^J$0*pXQHz3Zqj>P(&#OEo8F;!@dn<+TX?&a-lq@f zAM_#K!Mk`5|KybXpQkNX1)7%uG_Uaf-%eYMGR8z?1wO<-@B!B4o7Ou~0d=dj{51w9 zXG&fMOu>Ti5k4+v!K?~C!Kd7(vPz8KTu&O!v`qK6lRB%;!cs%D|4bm4qKqNM%)pc1 zqh5`;zpM*sKIy-Pkkw_4 zcnDcNR-ZLs4SgW;f!GHUA4p5tTdXlvv8Fzd`Jf7J_5r^G^z7srP$7@;^{aL4-6^dw zXGDHL6M7|P4IEVdr7|+DSo?tK)~pR{%i8%s?gNDnf_$JX_1NVP)M}PcE#ihYzY2v0gq1`5)5C`f_Py{aC6GLVcilBX}&G4fv;8 zvVlZkSw2u)w~q>PR5fi`de(V_9LmGjwy{@?7; zEO5_YV|-Aph|41vN4_<@zD030$oG`XX=;e7B97Hl1JO;+DG%jIHja(wr>N%C#U}Wl zSfe;rt~Ojx*d+EoznhdRTDhLE$y`tV)=>$53j6Ri@qiyp*>rv|6*Wo*TJ@#B_gnWN zZgYI&E!5kO$Vhc!B{fJ4X-t~&+f#Rbt?S2yw3OeGchWDpOdO*p=qdUW{h8m6&(lZz z&MWYHZVT3mC$}AoV;xyMzwLHqNo)`s%rCjwY&gqh`K*9nb$Jljdu%pa&-SpB?7GM( zsx9gy>L)4`O%hEL&G3q5iTt7kqD7)5qGh6D(E-sjailm#Tt{42Twfe3juR(}2Z?jU z?}{giXN%{EKNc?#FA^^iuMuw%?-lQpgh;AO+>$zyCX)7&j*@su7fGTdSyC!lE7>a9 zE7>PGEIB6mL2^!VNpe^6K=M%XMDnNPxwL__m9(w2y|km$8!t_erbsiT!=<^>d})F7 zvh&TnR z+sYH=$@1>R2>D2Pq5M5L%E!qk$Ul_Nmamd;mG70GlV4GY6$VA5qJ|Sf$vl_)PJ+ zV!z^m;w!}=#bLz}#ZkrgiZhCPL5d(_P`#kIproK7K@)-|22Bl`7UT~q3%U|?H|T{@ zp;RliO1-kW(x8k~I+RYOpsb;+rEI74rYpxPHz;=~_bT@(4=ax;Pbg0*%ao^;SCluE zx0QF5_mxkT&y+8euYw_12<{m?A$VHwjNnDVCBe&sR|c;R-VnSgcuVlM;2pvHgTD?w z9{f{iS?KA|3!!&HABDb9DO7q@b(KM7RGCy3l}#0`s-vo>YM^SQYOHFiidAKJRg+bl zRA*IJR997ZRZmsV)K%1awL@J~-9Y`8x{3O2bq964IzgSNPF8nUr>fJ{nd$-R9QAN@ zu6m66JvFMwsb{EXsr~9X8m0-+m^2oRO=H(YX8Od< zq-Yjv4r=ac)!N$H4qER3ZJu_Vc7k@2cCvPgcB*!|cBXczwn$r|U9MfJU9DZCU8`NM z{X+YL_L}y&E<|V3#pq&n?R0Uvj=FeVg082ow=PB3PuE|UuA8WvuUn%#t~;l@s=KDU zp}VEKqkE$JQ}leuaL&{u}*O z{WblKFj-h=SmUr3VS~fI4|`~!2B|@A2r`5iR0fSfXNWaq7={}P4Py*r4PJxKFvT#{ zFx@cIFx&8vVU6K)!)e2Va1svTG+Y#J3a=4fJ3J=5UU-A>M&U`}DdC0TW5UN8oyHhr ztg(gB+sfG1*xuN|m~9+s9AzAB9B-UyTxncwTw`2oTyNZH+-%%x+-}@y+->~Kc*{MC5Tc*Xd;@rLoX@viYzM2(2ph`5Np5hEfNMr@2Y74g^1|VUQ%h58Q%_TxX@F^vX|QRisnCR8(>T)v(@g2CXPJkX3(Ql@%gpP{yUb_IXU*5lx6OCW_sx&ZPtDKFFDxpH-BQcqjj`0V z)VFlE|tyQccR+Uv_t!Zs;O|TBMj<(LV&a*DCF0wAM zF0&R}Pg#Gl{%XBwy==W_eQu*RkxgQg*|fF@+uOF5wlv#d+ellXZH#TKZIW$~t;n|B zw$FCNcGUKLWP`|NksTwucq3CHJ&`jb=S1#{JY(0`Eq1})!rs>2*FM0WWglW6W-qYM zvit3G?Az=+?7QrH?0fC|>|fZwv>&vew_mVdvR|=ZwO_N}u>WCyY=3Hh=8!oQ4yB`t z!{CT?#5n3Y>N^@bT07z$368FgBu6(#KSzH@x+Bvuz%j@%&*44fcob!hY8=%is#jD> zRKKYHQSU_MMU99W8C4i{HR^8E3nz7ooDye{GuTXGU1MAmU9(*aT}xa=u2R=Z*9O-n*A~}y*G|`N z*H5lTLUo~z&_rk|#0njS&O%oqS?D435{3x{!WiK_!6%FtW(pq*^M!@NVxd%6DXbPg z71jycg?++N;gnD&oEFXq7lg~gZ^AXR#(!@7@u;rQ*g)X~jRAS@B=lMsNE+Sj1SL delta 9582 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 + SetParameter(kParam_A, kDefaultValue_ParamA ); + SetParameter(kParam_B, kDefaultValue_ParamB ); + SetParameter(kParam_C, kDefaultValue_ParamC ); + SetParameter(kParam_D, kDefaultValue_ParamD ); + +#if AU_DEBUG_DISPATCHER + mDebugDispatcher = new AUDebugDispatcher (this); +#endif + +} + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetParameterValueStrings +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings) +{ + + return kAudioUnitErr_InvalidProperty; +} + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetParameterInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo ) +{ + ComponentResult result = noErr; + + outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable + | kAudioUnitParameterFlag_IsReadable; + + if (inScope == kAudioUnitScope_Global) { + switch(inParameterID) + { + case kParam_A: + AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamA; + break; + case kParam_B: + AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamB; + break; + case kParam_C: + AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamC; + break; + case kParam_D: + AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamD; + break; + default: + result = kAudioUnitErr_InvalidParameter; + break; + } + } else { + result = kAudioUnitErr_InvalidParameter; + } + + + + return result; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetPropertyInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetPropertyInfo (AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable) +{ + return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable); +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// state that plugin supports only stereo-in/stereo-out processing +UInt32 Dynamics3::SupportedNumChannels(const AUChannelInfo ** outInfo) +{ + if (outInfo != NULL) + { + static AUChannelInfo info; + info.inChannels = 2; + info.outChannels = 2; + *outInfo = &info; + } + + return 1; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::GetProperty +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::GetProperty( AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData ) +{ + return AUEffectBase::GetProperty (inID, inScope, inElement, outData); +} + +// Dynamics3::Initialize +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::Initialize() +{ + ComponentResult result = AUEffectBase::Initialize(); + if (result == noErr) + Reset(kAudioUnitScope_Global, 0); + return result; +} + +#pragma mark ____Dynamics3EffectKernel + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::Dynamics3Kernel::Reset() +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3::Reset(AudioUnitScope inScope, AudioUnitElement inElement) +{ + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + return noErr; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3::ProcessBufferLists +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +OSStatus Dynamics3::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, + const AudioBufferList & inBuffer, + AudioBufferList & outBuffer, + UInt32 inFramesToProcess) +{ + Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData); + Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData); + Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData); + Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData); + UInt32 nSampleFrames = inFramesToProcess; + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= GetSampleRate(); + + double bezThresh = pow(1.0-GetParameter( kParam_A ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_B ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_C ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_D ),4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 + + while (nSampleFrames-- > 0) { + double inputSampleL = *inputL; + double inputSampleR = *inputR; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *outputL = inputSampleL; + *outputR = inputSampleR; + //direct stereo out + + inputL += 1; + inputR += 1; + outputL += 1; + outputR += 1; + } + return noErr; +} + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.exp b/plugins/MacSignedAU/Dynamics3/Dynamics3.exp new file mode 100755 index 000000000..54c794cfe --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.exp @@ -0,0 +1,2 @@ +_Dynamics3Entry +_Dynamics3Factory diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.h b/plugins/MacSignedAU/Dynamics3/Dynamics3.h new file mode 100755 index 000000000..96abf33d0 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.h @@ -0,0 +1,142 @@ +/* +* File: Dynamics3.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include "AUEffectBase.h" +#include "Dynamics3Version.h" + +#if AU_DEBUG_DISPATCHER + #include "AUDebugDispatcher.h" +#endif + + +#ifndef __Dynamics3_h__ +#define __Dynamics3_h__ + + +#pragma mark ____Dynamics3 Parameters + +// parameters +static const float kDefaultValue_ParamA = 1.0; +static const float kDefaultValue_ParamB = 0.5; +static const float kDefaultValue_ParamC = 0.5; +static const float kDefaultValue_ParamD = 0.0; + +static CFStringRef kParameterAName = CFSTR("Thresh"); +static CFStringRef kParameterBName = CFSTR("Attack"); +static CFStringRef kParameterCName = CFSTR("Release"); +static CFStringRef kParameterDName = CFSTR("Gate"); + +enum { + kParam_A =0, + kParam_B =1, + kParam_C =2, + kParam_D =3, + //Add your parameters here... + kNumberOfParameters=4 +}; + +#pragma mark ____Dynamics3 +class Dynamics3 : public AUEffectBase +{ +public: + Dynamics3(AudioUnit component); +#if AU_DEBUG_DISPATCHER + virtual ~Dynamics3 () { delete mDebugDispatcher; } +#endif + + virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement); + + virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, + const AudioBufferList & inBuffer, AudioBufferList & outBuffer, + UInt32 inFramesToProcess); + virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo); + + virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings); + + virtual ComponentResult GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo); + + virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable ); + + virtual ComponentResult GetProperty(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData); + + virtual ComponentResult Initialize(); + virtual bool SupportsTail () { return true; } + virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples + virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples + + /*! @method Version */ + virtual ComponentResult Version() { return kDynamics3Version; } + + private: + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + //Dynamics3 + + uint32_t fpdL; + uint32_t fpdR; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +#endif \ No newline at end of file diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.r b/plugins/MacSignedAU/Dynamics3/Dynamics3.r new file mode 100755 index 000000000..a4fc56d85 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.r @@ -0,0 +1,61 @@ +/* +* File: Dynamics3.r +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include + +#include "Dynamics3Version.h" + +// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description +#define kAudioUnitResID_Dynamics3 1000 + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dynamics3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#define RES_ID kAudioUnitResID_Dynamics3 +#define COMP_TYPE kAudioUnitType_Effect +#define COMP_SUBTYPE Dynamics3_COMP_SUBTYPE +#define COMP_MANUF Dynamics3_COMP_MANF + +#define VERSION kDynamics3Version +#define NAME "Airwindows: Dynamics3" +#define DESCRIPTION "Dynamics3 AU" +#define ENTRY_POINT "Dynamics3Entry" + +#include "AUResources.r" \ No newline at end of file diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 new file mode 100755 index 000000000..61450416d --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.mode1v3 @@ -0,0 +1,1359 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 8BD3CCBC148831C90062E48C + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + build + debugger-enable-breakpoints + get-info + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 299 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A7D072073D200365D66 + 8BA05A7E072073D200365D66 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 6 + 5 + 4 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {299, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {316, 463}} + GroupTreeTableConfiguration + + MainColumn + 299 + + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 316pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {467, 0}} + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 5}, {467, 458}} + RubberWindowFrame + 18 337 788 504 0 0 1440 878 + + Module + XCDetailModule + Proportion + 458pt + + + Proportion + 467pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 8BDD47AA1A48BB8900FB2F61 + 1CE0B1FE06471DED0097A5F4 + 8BDD47AB1A48BB8900FB2F61 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 8BD3CCBD148831C90062E48C + /Developer/Library/Xcode/Project Templates/System Plug-in/Audio Unit Effect/Audio Unit Effect with Cocoa View/StarterAU.xcodeproj + + WindowString + 18 337 788 504 0 0 1440 878 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 218}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 223}, {500, 236}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 459pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 8BD3CCBD148831C90062E48C + 8BDD47AC1A48BB8900FB2F61 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 668 222 500 500 0 0 1440 878 + WindowToolGUID + 8BD3CCBD148831C90062E48C + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..1ac389561 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,131 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3 */; + codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 127, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 188, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786918597; + PBXWorkspaceStateSaveDate = 786918597; + }; + perUserProjectItems = { + 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */ = 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */; + 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */ = 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */; + }; + sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; + userBuildSettings = { + }; + }; + 8B5AB2B22EE779AB00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; + name = "Dynamics3.cpp: 240"; + rLen = 1179; + rLoc = 10661; + rType = 0; + vrLen = 241; + vrLoc = 10661; + }; + 8B5AB2B32EE779AB00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; + name = "Dynamics3.cpp: 240"; + rLen = 1179; + rLoc = 10661; + rType = 0; + vrLen = 241; + vrLoc = 10661; + }; + 8BA05A660720730100365D66 /* Dynamics3.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {975, 5508}}"; + sepNavSelRange = "{10661, 1179}"; + sepNavVisRange = "{10661, 241}"; + sepNavWindowFrame = "{{-4, 38}, {742, 840}}"; + }; + }; + 8BA05A690720730100365D66 /* Dynamics3Version.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; + sepNavSelRange = "{2907, 0}"; + sepNavVisRange = "{1699, 1271}"; + sepNavWindowFrame = "{{15, 192}, {826, 681}}"; + }; + }; + 8BA05A7F072073D200365D66 /* AUBase.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 1336}"; + }; + }; + 8BC6025B073B072D006C4272 /* Dynamics3.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1146, 2826}}"; + sepNavSelRange = "{5073, 237}"; + sepNavVisRange = "{4431, 1012}"; + sepNavWindowFrame = "{{-5, 58}, {565, 799}}"; + }; + }; + 8BD3CCB8148830B20062E48C /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8BD3CCB9148830B20062E48C /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..85ba26382 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1484 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8B17F98B2ECF53930095B409 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 810 + 810 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 185 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A56072072A900365D66 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 4 + 2 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {185, 446}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {202, 464}} + GroupTreeTableConfiguration + + MainColumn + 185 + + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 202pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8B17F9862ECF53930095B409 + PBXProjectModuleLabel + Dynamics3.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8B17F9872ECF53930095B409 + PBXProjectModuleLabel + Dynamics3.cpp + _historyCapacity + 0 + bookmark + 8B5AB2B32EE779AB00A3F512 + history + + 8B5AB2B22EE779AB00A3F512 + + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {366, 136}} + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 136pt + + + Proportion + 323pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {366, 296}} + RubberWindowFrame + 47 373 573 505 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {603, 414}} + + Module + PBXBuildResultsModule + + + + + Proportion + 366pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AB2B42EE779AB00A3F512 + 1CA23ED40692098700951B8B + 8B5AB2B52EE779AB00A3F512 + 8B17F9862ECF53930095B409 + 8B5AB2B62EE779AB00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + 1 + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0% + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 213}} + {{395, 0}, {415, 213}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 213}} + {{0, 213}, {810, 225}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 7}, {810, 438}} + + Module + PBXDebugSessionModule + Proportion + 443pt + + + Name + Debug + ServiceClasses + + XCModuleDock + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + XCConsole + + TableOfContents + + 1CC8E6A5069209BD00BB180A + 1CC8E6A6069209BD00BB180A + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 1CC8E6A7069209BD00BB180A + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786921899.91366303 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AB2B72EE779AB00A3F512 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Dynamics3/Dynamics3.xcodeproj + + WindowString + 47 373 573 505 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj new file mode 100755 index 000000000..729f1f389 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.pbxproj @@ -0,0 +1,965 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 8B8AF0AB2EEC917B00FC1F17 /* CAExtAudioFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0232EEC917B00FC1F17 /* CAExtAudioFile.h */; }; + 8B8AF0AC2EEC917B00FC1F17 /* CACFMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0242EEC917B00FC1F17 /* CACFMachPort.h */; }; + 8B8AF0AD2EEC917B00FC1F17 /* CABool.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0252EEC917B00FC1F17 /* CABool.h */; }; + 8B8AF0AE2EEC917B00FC1F17 /* CAComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0262EEC917B00FC1F17 /* CAComponent.cpp */; }; + 8B8AF0AF2EEC917B00FC1F17 /* CADebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0272EEC917B00FC1F17 /* CADebugger.h */; }; + 8B8AF0B02EEC917B00FC1F17 /* CACFNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0282EEC917B00FC1F17 /* CACFNumber.cpp */; }; + 8B8AF0B12EEC917B00FC1F17 /* CAGuard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0292EEC917B00FC1F17 /* CAGuard.h */; }; + 8B8AF0B22EEC917B00FC1F17 /* CAAtomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02A2EEC917B00FC1F17 /* CAAtomic.h */; }; + 8B8AF0B32EEC917B00FC1F17 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02B2EEC917B00FC1F17 /* CAStreamBasicDescription.h */; }; + 8B8AF0B42EEC917B00FC1F17 /* CACFObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02C2EEC917B00FC1F17 /* CACFObject.h */; }; + 8B8AF0B52EEC917B00FC1F17 /* CAStreamRangedDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02D2EEC917B00FC1F17 /* CAStreamRangedDescription.h */; }; + 8B8AF0B62EEC917B00FC1F17 /* CATokenMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02E2EEC917B00FC1F17 /* CATokenMap.h */; }; + 8B8AF0B72EEC917B00FC1F17 /* CAComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF02F2EEC917B00FC1F17 /* CAComponent.h */; }; + 8B8AF0B82EEC917B00FC1F17 /* CAAudioBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0302EEC917B00FC1F17 /* CAAudioBufferList.h */; }; + 8B8AF0B92EEC917B00FC1F17 /* CAAudioUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0312EEC917B00FC1F17 /* CAAudioUnit.h */; }; + 8B8AF0BA2EEC917B00FC1F17 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0322EEC917B00FC1F17 /* CAAUParameter.h */; }; + 8B8AF0BB2EEC917B00FC1F17 /* CAException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0332EEC917B00FC1F17 /* CAException.h */; }; + 8B8AF0BC2EEC917B00FC1F17 /* CAAUProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0342EEC917B00FC1F17 /* CAAUProcessor.cpp */; }; + 8B8AF0BD2EEC917B00FC1F17 /* CAAUProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0352EEC917B00FC1F17 /* CAAUProcessor.h */; }; + 8B8AF0BE2EEC917B00FC1F17 /* CAProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0362EEC917B00FC1F17 /* CAProcess.h */; }; + 8B8AF0BF2EEC917B00FC1F17 /* CACFDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0372EEC917B00FC1F17 /* CACFDictionary.h */; }; + 8B8AF0C02EEC917B00FC1F17 /* CAPThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0382EEC917B00FC1F17 /* CAPThread.h */; }; + 8B8AF0C12EEC917B00FC1F17 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0392EEC917B00FC1F17 /* CAAUParameter.cpp */; }; + 8B8AF0C22EEC917B00FC1F17 /* CAAudioTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF03A2EEC917B00FC1F17 /* CAAudioTimeStamp.h */; }; + 8B8AF0C32EEC917B00FC1F17 /* CAFilePathUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF03B2EEC917B00FC1F17 /* CAFilePathUtils.cpp */; }; + 8B8AF0C42EEC917B00FC1F17 /* CAAudioValueRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF03C2EEC917B00FC1F17 /* CAAudioValueRange.h */; }; + 8B8AF0C52EEC917B00FC1F17 /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF03D2EEC917B00FC1F17 /* CAVectorUnitTypes.h */; }; + 8B8AF0C62EEC917B00FC1F17 /* CAAudioChannelLayoutObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF03E2EEC917B00FC1F17 /* CAAudioChannelLayoutObject.cpp */; }; + 8B8AF0C72EEC917B00FC1F17 /* CAGuard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF03F2EEC917B00FC1F17 /* CAGuard.cpp */; }; + 8B8AF0C82EEC917B00FC1F17 /* CACFNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0402EEC917B00FC1F17 /* CACFNumber.h */; }; + 8B8AF0C92EEC917B00FC1F17 /* CACFDistributedNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0412EEC917B00FC1F17 /* CACFDistributedNotification.cpp */; }; + 8B8AF0CA2EEC917B00FC1F17 /* CACFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0422EEC917B00FC1F17 /* CACFString.h */; }; + 8B8AF0CB2EEC917B00FC1F17 /* CAAUMIDIMapManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0432EEC917B00FC1F17 /* CAAUMIDIMapManager.cpp */; }; + 8B8AF0CC2EEC917B00FC1F17 /* CAComponentDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0442EEC917B00FC1F17 /* CAComponentDescription.cpp */; }; + 8B8AF0CD2EEC917B00FC1F17 /* CAHostTimeBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0452EEC917B00FC1F17 /* CAHostTimeBase.h */; }; + 8B8AF0CE2EEC917B00FC1F17 /* CADebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0462EEC917B00FC1F17 /* CADebugMacros.cpp */; }; + 8B8AF0CF2EEC917B00FC1F17 /* CAAudioFileFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0472EEC917B00FC1F17 /* CAAudioFileFormats.h */; }; + 8B8AF0D02EEC917B00FC1F17 /* CAAUMIDIMapManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0482EEC917B00FC1F17 /* CAAUMIDIMapManager.h */; }; + 8B8AF0D12EEC917B00FC1F17 /* CACFDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0492EEC917B00FC1F17 /* CACFDictionary.cpp */; }; + 8B8AF0D22EEC917B00FC1F17 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF04A2EEC917B00FC1F17 /* CAMutex.h */; }; + 8B8AF0D32EEC917B00FC1F17 /* CACFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF04B2EEC917B00FC1F17 /* CACFString.cpp */; }; + 8B8AF0D42EEC917B00FC1F17 /* CASettingsStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF04C2EEC917B00FC1F17 /* CASettingsStorage.h */; }; + 8B8AF0D52EEC917B00FC1F17 /* CADebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF04D2EEC917B00FC1F17 /* CADebugPrintf.h */; }; + 8B8AF0D62EEC917B00FC1F17 /* CAXException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF04E2EEC917B00FC1F17 /* CAXException.cpp */; }; + 8B8AF0D72EEC917B00FC1F17 /* CAAUMIDIMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF04F2EEC917B00FC1F17 /* CAAUMIDIMap.h */; }; + 8B8AF0D82EEC917B00FC1F17 /* AUParamInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0502EEC917B00FC1F17 /* AUParamInfo.h */; }; + 8B8AF0D92EEC917B00FC1F17 /* CABitOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0512EEC917B00FC1F17 /* CABitOperations.h */; }; + 8B8AF0DA2EEC917B00FC1F17 /* CACFPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0522EEC917B00FC1F17 /* CACFPreferences.cpp */; }; + 8B8AF0DB2EEC917B00FC1F17 /* CABundleLocker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0532EEC917B00FC1F17 /* CABundleLocker.h */; }; + 8B8AF0DC2EEC917B00FC1F17 /* CAPropertyAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0542EEC917B00FC1F17 /* CAPropertyAddress.h */; }; + 8B8AF0DD2EEC917B00FC1F17 /* CAXException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0552EEC917B00FC1F17 /* CAXException.h */; }; + 8B8AF0DE2EEC917B00FC1F17 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0562EEC917B00FC1F17 /* CAAudioChannelLayout.cpp */; }; + 8B8AF0DF2EEC917B00FC1F17 /* CAThreadSafeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0572EEC917B00FC1F17 /* CAThreadSafeList.h */; }; + 8B8AF0E02EEC917B00FC1F17 /* CAAudioUnitOutputCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0582EEC917B00FC1F17 /* CAAudioUnitOutputCapturer.h */; }; + 8B8AF0E12EEC917B00FC1F17 /* AUParamInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0592EEC917B00FC1F17 /* AUParamInfo.cpp */; }; + 8B8AF0E22EEC917B00FC1F17 /* CASharedLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF05A2EEC917B00FC1F17 /* CASharedLibrary.cpp */; }; + 8B8AF0E32EEC917B00FC1F17 /* CAAUMIDIMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF05B2EEC917B00FC1F17 /* CAAUMIDIMap.cpp */; }; + 8B8AF0E42EEC917B00FC1F17 /* CALogMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF05C2EEC917B00FC1F17 /* CALogMacros.h */; }; + 8B8AF0E52EEC917B00FC1F17 /* CACFMessagePort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF05D2EEC917B00FC1F17 /* CACFMessagePort.cpp */; }; + 8B8AF0E62EEC917B00FC1F17 /* CARingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF05E2EEC917B00FC1F17 /* CARingBuffer.h */; }; + 8B8AF0E72EEC917B00FC1F17 /* AUOutputBL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF05F2EEC917B00FC1F17 /* AUOutputBL.cpp */; }; + 8B8AF0E82EEC917B00FC1F17 /* CABufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0602EEC917B00FC1F17 /* CABufferList.h */; }; + 8B8AF0E92EEC917B00FC1F17 /* CASharedLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0612EEC917B00FC1F17 /* CASharedLibrary.h */; }; + 8B8AF0EA2EEC917B00FC1F17 /* CACFData.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0622EEC917B00FC1F17 /* CACFData.h */; }; + 8B8AF0EB2EEC917B00FC1F17 /* CAStreamRangedDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0632EEC917B00FC1F17 /* CAStreamRangedDescription.cpp */; }; + 8B8AF0EC2EEC917B00FC1F17 /* CAPThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0642EEC917B00FC1F17 /* CAPThread.cpp */; }; + 8B8AF0ED2EEC917B00FC1F17 /* CAAutoDisposer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0652EEC917B00FC1F17 /* CAAutoDisposer.h */; }; + 8B8AF0EE2EEC917B00FC1F17 /* CACFPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0662EEC917B00FC1F17 /* CACFPreferences.h */; }; + 8B8AF0EF2EEC917B00FC1F17 /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0672EEC917B00FC1F17 /* CAVectorUnit.cpp */; }; + 8B8AF0F02EEC917B00FC1F17 /* CAComponentDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0682EEC917B00FC1F17 /* CAComponentDescription.h */; }; + 8B8AF0F12EEC917B00FC1F17 /* CADebugMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0692EEC917B00FC1F17 /* CADebugMacros.h */; }; + 8B8AF0F22EEC917B00FC1F17 /* AUOutputBL.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF06A2EEC917B00FC1F17 /* AUOutputBL.h */; }; + 8B8AF0F32EEC917B00FC1F17 /* CADebugPrintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF06B2EEC917B00FC1F17 /* CADebugPrintf.cpp */; }; + 8B8AF0F42EEC917B00FC1F17 /* CARingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF06C2EEC917B00FC1F17 /* CARingBuffer.cpp */; }; + 8B8AF0F52EEC917B00FC1F17 /* CACFPlugIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF06D2EEC917B00FC1F17 /* CACFPlugIn.h */; }; + 8B8AF0F62EEC917B00FC1F17 /* CASettingsStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF06E2EEC917B00FC1F17 /* CASettingsStorage.cpp */; }; + 8B8AF0F72EEC917B00FC1F17 /* CAMixMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF06F2EEC917B00FC1F17 /* CAMixMap.h */; }; + 8B8AF0F82EEC917B00FC1F17 /* CACFDistributedNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0702EEC917B00FC1F17 /* CACFDistributedNotification.h */; }; + 8B8AF0F92EEC917B00FC1F17 /* CAFilePathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0712EEC917B00FC1F17 /* CAFilePathUtils.h */; }; + 8B8AF0FA2EEC917B00FC1F17 /* CATink.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0722EEC917B00FC1F17 /* CATink.h */; }; + 8B8AF0FB2EEC917B00FC1F17 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0732EEC917B00FC1F17 /* CAStreamBasicDescription.cpp */; }; + 8B8AF0FC2EEC917B00FC1F17 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0742EEC917B00FC1F17 /* CAAudioChannelLayout.h */; }; + 8B8AF0FD2EEC917B00FC1F17 /* CAProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0752EEC917B00FC1F17 /* CAProcess.cpp */; }; + 8B8AF0FE2EEC917B00FC1F17 /* CAHostTimeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0762EEC917B00FC1F17 /* CAHostTimeBase.cpp */; }; + 8B8AF0FF2EEC917B00FC1F17 /* CAPersistence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0772EEC917B00FC1F17 /* CAPersistence.cpp */; }; + 8B8AF1002EEC917B00FC1F17 /* CAAudioBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0782EEC917B00FC1F17 /* CAAudioBufferList.cpp */; }; + 8B8AF1012EEC917B00FC1F17 /* CAAudioTimeStamp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0792EEC917B00FC1F17 /* CAAudioTimeStamp.cpp */; }; + 8B8AF1022EEC917B00FC1F17 /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF07A2EEC917B00FC1F17 /* CAVectorUnit.h */; }; + 8B8AF1032EEC917B00FC1F17 /* CAByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF07B2EEC917B00FC1F17 /* CAByteOrder.h */; }; + 8B8AF1042EEC917B00FC1F17 /* CACFArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF07C2EEC917B00FC1F17 /* CACFArray.h */; }; + 8B8AF1052EEC917B00FC1F17 /* CAAtomicStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF07D2EEC917B00FC1F17 /* CAAtomicStack.h */; }; + 8B8AF1062EEC917B00FC1F17 /* CAReferenceCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF07E2EEC917B00FC1F17 /* CAReferenceCounted.h */; }; + 8B8AF1072EEC917B00FC1F17 /* CACFMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF07F2EEC917B00FC1F17 /* CACFMachPort.cpp */; }; + 8B8AF1082EEC917B00FC1F17 /* CABufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0802EEC917B00FC1F17 /* CABufferList.cpp */; }; + 8B8AF1092EEC917B00FC1F17 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0812EEC917B00FC1F17 /* CAMutex.cpp */; }; + 8B8AF10A2EEC917B00FC1F17 /* CADebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0822EEC917B00FC1F17 /* CADebugger.cpp */; }; + 8B8AF10B2EEC917B00FC1F17 /* CABundleLocker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0832EEC917B00FC1F17 /* CABundleLocker.cpp */; }; + 8B8AF10C2EEC917B00FC1F17 /* CAAudioFileFormats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0842EEC917B00FC1F17 /* CAAudioFileFormats.cpp */; }; + 8B8AF10D2EEC917B00FC1F17 /* CAMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0852EEC917B00FC1F17 /* CAMath.h */; }; + 8B8AF10E2EEC917B00FC1F17 /* CACFArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0862EEC917B00FC1F17 /* CACFArray.cpp */; }; + 8B8AF10F2EEC917B00FC1F17 /* CACFMessagePort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0872EEC917B00FC1F17 /* CACFMessagePort.h */; }; + 8B8AF1102EEC917B00FC1F17 /* CAAudioValueRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0882EEC917B00FC1F17 /* CAAudioValueRange.cpp */; }; + 8B8AF1112EEC917B00FC1F17 /* CAAudioUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0892EEC917B00FC1F17 /* CAAudioUnit.cpp */; }; + 8B8AF1122EEC917B00FC1F17 /* AUViewLocalizedStringKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF08D2EEC917B00FC1F17 /* AUViewLocalizedStringKeys.h */; }; + 8B8AF1132EEC917B00FC1F17 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF08F2EEC917B00FC1F17 /* ComponentBase.cpp */; }; + 8B8AF1142EEC917B00FC1F17 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0902EEC917B00FC1F17 /* AUScopeElement.cpp */; }; + 8B8AF1152EEC917B00FC1F17 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0912EEC917B00FC1F17 /* ComponentBase.h */; }; + 8B8AF1162EEC917B00FC1F17 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0922EEC917B00FC1F17 /* AUBase.cpp */; }; + 8B8AF1172EEC917B00FC1F17 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0932EEC917B00FC1F17 /* AUInputElement.h */; }; + 8B8AF1182EEC917B00FC1F17 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0942EEC917B00FC1F17 /* AUBase.h */; }; + 8B8AF1192EEC917B00FC1F17 /* AUPlugInDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0952EEC917B00FC1F17 /* AUPlugInDispatch.h */; }; + 8B8AF11A2EEC917B00FC1F17 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0962EEC917B00FC1F17 /* AUDispatch.h */; }; + 8B8AF11B2EEC917B00FC1F17 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0972EEC917B00FC1F17 /* AUOutputElement.cpp */; }; + 8B8AF11D2EEC917B00FC1F17 /* AUPlugInDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0992EEC917B00FC1F17 /* AUPlugInDispatch.cpp */; }; + 8B8AF11E2EEC917B00FC1F17 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF09A2EEC917B00FC1F17 /* AUOutputElement.h */; }; + 8B8AF11F2EEC917B00FC1F17 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF09B2EEC917B00FC1F17 /* AUDispatch.cpp */; }; + 8B8AF1202EEC917B00FC1F17 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF09C2EEC917B00FC1F17 /* AUScopeElement.h */; }; + 8B8AF1212EEC917B00FC1F17 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF09D2EEC917B00FC1F17 /* AUInputElement.cpp */; }; + 8B8AF1222EEC917B00FC1F17 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF09F2EEC917B00FC1F17 /* AUEffectBase.cpp */; }; + 8B8AF1232EEC917B00FC1F17 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A02EEC917B00FC1F17 /* AUEffectBase.h */; }; + 8B8AF1242EEC917B00FC1F17 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A22EEC917B00FC1F17 /* AUTimestampGenerator.h */; }; + 8B8AF1252EEC917B00FC1F17 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0A32EEC917B00FC1F17 /* AUBaseHelper.cpp */; }; + 8B8AF1262EEC917B00FC1F17 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A42EEC917B00FC1F17 /* AUSilentTimeout.h */; }; + 8B8AF1272EEC917B00FC1F17 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A52EEC917B00FC1F17 /* AUInputFormatConverter.h */; }; + 8B8AF1282EEC917B00FC1F17 /* AUTimestampGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0A62EEC917B00FC1F17 /* AUTimestampGenerator.cpp */; }; + 8B8AF1292EEC917B00FC1F17 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AF0A72EEC917B00FC1F17 /* AUBuffer.cpp */; }; + 8B8AF12A2EEC917B00FC1F17 /* AUMIDIDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A82EEC917B00FC1F17 /* AUMIDIDefs.h */; }; + 8B8AF12B2EEC917B00FC1F17 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0A92EEC917B00FC1F17 /* AUBuffer.h */; }; + 8B8AF12C2EEC917B00FC1F17 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AF0AA2EEC917B00FC1F17 /* AUBaseHelper.h */; }; + 8BA05A6B0720730100365D66 /* Dynamics3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* Dynamics3.cpp */; }; + 8BA05A6E0720730100365D66 /* Dynamics3Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* Dynamics3Version.h */; }; + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; }; + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; }; + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; }; + 8BC6025C073B072D006C4272 /* Dynamics3.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* Dynamics3.h */; }; + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + 8B8AF0232EEC917B00FC1F17 /* CAExtAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAExtAudioFile.h; sourceTree = ""; }; + 8B8AF0242EEC917B00FC1F17 /* CACFMachPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMachPort.h; sourceTree = ""; }; + 8B8AF0252EEC917B00FC1F17 /* CABool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABool.h; sourceTree = ""; }; + 8B8AF0262EEC917B00FC1F17 /* CAComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponent.cpp; sourceTree = ""; }; + 8B8AF0272EEC917B00FC1F17 /* CADebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugger.h; sourceTree = ""; }; + 8B8AF0282EEC917B00FC1F17 /* CACFNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFNumber.cpp; sourceTree = ""; }; + 8B8AF0292EEC917B00FC1F17 /* CAGuard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAGuard.h; sourceTree = ""; }; + 8B8AF02A2EEC917B00FC1F17 /* CAAtomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomic.h; sourceTree = ""; }; + 8B8AF02B2EEC917B00FC1F17 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; + 8B8AF02C2EEC917B00FC1F17 /* CACFObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFObject.h; sourceTree = ""; }; + 8B8AF02D2EEC917B00FC1F17 /* CAStreamRangedDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamRangedDescription.h; sourceTree = ""; }; + 8B8AF02E2EEC917B00FC1F17 /* CATokenMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATokenMap.h; sourceTree = ""; }; + 8B8AF02F2EEC917B00FC1F17 /* CAComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponent.h; sourceTree = ""; }; + 8B8AF0302EEC917B00FC1F17 /* CAAudioBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioBufferList.h; sourceTree = ""; }; + 8B8AF0312EEC917B00FC1F17 /* CAAudioUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnit.h; sourceTree = ""; }; + 8B8AF0322EEC917B00FC1F17 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = ""; }; + 8B8AF0332EEC917B00FC1F17 /* CAException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAException.h; sourceTree = ""; }; + 8B8AF0342EEC917B00FC1F17 /* CAAUProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUProcessor.cpp; sourceTree = ""; }; + 8B8AF0352EEC917B00FC1F17 /* CAAUProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUProcessor.h; sourceTree = ""; }; + 8B8AF0362EEC917B00FC1F17 /* CAProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAProcess.h; sourceTree = ""; }; + 8B8AF0372EEC917B00FC1F17 /* CACFDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDictionary.h; sourceTree = ""; }; + 8B8AF0382EEC917B00FC1F17 /* CAPThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPThread.h; sourceTree = ""; }; + 8B8AF0392EEC917B00FC1F17 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = ""; }; + 8B8AF03A2EEC917B00FC1F17 /* CAAudioTimeStamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioTimeStamp.h; sourceTree = ""; }; + 8B8AF03B2EEC917B00FC1F17 /* CAFilePathUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAFilePathUtils.cpp; sourceTree = ""; }; + 8B8AF03C2EEC917B00FC1F17 /* CAAudioValueRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioValueRange.h; sourceTree = ""; }; + 8B8AF03D2EEC917B00FC1F17 /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = ""; }; + 8B8AF03E2EEC917B00FC1F17 /* CAAudioChannelLayoutObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayoutObject.cpp; sourceTree = ""; }; + 8B8AF03F2EEC917B00FC1F17 /* CAGuard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAGuard.cpp; sourceTree = ""; }; + 8B8AF0402EEC917B00FC1F17 /* CACFNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFNumber.h; sourceTree = ""; }; + 8B8AF0412EEC917B00FC1F17 /* CACFDistributedNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDistributedNotification.cpp; sourceTree = ""; }; + 8B8AF0422EEC917B00FC1F17 /* CACFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFString.h; sourceTree = ""; }; + 8B8AF0432EEC917B00FC1F17 /* CAAUMIDIMapManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMapManager.cpp; sourceTree = ""; }; + 8B8AF0442EEC917B00FC1F17 /* CAComponentDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponentDescription.cpp; sourceTree = ""; }; + 8B8AF0452EEC917B00FC1F17 /* CAHostTimeBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAHostTimeBase.h; sourceTree = ""; }; + 8B8AF0462EEC917B00FC1F17 /* CADebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugMacros.cpp; sourceTree = ""; }; + 8B8AF0472EEC917B00FC1F17 /* CAAudioFileFormats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioFileFormats.h; sourceTree = ""; }; + 8B8AF0482EEC917B00FC1F17 /* CAAUMIDIMapManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMapManager.h; sourceTree = ""; }; + 8B8AF0492EEC917B00FC1F17 /* CACFDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDictionary.cpp; sourceTree = ""; }; + 8B8AF04A2EEC917B00FC1F17 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = ""; }; + 8B8AF04B2EEC917B00FC1F17 /* CACFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFString.cpp; sourceTree = ""; }; + 8B8AF04C2EEC917B00FC1F17 /* CASettingsStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASettingsStorage.h; sourceTree = ""; }; + 8B8AF04D2EEC917B00FC1F17 /* CADebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugPrintf.h; sourceTree = ""; }; + 8B8AF04E2EEC917B00FC1F17 /* CAXException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAXException.cpp; sourceTree = ""; }; + 8B8AF04F2EEC917B00FC1F17 /* CAAUMIDIMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMap.h; sourceTree = ""; }; + 8B8AF0502EEC917B00FC1F17 /* AUParamInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUParamInfo.h; sourceTree = ""; }; + 8B8AF0512EEC917B00FC1F17 /* CABitOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABitOperations.h; sourceTree = ""; }; + 8B8AF0522EEC917B00FC1F17 /* CACFPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFPreferences.cpp; sourceTree = ""; }; + 8B8AF0532EEC917B00FC1F17 /* CABundleLocker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABundleLocker.h; sourceTree = ""; }; + 8B8AF0542EEC917B00FC1F17 /* CAPropertyAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPropertyAddress.h; sourceTree = ""; }; + 8B8AF0552EEC917B00FC1F17 /* CAXException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAXException.h; sourceTree = ""; }; + 8B8AF0562EEC917B00FC1F17 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = ""; }; + 8B8AF0572EEC917B00FC1F17 /* CAThreadSafeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAThreadSafeList.h; sourceTree = ""; }; + 8B8AF0582EEC917B00FC1F17 /* CAAudioUnitOutputCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnitOutputCapturer.h; sourceTree = ""; }; + 8B8AF0592EEC917B00FC1F17 /* AUParamInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUParamInfo.cpp; sourceTree = ""; }; + 8B8AF05A2EEC917B00FC1F17 /* CASharedLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASharedLibrary.cpp; sourceTree = ""; }; + 8B8AF05B2EEC917B00FC1F17 /* CAAUMIDIMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMap.cpp; sourceTree = ""; }; + 8B8AF05C2EEC917B00FC1F17 /* CALogMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALogMacros.h; sourceTree = ""; }; + 8B8AF05D2EEC917B00FC1F17 /* CACFMessagePort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMessagePort.cpp; sourceTree = ""; }; + 8B8AF05E2EEC917B00FC1F17 /* CARingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CARingBuffer.h; sourceTree = ""; }; + 8B8AF05F2EEC917B00FC1F17 /* AUOutputBL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputBL.cpp; sourceTree = ""; }; + 8B8AF0602EEC917B00FC1F17 /* CABufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABufferList.h; sourceTree = ""; }; + 8B8AF0612EEC917B00FC1F17 /* CASharedLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASharedLibrary.h; sourceTree = ""; }; + 8B8AF0622EEC917B00FC1F17 /* CACFData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFData.h; sourceTree = ""; }; + 8B8AF0632EEC917B00FC1F17 /* CAStreamRangedDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamRangedDescription.cpp; sourceTree = ""; }; + 8B8AF0642EEC917B00FC1F17 /* CAPThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPThread.cpp; sourceTree = ""; }; + 8B8AF0652EEC917B00FC1F17 /* CAAutoDisposer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAutoDisposer.h; sourceTree = ""; }; + 8B8AF0662EEC917B00FC1F17 /* CACFPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPreferences.h; sourceTree = ""; }; + 8B8AF0672EEC917B00FC1F17 /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = ""; }; + 8B8AF0682EEC917B00FC1F17 /* CAComponentDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponentDescription.h; sourceTree = ""; }; + 8B8AF0692EEC917B00FC1F17 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = ""; }; + 8B8AF06A2EEC917B00FC1F17 /* AUOutputBL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputBL.h; sourceTree = ""; }; + 8B8AF06B2EEC917B00FC1F17 /* CADebugPrintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugPrintf.cpp; sourceTree = ""; }; + 8B8AF06C2EEC917B00FC1F17 /* CARingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CARingBuffer.cpp; sourceTree = ""; }; + 8B8AF06D2EEC917B00FC1F17 /* CACFPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPlugIn.h; sourceTree = ""; }; + 8B8AF06E2EEC917B00FC1F17 /* CASettingsStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASettingsStorage.cpp; sourceTree = ""; }; + 8B8AF06F2EEC917B00FC1F17 /* CAMixMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMixMap.h; sourceTree = ""; }; + 8B8AF0702EEC917B00FC1F17 /* CACFDistributedNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDistributedNotification.h; sourceTree = ""; }; + 8B8AF0712EEC917B00FC1F17 /* CAFilePathUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAFilePathUtils.h; sourceTree = ""; }; + 8B8AF0722EEC917B00FC1F17 /* CATink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATink.h; sourceTree = ""; }; + 8B8AF0732EEC917B00FC1F17 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = ""; }; + 8B8AF0742EEC917B00FC1F17 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = ""; }; + 8B8AF0752EEC917B00FC1F17 /* CAProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAProcess.cpp; sourceTree = ""; }; + 8B8AF0762EEC917B00FC1F17 /* CAHostTimeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAHostTimeBase.cpp; sourceTree = ""; }; + 8B8AF0772EEC917B00FC1F17 /* CAPersistence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPersistence.cpp; sourceTree = ""; }; + 8B8AF0782EEC917B00FC1F17 /* CAAudioBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioBufferList.cpp; sourceTree = ""; }; + 8B8AF0792EEC917B00FC1F17 /* CAAudioTimeStamp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioTimeStamp.cpp; sourceTree = ""; }; + 8B8AF07A2EEC917B00FC1F17 /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = ""; }; + 8B8AF07B2EEC917B00FC1F17 /* CAByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAByteOrder.h; sourceTree = ""; }; + 8B8AF07C2EEC917B00FC1F17 /* CACFArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFArray.h; sourceTree = ""; }; + 8B8AF07D2EEC917B00FC1F17 /* CAAtomicStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomicStack.h; sourceTree = ""; }; + 8B8AF07E2EEC917B00FC1F17 /* CAReferenceCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAReferenceCounted.h; sourceTree = ""; }; + 8B8AF07F2EEC917B00FC1F17 /* CACFMachPort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMachPort.cpp; sourceTree = ""; }; + 8B8AF0802EEC917B00FC1F17 /* CABufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABufferList.cpp; sourceTree = ""; }; + 8B8AF0812EEC917B00FC1F17 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = ""; }; + 8B8AF0822EEC917B00FC1F17 /* CADebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugger.cpp; sourceTree = ""; }; + 8B8AF0832EEC917B00FC1F17 /* CABundleLocker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABundleLocker.cpp; sourceTree = ""; }; + 8B8AF0842EEC917B00FC1F17 /* CAAudioFileFormats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioFileFormats.cpp; sourceTree = ""; }; + 8B8AF0852EEC917B00FC1F17 /* CAMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMath.h; sourceTree = ""; }; + 8B8AF0862EEC917B00FC1F17 /* CACFArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFArray.cpp; sourceTree = ""; }; + 8B8AF0872EEC917B00FC1F17 /* CACFMessagePort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMessagePort.h; sourceTree = ""; }; + 8B8AF0882EEC917B00FC1F17 /* CAAudioValueRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioValueRange.cpp; sourceTree = ""; }; + 8B8AF0892EEC917B00FC1F17 /* CAAudioUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioUnit.cpp; sourceTree = ""; }; + 8B8AF08D2EEC917B00FC1F17 /* AUViewLocalizedStringKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUViewLocalizedStringKeys.h; sourceTree = ""; }; + 8B8AF08F2EEC917B00FC1F17 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = ""; }; + 8B8AF0902EEC917B00FC1F17 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = ""; }; + 8B8AF0912EEC917B00FC1F17 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = ""; }; + 8B8AF0922EEC917B00FC1F17 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = ""; }; + 8B8AF0932EEC917B00FC1F17 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = ""; }; + 8B8AF0942EEC917B00FC1F17 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = ""; }; + 8B8AF0952EEC917B00FC1F17 /* AUPlugInDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUPlugInDispatch.h; sourceTree = ""; }; + 8B8AF0962EEC917B00FC1F17 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = ""; }; + 8B8AF0972EEC917B00FC1F17 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = ""; }; + 8B8AF0982EEC917B00FC1F17 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = ""; }; + 8B8AF0992EEC917B00FC1F17 /* AUPlugInDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUPlugInDispatch.cpp; sourceTree = ""; }; + 8B8AF09A2EEC917B00FC1F17 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = ""; }; + 8B8AF09B2EEC917B00FC1F17 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = ""; }; + 8B8AF09C2EEC917B00FC1F17 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = ""; }; + 8B8AF09D2EEC917B00FC1F17 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = ""; }; + 8B8AF09F2EEC917B00FC1F17 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = ""; }; + 8B8AF0A02EEC917B00FC1F17 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = ""; }; + 8B8AF0A22EEC917B00FC1F17 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = ""; }; + 8B8AF0A32EEC917B00FC1F17 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBaseHelper.cpp; sourceTree = ""; }; + 8B8AF0A42EEC917B00FC1F17 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = ""; }; + 8B8AF0A52EEC917B00FC1F17 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = ""; }; + 8B8AF0A62EEC917B00FC1F17 /* AUTimestampGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUTimestampGenerator.cpp; sourceTree = ""; }; + 8B8AF0A72EEC917B00FC1F17 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = ""; }; + 8B8AF0A82EEC917B00FC1F17 /* AUMIDIDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUMIDIDefs.h; sourceTree = ""; }; + 8B8AF0A92EEC917B00FC1F17 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = ""; }; + 8B8AF0AA2EEC917B00FC1F17 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBaseHelper.h; sourceTree = ""; }; + 8B8AF12D2EEC923400FC1F17 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 8BA05A660720730100365D66 /* Dynamics3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Dynamics3.cpp; sourceTree = ""; }; + 8BA05A670720730100365D66 /* Dynamics3.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = Dynamics3.exp; sourceTree = ""; }; + 8BA05A680720730100365D66 /* Dynamics3.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = Dynamics3.r; sourceTree = ""; }; + 8BA05A690720730100365D66 /* Dynamics3Version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3Version.h; sourceTree = ""; }; + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; + 8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; + 8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; + 8BC6025B073B072D006C4272 /* Dynamics3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3.h; sourceTree = ""; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3.component; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */, + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */, + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Dynamics3 */ = { + isa = PBXGroup; + children = ( + 08FB77ADFE841716C02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + ); + name = Dynamics3; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */, + 8BA05B01072074F900365D66 /* CoreServices.framework */, + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */, + 8BA05AFA072074E100365D66 /* AudioUnit.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8B8AF0212EEC917B00FC1F17 /* CA_SDK */, + 8BA05A56072072A900365D66 /* AU Source */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */, + ); + name = Products; + sourceTree = ""; + }; + 8B8AF0212EEC917B00FC1F17 /* CA_SDK */ = { + isa = PBXGroup; + children = ( + 8B8AF0222EEC917B00FC1F17 /* PublicUtility */, + 8B8AF08A2EEC917B00FC1F17 /* AudioUnits */, + ); + name = CA_SDK; + path = ../../../../CA_SDK; + sourceTree = ""; + }; + 8B8AF0222EEC917B00FC1F17 /* PublicUtility */ = { + isa = PBXGroup; + children = ( + 8B8AF0232EEC917B00FC1F17 /* CAExtAudioFile.h */, + 8B8AF0242EEC917B00FC1F17 /* CACFMachPort.h */, + 8B8AF0252EEC917B00FC1F17 /* CABool.h */, + 8B8AF0262EEC917B00FC1F17 /* CAComponent.cpp */, + 8B8AF0272EEC917B00FC1F17 /* CADebugger.h */, + 8B8AF0282EEC917B00FC1F17 /* CACFNumber.cpp */, + 8B8AF0292EEC917B00FC1F17 /* CAGuard.h */, + 8B8AF02A2EEC917B00FC1F17 /* CAAtomic.h */, + 8B8AF02B2EEC917B00FC1F17 /* CAStreamBasicDescription.h */, + 8B8AF02C2EEC917B00FC1F17 /* CACFObject.h */, + 8B8AF02D2EEC917B00FC1F17 /* CAStreamRangedDescription.h */, + 8B8AF02E2EEC917B00FC1F17 /* CATokenMap.h */, + 8B8AF02F2EEC917B00FC1F17 /* CAComponent.h */, + 8B8AF0302EEC917B00FC1F17 /* CAAudioBufferList.h */, + 8B8AF0312EEC917B00FC1F17 /* CAAudioUnit.h */, + 8B8AF0322EEC917B00FC1F17 /* CAAUParameter.h */, + 8B8AF0332EEC917B00FC1F17 /* CAException.h */, + 8B8AF0342EEC917B00FC1F17 /* CAAUProcessor.cpp */, + 8B8AF0352EEC917B00FC1F17 /* CAAUProcessor.h */, + 8B8AF0362EEC917B00FC1F17 /* CAProcess.h */, + 8B8AF0372EEC917B00FC1F17 /* CACFDictionary.h */, + 8B8AF0382EEC917B00FC1F17 /* CAPThread.h */, + 8B8AF0392EEC917B00FC1F17 /* CAAUParameter.cpp */, + 8B8AF03A2EEC917B00FC1F17 /* CAAudioTimeStamp.h */, + 8B8AF03B2EEC917B00FC1F17 /* CAFilePathUtils.cpp */, + 8B8AF03C2EEC917B00FC1F17 /* CAAudioValueRange.h */, + 8B8AF03D2EEC917B00FC1F17 /* CAVectorUnitTypes.h */, + 8B8AF03E2EEC917B00FC1F17 /* CAAudioChannelLayoutObject.cpp */, + 8B8AF03F2EEC917B00FC1F17 /* CAGuard.cpp */, + 8B8AF0402EEC917B00FC1F17 /* CACFNumber.h */, + 8B8AF0412EEC917B00FC1F17 /* CACFDistributedNotification.cpp */, + 8B8AF0422EEC917B00FC1F17 /* CACFString.h */, + 8B8AF0432EEC917B00FC1F17 /* CAAUMIDIMapManager.cpp */, + 8B8AF0442EEC917B00FC1F17 /* CAComponentDescription.cpp */, + 8B8AF0452EEC917B00FC1F17 /* CAHostTimeBase.h */, + 8B8AF0462EEC917B00FC1F17 /* CADebugMacros.cpp */, + 8B8AF0472EEC917B00FC1F17 /* CAAudioFileFormats.h */, + 8B8AF0482EEC917B00FC1F17 /* CAAUMIDIMapManager.h */, + 8B8AF0492EEC917B00FC1F17 /* CACFDictionary.cpp */, + 8B8AF04A2EEC917B00FC1F17 /* CAMutex.h */, + 8B8AF04B2EEC917B00FC1F17 /* CACFString.cpp */, + 8B8AF04C2EEC917B00FC1F17 /* CASettingsStorage.h */, + 8B8AF04D2EEC917B00FC1F17 /* CADebugPrintf.h */, + 8B8AF04E2EEC917B00FC1F17 /* CAXException.cpp */, + 8B8AF04F2EEC917B00FC1F17 /* CAAUMIDIMap.h */, + 8B8AF0502EEC917B00FC1F17 /* AUParamInfo.h */, + 8B8AF0512EEC917B00FC1F17 /* CABitOperations.h */, + 8B8AF0522EEC917B00FC1F17 /* CACFPreferences.cpp */, + 8B8AF0532EEC917B00FC1F17 /* CABundleLocker.h */, + 8B8AF0542EEC917B00FC1F17 /* CAPropertyAddress.h */, + 8B8AF0552EEC917B00FC1F17 /* CAXException.h */, + 8B8AF0562EEC917B00FC1F17 /* CAAudioChannelLayout.cpp */, + 8B8AF0572EEC917B00FC1F17 /* CAThreadSafeList.h */, + 8B8AF0582EEC917B00FC1F17 /* CAAudioUnitOutputCapturer.h */, + 8B8AF0592EEC917B00FC1F17 /* AUParamInfo.cpp */, + 8B8AF05A2EEC917B00FC1F17 /* CASharedLibrary.cpp */, + 8B8AF05B2EEC917B00FC1F17 /* CAAUMIDIMap.cpp */, + 8B8AF05C2EEC917B00FC1F17 /* CALogMacros.h */, + 8B8AF05D2EEC917B00FC1F17 /* CACFMessagePort.cpp */, + 8B8AF05E2EEC917B00FC1F17 /* CARingBuffer.h */, + 8B8AF05F2EEC917B00FC1F17 /* AUOutputBL.cpp */, + 8B8AF0602EEC917B00FC1F17 /* CABufferList.h */, + 8B8AF0612EEC917B00FC1F17 /* CASharedLibrary.h */, + 8B8AF0622EEC917B00FC1F17 /* CACFData.h */, + 8B8AF0632EEC917B00FC1F17 /* CAStreamRangedDescription.cpp */, + 8B8AF0642EEC917B00FC1F17 /* CAPThread.cpp */, + 8B8AF0652EEC917B00FC1F17 /* CAAutoDisposer.h */, + 8B8AF0662EEC917B00FC1F17 /* CACFPreferences.h */, + 8B8AF0672EEC917B00FC1F17 /* CAVectorUnit.cpp */, + 8B8AF0682EEC917B00FC1F17 /* CAComponentDescription.h */, + 8B8AF0692EEC917B00FC1F17 /* CADebugMacros.h */, + 8B8AF06A2EEC917B00FC1F17 /* AUOutputBL.h */, + 8B8AF06B2EEC917B00FC1F17 /* CADebugPrintf.cpp */, + 8B8AF06C2EEC917B00FC1F17 /* CARingBuffer.cpp */, + 8B8AF06D2EEC917B00FC1F17 /* CACFPlugIn.h */, + 8B8AF06E2EEC917B00FC1F17 /* CASettingsStorage.cpp */, + 8B8AF06F2EEC917B00FC1F17 /* CAMixMap.h */, + 8B8AF0702EEC917B00FC1F17 /* CACFDistributedNotification.h */, + 8B8AF0712EEC917B00FC1F17 /* CAFilePathUtils.h */, + 8B8AF0722EEC917B00FC1F17 /* CATink.h */, + 8B8AF0732EEC917B00FC1F17 /* CAStreamBasicDescription.cpp */, + 8B8AF0742EEC917B00FC1F17 /* CAAudioChannelLayout.h */, + 8B8AF0752EEC917B00FC1F17 /* CAProcess.cpp */, + 8B8AF0762EEC917B00FC1F17 /* CAHostTimeBase.cpp */, + 8B8AF0772EEC917B00FC1F17 /* CAPersistence.cpp */, + 8B8AF0782EEC917B00FC1F17 /* CAAudioBufferList.cpp */, + 8B8AF0792EEC917B00FC1F17 /* CAAudioTimeStamp.cpp */, + 8B8AF07A2EEC917B00FC1F17 /* CAVectorUnit.h */, + 8B8AF07B2EEC917B00FC1F17 /* CAByteOrder.h */, + 8B8AF07C2EEC917B00FC1F17 /* CACFArray.h */, + 8B8AF07D2EEC917B00FC1F17 /* CAAtomicStack.h */, + 8B8AF07E2EEC917B00FC1F17 /* CAReferenceCounted.h */, + 8B8AF07F2EEC917B00FC1F17 /* CACFMachPort.cpp */, + 8B8AF0802EEC917B00FC1F17 /* CABufferList.cpp */, + 8B8AF0812EEC917B00FC1F17 /* CAMutex.cpp */, + 8B8AF0822EEC917B00FC1F17 /* CADebugger.cpp */, + 8B8AF0832EEC917B00FC1F17 /* CABundleLocker.cpp */, + 8B8AF0842EEC917B00FC1F17 /* CAAudioFileFormats.cpp */, + 8B8AF0852EEC917B00FC1F17 /* CAMath.h */, + 8B8AF0862EEC917B00FC1F17 /* CACFArray.cpp */, + 8B8AF0872EEC917B00FC1F17 /* CACFMessagePort.h */, + 8B8AF0882EEC917B00FC1F17 /* CAAudioValueRange.cpp */, + 8B8AF0892EEC917B00FC1F17 /* CAAudioUnit.cpp */, + ); + path = PublicUtility; + sourceTree = ""; + }; + 8B8AF08A2EEC917B00FC1F17 /* AudioUnits */ = { + isa = PBXGroup; + children = ( + 8B8AF08B2EEC917B00FC1F17 /* AUPublic */, + ); + path = AudioUnits; + sourceTree = ""; + }; + 8B8AF08B2EEC917B00FC1F17 /* AUPublic */ = { + isa = PBXGroup; + children = ( + 8B8AF08C2EEC917B00FC1F17 /* AUViewBase */, + 8B8AF08E2EEC917B00FC1F17 /* AUBase */, + 8B8AF09E2EEC917B00FC1F17 /* OtherBases */, + 8B8AF0A12EEC917B00FC1F17 /* Utility */, + ); + path = AUPublic; + sourceTree = ""; + }; + 8B8AF08C2EEC917B00FC1F17 /* AUViewBase */ = { + isa = PBXGroup; + children = ( + 8B8AF08D2EEC917B00FC1F17 /* AUViewLocalizedStringKeys.h */, + ); + path = AUViewBase; + sourceTree = ""; + }; + 8B8AF08E2EEC917B00FC1F17 /* AUBase */ = { + isa = PBXGroup; + children = ( + 8B8AF08F2EEC917B00FC1F17 /* ComponentBase.cpp */, + 8B8AF0902EEC917B00FC1F17 /* AUScopeElement.cpp */, + 8B8AF0912EEC917B00FC1F17 /* ComponentBase.h */, + 8B8AF0922EEC917B00FC1F17 /* AUBase.cpp */, + 8B8AF0932EEC917B00FC1F17 /* AUInputElement.h */, + 8B8AF0942EEC917B00FC1F17 /* AUBase.h */, + 8B8AF0952EEC917B00FC1F17 /* AUPlugInDispatch.h */, + 8B8AF0962EEC917B00FC1F17 /* AUDispatch.h */, + 8B8AF0972EEC917B00FC1F17 /* AUOutputElement.cpp */, + 8B8AF0982EEC917B00FC1F17 /* AUResources.r */, + 8B8AF0992EEC917B00FC1F17 /* AUPlugInDispatch.cpp */, + 8B8AF09A2EEC917B00FC1F17 /* AUOutputElement.h */, + 8B8AF09B2EEC917B00FC1F17 /* AUDispatch.cpp */, + 8B8AF09C2EEC917B00FC1F17 /* AUScopeElement.h */, + 8B8AF09D2EEC917B00FC1F17 /* AUInputElement.cpp */, + ); + path = AUBase; + sourceTree = ""; + }; + 8B8AF09E2EEC917B00FC1F17 /* OtherBases */ = { + isa = PBXGroup; + children = ( + 8B8AF09F2EEC917B00FC1F17 /* AUEffectBase.cpp */, + 8B8AF0A02EEC917B00FC1F17 /* AUEffectBase.h */, + ); + path = OtherBases; + sourceTree = ""; + }; + 8B8AF0A12EEC917B00FC1F17 /* Utility */ = { + isa = PBXGroup; + children = ( + 8B8AF0A22EEC917B00FC1F17 /* AUTimestampGenerator.h */, + 8B8AF0A32EEC917B00FC1F17 /* AUBaseHelper.cpp */, + 8B8AF0A42EEC917B00FC1F17 /* AUSilentTimeout.h */, + 8B8AF0A52EEC917B00FC1F17 /* AUInputFormatConverter.h */, + 8B8AF0A62EEC917B00FC1F17 /* AUTimestampGenerator.cpp */, + 8B8AF0A72EEC917B00FC1F17 /* AUBuffer.cpp */, + 8B8AF0A82EEC917B00FC1F17 /* AUMIDIDefs.h */, + 8B8AF0A92EEC917B00FC1F17 /* AUBuffer.h */, + 8B8AF0AA2EEC917B00FC1F17 /* AUBaseHelper.h */, + ); + path = Utility; + sourceTree = ""; + }; + 8BA05A56072072A900365D66 /* AU Source */ = { + isa = PBXGroup; + children = ( + 8BC6025B073B072D006C4272 /* Dynamics3.h */, + 8BA05A660720730100365D66 /* Dynamics3.cpp */, + 8BA05A670720730100365D66 /* Dynamics3.exp */, + 8BA05A680720730100365D66 /* Dynamics3.r */, + 8BA05A690720730100365D66 /* Dynamics3Version.h */, + ); + name = "AU Source"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B8AF0DB2EEC917B00FC1F17 /* CABundleLocker.h in Headers */, + 8B8AF0FC2EEC917B00FC1F17 /* CAAudioChannelLayout.h in Headers */, + 8B8AF0F22EEC917B00FC1F17 /* AUOutputBL.h in Headers */, + 8B8AF0CD2EEC917B00FC1F17 /* CAHostTimeBase.h in Headers */, + 8B8AF1152EEC917B00FC1F17 /* ComponentBase.h in Headers */, + 8B8AF1052EEC917B00FC1F17 /* CAAtomicStack.h in Headers */, + 8B8AF0C22EEC917B00FC1F17 /* CAAudioTimeStamp.h in Headers */, + 8B8AF0DF2EEC917B00FC1F17 /* CAThreadSafeList.h in Headers */, + 8B8AF0BA2EEC917B00FC1F17 /* CAAUParameter.h in Headers */, + 8B8AF12C2EEC917B00FC1F17 /* AUBaseHelper.h in Headers */, + 8B8AF1242EEC917B00FC1F17 /* AUTimestampGenerator.h in Headers */, + 8B8AF0D52EEC917B00FC1F17 /* CADebugPrintf.h in Headers */, + 8B8AF10F2EEC917B00FC1F17 /* CACFMessagePort.h in Headers */, + 8B8AF0BD2EEC917B00FC1F17 /* CAAUProcessor.h in Headers */, + 8B8AF0B92EEC917B00FC1F17 /* CAAudioUnit.h in Headers */, + 8B8AF1122EEC917B00FC1F17 /* AUViewLocalizedStringKeys.h in Headers */, + 8B8AF0F82EEC917B00FC1F17 /* CACFDistributedNotification.h in Headers */, + 8B8AF0B72EEC917B00FC1F17 /* CAComponent.h in Headers */, + 8B8AF0C52EEC917B00FC1F17 /* CAVectorUnitTypes.h in Headers */, + 8BA05A6E0720730100365D66 /* Dynamics3Version.h in Headers */, + 8B8AF0F92EEC917B00FC1F17 /* CAFilePathUtils.h in Headers */, + 8B8AF0BB2EEC917B00FC1F17 /* CAException.h in Headers */, + 8B8AF0B22EEC917B00FC1F17 /* CAAtomic.h in Headers */, + 8B8AF0B12EEC917B00FC1F17 /* CAGuard.h in Headers */, + 8B8AF1172EEC917B00FC1F17 /* AUInputElement.h in Headers */, + 8B8AF0EE2EEC917B00FC1F17 /* CACFPreferences.h in Headers */, + 8B8AF1032EEC917B00FC1F17 /* CAByteOrder.h in Headers */, + 8B8AF0E62EEC917B00FC1F17 /* CARingBuffer.h in Headers */, + 8B8AF0AD2EEC917B00FC1F17 /* CABool.h in Headers */, + 8B8AF0D22EEC917B00FC1F17 /* CAMutex.h in Headers */, + 8B8AF1182EEC917B00FC1F17 /* AUBase.h in Headers */, + 8BC6025C073B072D006C4272 /* Dynamics3.h in Headers */, + 8B8AF0CA2EEC917B00FC1F17 /* CACFString.h in Headers */, + 8B8AF0E92EEC917B00FC1F17 /* CASharedLibrary.h in Headers */, + 8B8AF0B62EEC917B00FC1F17 /* CATokenMap.h in Headers */, + 8B8AF0AB2EEC917B00FC1F17 /* CAExtAudioFile.h in Headers */, + 8B8AF0C02EEC917B00FC1F17 /* CAPThread.h in Headers */, + 8B8AF0DC2EEC917B00FC1F17 /* CAPropertyAddress.h in Headers */, + 8B8AF1062EEC917B00FC1F17 /* CAReferenceCounted.h in Headers */, + 8B8AF12B2EEC917B00FC1F17 /* AUBuffer.h in Headers */, + 8B8AF10D2EEC917B00FC1F17 /* CAMath.h in Headers */, + 8B8AF0ED2EEC917B00FC1F17 /* CAAutoDisposer.h in Headers */, + 8B8AF0B42EEC917B00FC1F17 /* CACFObject.h in Headers */, + 8B8AF0D42EEC917B00FC1F17 /* CASettingsStorage.h in Headers */, + 8B8AF0DD2EEC917B00FC1F17 /* CAXException.h in Headers */, + 8B8AF0FA2EEC917B00FC1F17 /* CATink.h in Headers */, + 8B8AF1272EEC917B00FC1F17 /* AUInputFormatConverter.h in Headers */, + 8B8AF1022EEC917B00FC1F17 /* CAVectorUnit.h in Headers */, + 8B8AF0BE2EEC917B00FC1F17 /* CAProcess.h in Headers */, + 8B8AF0C42EEC917B00FC1F17 /* CAAudioValueRange.h in Headers */, + 8B8AF0D92EEC917B00FC1F17 /* CABitOperations.h in Headers */, + 8B8AF0CF2EEC917B00FC1F17 /* CAAudioFileFormats.h in Headers */, + 8B8AF0C82EEC917B00FC1F17 /* CACFNumber.h in Headers */, + 8B8AF0E02EEC917B00FC1F17 /* CAAudioUnitOutputCapturer.h in Headers */, + 8B8AF0F12EEC917B00FC1F17 /* CADebugMacros.h in Headers */, + 8B8AF12A2EEC917B00FC1F17 /* AUMIDIDefs.h in Headers */, + 8B8AF0EA2EEC917B00FC1F17 /* CACFData.h in Headers */, + 8B8AF0B32EEC917B00FC1F17 /* CAStreamBasicDescription.h in Headers */, + 8B8AF1192EEC917B00FC1F17 /* AUPlugInDispatch.h in Headers */, + 8B8AF0B52EEC917B00FC1F17 /* CAStreamRangedDescription.h in Headers */, + 8B8AF0F52EEC917B00FC1F17 /* CACFPlugIn.h in Headers */, + 8B8AF0B82EEC917B00FC1F17 /* CAAudioBufferList.h in Headers */, + 8B8AF0D02EEC917B00FC1F17 /* CAAUMIDIMapManager.h in Headers */, + 8B8AF1232EEC917B00FC1F17 /* AUEffectBase.h in Headers */, + 8B8AF0BF2EEC917B00FC1F17 /* CACFDictionary.h in Headers */, + 8B8AF1202EEC917B00FC1F17 /* AUScopeElement.h in Headers */, + 8B8AF0F02EEC917B00FC1F17 /* CAComponentDescription.h in Headers */, + 8B8AF1262EEC917B00FC1F17 /* AUSilentTimeout.h in Headers */, + 8B8AF0E82EEC917B00FC1F17 /* CABufferList.h in Headers */, + 8B8AF11A2EEC917B00FC1F17 /* AUDispatch.h in Headers */, + 8B8AF11E2EEC917B00FC1F17 /* AUOutputElement.h in Headers */, + 8B8AF0E42EEC917B00FC1F17 /* CALogMacros.h in Headers */, + 8B8AF0D82EEC917B00FC1F17 /* AUParamInfo.h in Headers */, + 8B8AF0F72EEC917B00FC1F17 /* CAMixMap.h in Headers */, + 8B8AF1042EEC917B00FC1F17 /* CACFArray.h in Headers */, + 8B8AF0AC2EEC917B00FC1F17 /* CACFMachPort.h in Headers */, + 8B8AF0D72EEC917B00FC1F17 /* CAAUMIDIMap.h in Headers */, + 8B8AF0AF2EEC917B00FC1F17 /* CADebugger.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 8D01CCCD0486CAD60068D4B7 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = Dynamics3; + productReference = 8D01CCD20486CAD60068D4B7 /* Dynamics3.component */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1420; + }; + buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = en; + hasScannedForEncodings = 1; + knownRegions = ( + ja, + Base, + en, + fr, + de, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Dynamics3 */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B8AF0E72EEC917B00FC1F17 /* AUOutputBL.cpp in Sources */, + 8B8AF10C2EEC917B00FC1F17 /* CAAudioFileFormats.cpp in Sources */, + 8B8AF0FE2EEC917B00FC1F17 /* CAHostTimeBase.cpp in Sources */, + 8B8AF0D62EEC917B00FC1F17 /* CAXException.cpp in Sources */, + 8B8AF1002EEC917B00FC1F17 /* CAAudioBufferList.cpp in Sources */, + 8B8AF0C32EEC917B00FC1F17 /* CAFilePathUtils.cpp in Sources */, + 8B8AF0C12EEC917B00FC1F17 /* CAAUParameter.cpp in Sources */, + 8B8AF0E32EEC917B00FC1F17 /* CAAUMIDIMap.cpp in Sources */, + 8B8AF1102EEC917B00FC1F17 /* CAAudioValueRange.cpp in Sources */, + 8B8AF11F2EEC917B00FC1F17 /* AUDispatch.cpp in Sources */, + 8B8AF0DA2EEC917B00FC1F17 /* CACFPreferences.cpp in Sources */, + 8B8AF11D2EEC917B00FC1F17 /* AUPlugInDispatch.cpp in Sources */, + 8B8AF0BC2EEC917B00FC1F17 /* CAAUProcessor.cpp in Sources */, + 8B8AF0D12EEC917B00FC1F17 /* CACFDictionary.cpp in Sources */, + 8B8AF1252EEC917B00FC1F17 /* AUBaseHelper.cpp in Sources */, + 8B8AF10A2EEC917B00FC1F17 /* CADebugger.cpp in Sources */, + 8B8AF0DE2EEC917B00FC1F17 /* CAAudioChannelLayout.cpp in Sources */, + 8B8AF0E12EEC917B00FC1F17 /* AUParamInfo.cpp in Sources */, + 8B8AF0FF2EEC917B00FC1F17 /* CAPersistence.cpp in Sources */, + 8B8AF0F32EEC917B00FC1F17 /* CADebugPrintf.cpp in Sources */, + 8B8AF1282EEC917B00FC1F17 /* AUTimestampGenerator.cpp in Sources */, + 8B8AF0FB2EEC917B00FC1F17 /* CAStreamBasicDescription.cpp in Sources */, + 8B8AF0CB2EEC917B00FC1F17 /* CAAUMIDIMapManager.cpp in Sources */, + 8B8AF0F62EEC917B00FC1F17 /* CASettingsStorage.cpp in Sources */, + 8B8AF11B2EEC917B00FC1F17 /* AUOutputElement.cpp in Sources */, + 8B8AF0C72EEC917B00FC1F17 /* CAGuard.cpp in Sources */, + 8BA05A6B0720730100365D66 /* Dynamics3.cpp in Sources */, + 8B8AF1092EEC917B00FC1F17 /* CAMutex.cpp in Sources */, + 8B8AF1222EEC917B00FC1F17 /* AUEffectBase.cpp in Sources */, + 8B8AF1072EEC917B00FC1F17 /* CACFMachPort.cpp in Sources */, + 8B8AF1162EEC917B00FC1F17 /* AUBase.cpp in Sources */, + 8B8AF0E22EEC917B00FC1F17 /* CASharedLibrary.cpp in Sources */, + 8B8AF0C92EEC917B00FC1F17 /* CACFDistributedNotification.cpp in Sources */, + 8B8AF0CC2EEC917B00FC1F17 /* CAComponentDescription.cpp in Sources */, + 8B8AF0D32EEC917B00FC1F17 /* CACFString.cpp in Sources */, + 8B8AF1132EEC917B00FC1F17 /* ComponentBase.cpp in Sources */, + 8B8AF0F42EEC917B00FC1F17 /* CARingBuffer.cpp in Sources */, + 8B8AF1142EEC917B00FC1F17 /* AUScopeElement.cpp in Sources */, + 8B8AF1112EEC917B00FC1F17 /* CAAudioUnit.cpp in Sources */, + 8B8AF10E2EEC917B00FC1F17 /* CACFArray.cpp in Sources */, + 8B8AF10B2EEC917B00FC1F17 /* CABundleLocker.cpp in Sources */, + 8B8AF0FD2EEC917B00FC1F17 /* CAProcess.cpp in Sources */, + 8B8AF0EB2EEC917B00FC1F17 /* CAStreamRangedDescription.cpp in Sources */, + 8B8AF0EC2EEC917B00FC1F17 /* CAPThread.cpp in Sources */, + 8B8AF0AE2EEC917B00FC1F17 /* CAComponent.cpp in Sources */, + 8B8AF0C62EEC917B00FC1F17 /* CAAudioChannelLayoutObject.cpp in Sources */, + 8B8AF1012EEC917B00FC1F17 /* CAAudioTimeStamp.cpp in Sources */, + 8B8AF1082EEC917B00FC1F17 /* CABufferList.cpp in Sources */, + 8B8AF0E52EEC917B00FC1F17 /* CACFMessagePort.cpp in Sources */, + 8B8AF0EF2EEC917B00FC1F17 /* CAVectorUnit.cpp in Sources */, + 8B8AF1212EEC917B00FC1F17 /* AUInputElement.cpp in Sources */, + 8B8AF1292EEC917B00FC1F17 /* AUBuffer.cpp in Sources */, + 8B8AF0CE2EEC917B00FC1F17 /* CADebugMacros.cpp in Sources */, + 8B8AF0B02EEC917B00FC1F17 /* CACFNumber.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 8B8AF12D2EEC923400FC1F17 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3E4BA244089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + EXPORTED_SYMBOLS_FILE = Dynamics3.exp; + GCC_OPTIMIZATION_LEVEL = 0; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}"; + PRODUCT_NAME = Dynamics3; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + STRIP_STYLE = debugging; + WRAPPER_EXTENSION = component; + }; + name = Debug; + }; + 3E4BA245089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + EXPORTED_SYMBOLS_FILE = Dynamics3.exp; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}"; + PRODUCT_NAME = Dynamics3; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = debugging; + WRAPPER_EXTENSION = component; + }; + name = Release; + }; + 3E4BA248089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + 3E4BA249089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA244089833B7007656EC /* Debug */, + 3E4BA245089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA248089833B7007656EC /* Debug */, + 3E4BA249089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..456c821962337cd968aedff6470daca762273cb2 GIT binary patch literal 17960 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 literal 0 HcmV?d00001 diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme new file mode 100644 index 000000000..98c774869 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..f521af0e1 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Dynamics3.xcscheme_^#shared#^_ + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacSignedAU/Dynamics3/Dynamics3Version.h b/plugins/MacSignedAU/Dynamics3/Dynamics3Version.h new file mode 100755 index 000000000..56e1fa237 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Dynamics3Version.h @@ -0,0 +1,58 @@ +/* +* File: Dynamics3Version.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#ifndef __Dynamics3Version_h__ +#define __Dynamics3Version_h__ + + +#ifdef DEBUG + #define kDynamics3Version 0xFFFFFFFF +#else + #define kDynamics3Version 0x00010000 +#endif + +//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~// +#define Dynamics3_COMP_MANF 'Dthr' +#define Dynamics3_COMP_SUBTYPE 'dyn3' +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + +#endif + diff --git a/plugins/MacSignedAU/Dynamics3/Info.plist b/plugins/MacSignedAU/Dynamics3/Info.plist new file mode 100755 index 000000000..c3cf24378 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/Info.plist @@ -0,0 +1,47 @@ + + + + + AudioComponents + + + description + ${PRODUCT_NAME:identifier} AU + factoryFunction + ${PRODUCT_NAME:identifier}Factory + manufacturer + Dthr + name + Airwindows: ${PRODUCT_NAME:identifier} + subtype + dyn3 + type + aufx + version + 65536 + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECTNAMEASIDENTIFIER} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + Dthr + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacSignedAU/Dynamics3/StarterAU_Prefix.pch b/plugins/MacSignedAU/Dynamics3/StarterAU_Prefix.pch new file mode 100755 index 000000000..c03b5f684 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/StarterAU_Prefix.pch @@ -0,0 +1,5 @@ +// +// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project. +// + +#include diff --git a/plugins/MacSignedAU/Dynamics3/en.lproj/InfoPlist.strings b/plugins/MacSignedAU/Dynamics3/en.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..0bdb43f79837060b9189c2801724b12cdb140f7e GIT binary patch literal 382 zcmZ{g%@4sq5XIlwU$Jp?(AGyH#Gxugf{Vmmv}n*u>m&T}_;n=`K{h)x`{vEen|<6J zRb(_)s-+g%Db`JqLa;MFQx1|U!5jPvJL0t>uIgautRu} zru5(Ajk?^j`tTEr#mvrC2kZQ(n`y(ej4AUEMKh2Lb&1yRo*t^)KYfN&AK&VKRevio x=qt8ssjY@;M7}22;zx`;jsxmi+XM;79N4SSwMKVQ>l0_XSfwHP3%kBHeFEQ$Kb-&o literal 0 HcmV?d00001 diff --git a/plugins/MacSignedAU/Dynamics3/version.plist b/plugins/MacSignedAU/Dynamics3/version.plist new file mode 100755 index 000000000..11edf8a1b --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 3 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + ${EXECUTABLE_NAME} + SourceVersion + 590000 + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.cpp b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.cpp new file mode 100755 index 000000000..c42aa7068 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.cpp @@ -0,0 +1,258 @@ +/* +* File: Dynamics3Mono.cpp +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +/*============================================================================= + Dynamics3Mono.cpp + +=============================================================================*/ +#include "Dynamics3Mono.h" + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +AUDIOCOMPONENT_ENTRY(AUBaseFactory, Dynamics3Mono) + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3Mono +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Dynamics3Mono::Dynamics3Mono(AudioUnit component) + : AUEffectBase(component) +{ + CreateElements(); + Globals()->UseIndexedParameters(kNumberOfParameters); + SetParameter(kParam_A, kDefaultValue_ParamA ); + SetParameter(kParam_B, kDefaultValue_ParamB ); + SetParameter(kParam_C, kDefaultValue_ParamC ); + SetParameter(kParam_D, kDefaultValue_ParamD ); + +#if AU_DEBUG_DISPATCHER + mDebugDispatcher = new AUDebugDispatcher (this); +#endif + +} + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetParameterValueStrings +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings) +{ + + return kAudioUnitErr_InvalidProperty; +} + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetParameterInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo ) +{ + ComponentResult result = noErr; + + outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable + | kAudioUnitParameterFlag_IsReadable; + + if (inScope == kAudioUnitScope_Global) { + switch(inParameterID) + { + case kParam_A: + AUBase::FillInParameterName (outParameterInfo, kParameterAName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamA; + break; + case kParam_B: + AUBase::FillInParameterName (outParameterInfo, kParameterBName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamB; + break; + case kParam_C: + AUBase::FillInParameterName (outParameterInfo, kParameterCName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamC; + break; + case kParam_D: + AUBase::FillInParameterName (outParameterInfo, kParameterDName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamD; + break; + default: + result = kAudioUnitErr_InvalidParameter; + break; + } + } else { + result = kAudioUnitErr_InvalidParameter; + } + + + + return result; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetPropertyInfo +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetPropertyInfo (AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable) +{ + return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable); +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::GetProperty +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::GetProperty( AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData ) +{ + return AUEffectBase::GetProperty (inID, inScope, inElement, outData); +} + +// Dynamics3Mono::Initialize +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ComponentResult Dynamics3Mono::Initialize() +{ + ComponentResult result = AUEffectBase::Initialize(); + if (result == noErr) + Reset(kAudioUnitScope_Global, 0); + return result; +} + +#pragma mark ____Dynamics3MonoEffectKernel + + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3MonoKernel::Reset() +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void Dynamics3Mono::Dynamics3MonoKernel::Reset() +{ + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; +} + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Dynamics3Mono::Dynamics3MonoKernel::Process +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void Dynamics3Mono::Dynamics3MonoKernel::Process( const Float32 *inSourceP, + Float32 *inDestP, + UInt32 inFramesToProcess, + UInt32 inNumChannels, + bool &ioSilence ) +{ + UInt32 nSampleFrames = inFramesToProcess; + const Float32 *sourceP = inSourceP; + Float32 *destP = inDestP; + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= GetSampleRate(); + + double bezThresh = pow(1.0-GetParameter( kParam_A ), 4.0) * 8.0; + double bezRez = pow(1.0-GetParameter( kParam_B ), 4.0) / overallscale; + double sloRez = pow(1.0-GetParameter( kParam_C ), 4.0) / overallscale; + double gate = pow(GetParameter( kParam_D ),4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (nSampleFrames-- > 0) { + double inputSample = *sourceP; + if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; + + if (fabs(inputSample) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSample *= (bezThresh+1.0); + } + + double ctrl = fabs(inputSample); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) inputSample *= 1.0-(fmin(CBA*bezThresh,1.0)); + + //begin 32 bit floating point dither + int expon; frexpf((float)inputSample, &expon); + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + inputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit floating point dither + + *destP = inputSample; + + sourceP += inNumChannels; destP += inNumChannels; + } +} + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.exp b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.exp new file mode 100755 index 000000000..2a1cb28e5 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.exp @@ -0,0 +1,2 @@ +_Dynamics3MonoEntry +_Dynamics3MonoFactory diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.h b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.h new file mode 100755 index 000000000..dad4af3de --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.h @@ -0,0 +1,156 @@ +/* +* File: Dynamics3Mono.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include "AUEffectBase.h" +#include "Dynamics3MonoVersion.h" + +#if AU_DEBUG_DISPATCHER + #include "AUDebugDispatcher.h" +#endif + + +#ifndef __Dynamics3Mono_h__ +#define __Dynamics3Mono_h__ + + +#pragma mark ____Dynamics3Mono Parameters + +// parameters +static const float kDefaultValue_ParamA = 1.0; +static const float kDefaultValue_ParamB = 0.5; +static const float kDefaultValue_ParamC = 0.5; +static const float kDefaultValue_ParamD = 0.0; + +static CFStringRef kParameterAName = CFSTR("Thresh"); +static CFStringRef kParameterBName = CFSTR("Attack"); +static CFStringRef kParameterCName = CFSTR("Release"); +static CFStringRef kParameterDName = CFSTR("Gate"); + +enum { + kParam_A =0, + kParam_B =1, + kParam_C =2, + kParam_D =3, + //Add your parameters here... + kNumberOfParameters=4 +}; + +#pragma mark ____Dynamics3Mono +class Dynamics3Mono : public AUEffectBase +{ +public: + Dynamics3Mono(AudioUnit component); +#if AU_DEBUG_DISPATCHER + virtual ~Dynamics3Mono () { delete mDebugDispatcher; } +#endif + + virtual AUKernelBase * NewKernel() { return new Dynamics3MonoKernel(this); } + + virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + CFArrayRef * outStrings); + + virtual ComponentResult GetParameterInfo(AudioUnitScope inScope, + AudioUnitParameterID inParameterID, + AudioUnitParameterInfo &outParameterInfo); + + virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + UInt32 & outDataSize, + Boolean & outWritable ); + + virtual ComponentResult GetProperty(AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement, + void * outData); + + virtual ComponentResult Initialize(); + virtual bool SupportsTail () { return true; } + virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples + virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples + + /*! @method Version */ + virtual ComponentResult Version() { return kDynamics3MonoVersion; } + + + +protected: + class Dynamics3MonoKernel : public AUKernelBase // most of the real work happens here + { +public: + Dynamics3MonoKernel(AUEffectBase *inAudioUnit ) + : AUKernelBase(inAudioUnit) + { + } + + // *Required* overides for the process method for this effect + // processes one channel of interleaved samples + virtual void Process( const Float32 *inSourceP, + Float32 *inDestP, + UInt32 inFramesToProcess, + UInt32 inNumChannels, + bool &ioSilence); + + virtual void Reset(); + + private: + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpd; + }; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +#endif \ No newline at end of file diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.r b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.r new file mode 100755 index 000000000..25b0ce452 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.r @@ -0,0 +1,61 @@ +/* +* File: Dynamics3Mono.r +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#include + +#include "Dynamics3MonoVersion.h" + +// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description +#define kAudioUnitResID_Dynamics3Mono 1000 + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dynamics3Mono~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#define RES_ID kAudioUnitResID_Dynamics3Mono +#define COMP_TYPE kAudioUnitType_Effect +#define COMP_SUBTYPE Dynamics3Mono_COMP_SUBTYPE +#define COMP_MANUF Dynamics3Mono_COMP_MANF + +#define VERSION kDynamics3MonoVersion +#define NAME "Airwindows: Dynamics3Mono" +#define DESCRIPTION "Dynamics3Mono AU" +#define ENTRY_POINT "Dynamics3MonoEntry" + +#include "AUResources.r" \ No newline at end of file diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 new file mode 100755 index 000000000..f301be9a2 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.mode1v3 @@ -0,0 +1,1358 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 8BD3CCBC148831C90062E48C + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + build + debugger-enable-breakpoints + get-info + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05AEB0720742700365D66 + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 20 + 19 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 463}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {580, 269}} + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 269pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 274}, {580, 189}} + RubberWindowFrame + 203 321 788 504 0 0 1440 878 + + Module + XCDetailModule + Proportion + 189pt + + + Proportion + 580pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 8B563EC9161B5E170067FE32 + 1CE0B1FE06471DED0097A5F4 + 8B563ECA161B5E170067FE32 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 8BD3CCBD148831C90062E48C + /Developer/Library/Xcode/Project Templates/System Plug-in/Audio Unit Effect/Audio Unit Effect/StarterAU.xcodeproj + + WindowString + 203 321 788 504 0 0 1440 878 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 218}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 223}, {500, 236}} + RubberWindowFrame + 668 222 500 500 0 0 1440 878 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 459pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 8BD3CCBD148831C90062E48C + 8B563ECB161B5E170067FE32 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 668 222 500 500 0 0 1440 878 + WindowToolGUID + 8BD3CCBD148831C90062E48C + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..d88658852 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,137 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */; + codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 128, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 252, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786890841; + PBXWorkspaceStateSaveDate = 786890841; + }; + perUserProjectItems = { + 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */ = 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */; + 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */ = 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */; + 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */ = 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */; + }; + sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; + userBuildSettings = { + }; + }; + 8B5AAF022EE6F6D100A3F512 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = /Users/christopherjohnson/Desktop/Dynamics3Mono/Info.plist; + rLen = 0; + rLoc = 9223372036854775808; + }; + 8B5AAF2B2EE6FA8800A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; + name = "Dynamics3Mono.h: 146"; + rLen = 0; + rLoc = 5621; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 8B5AAF4A2EE700FF00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; + name = "Dynamics3Mono.h: 146"; + rLen = 0; + rLoc = 5621; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {894, 4824}}"; + sepNavSelRange = "{10055, 138}"; + sepNavVisRange = "{9517, 1479}"; + sepNavWindowFrame = "{{550, 45}, {890, 833}}"; + }; + }; + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}"; + sepNavSelRange = "{2935, 0}"; + sepNavVisRange = "{1372, 1626}"; + sepNavWindowFrame = "{{84, 39}, {828, 771}}"; + }; + }; + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {318, 2844}}"; + sepNavSelRange = "{5621, 0}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{612, 86}, {828, 771}}"; + }; + }; + 8BD3CCB8148830B20062E48C /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8BD3CCB9148830B20062E48C /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..0142df849 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1507 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8BD7274F1D46E5A5000176F0 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 841 + 841 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 288 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 8BA05A56072072A900365D66 + 089C167CFE841241C02AAC07 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 4 + 2 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {288, 410}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {305, 428}} + GroupTreeTableConfiguration + + MainColumn + 288 + + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 305pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8BD7274A1D46E5A5000176F0 + PBXProjectModuleLabel + Dynamics3Mono.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8BD7274B1D46E5A5000176F0 + PBXProjectModuleLabel + Dynamics3Mono.h + _historyCapacity + 0 + bookmark + 8B5AAF4A2EE700FF00A3F512 + history + + 8B5AAF022EE6F6D100A3F512 + 8B5AAF2B2EE6FA8800A3F512 + + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {367, 0}} + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + Proportion + 423pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {367, 396}} + RubberWindowFrame + 763 233 677 469 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {367, 365}} + + Module + PBXBuildResultsModule + + + + + Proportion + 367pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AAF4B2EE700FF00A3F512 + 1CA23ED40692098700951B8B + 8B5AAF4C2EE700FF00A3F512 + 8BD7274A1D46E5A5000176F0 + 8B5AAF4D2EE700FF00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0pt + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 214}} + {{395, 0}, {415, 214}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 214}} + {{0, 214}, {810, 227}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 5}, {810, 441}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 185 + + Frame + {{395, 0}, {415, 214}} + + + Module + PBXDebugSessionModule + Proportion + 441pt + + + Name + Debug + ServiceClasses + + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + PBXDebugProcessAndThreadModule + PBXDebugProcessViewModule + PBXDebugThreadViewModule + PBXDebugStackFrameViewModule + PBXNavigatorGroup + + TableOfContents + + 8BD727EC1D46ECF1000176F0 + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 8BD727ED1D46ECF1000176F0 + 8BD727EE1D46ECF1000176F0 + 8BD727EF1D46ECF1000176F0 + 8BD727F01D46ECF1000176F0 + 8BD727E71D46ECD9000176F0 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786891007.99247503 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AAF4E2EE700FF00A3F512 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Dynamics3Mono/Dynamics3Mono.xcodeproj + + WindowString + 763 233 677 469 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj new file mode 100755 index 000000000..4a9e59031 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.pbxproj @@ -0,0 +1,965 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 8B8AEF9E2EEC904700FC1F17 /* CAExtAudioFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF162EEC904700FC1F17 /* CAExtAudioFile.h */; }; + 8B8AEF9F2EEC904700FC1F17 /* CACFMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF172EEC904700FC1F17 /* CACFMachPort.h */; }; + 8B8AEFA02EEC904700FC1F17 /* CABool.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF182EEC904700FC1F17 /* CABool.h */; }; + 8B8AEFA12EEC904700FC1F17 /* CAComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF192EEC904700FC1F17 /* CAComponent.cpp */; }; + 8B8AEFA22EEC904700FC1F17 /* CADebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF1A2EEC904700FC1F17 /* CADebugger.h */; }; + 8B8AEFA32EEC904700FC1F17 /* CACFNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF1B2EEC904700FC1F17 /* CACFNumber.cpp */; }; + 8B8AEFA42EEC904700FC1F17 /* CAGuard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF1C2EEC904700FC1F17 /* CAGuard.h */; }; + 8B8AEFA52EEC904700FC1F17 /* CAAtomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF1D2EEC904700FC1F17 /* CAAtomic.h */; }; + 8B8AEFA62EEC904700FC1F17 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF1E2EEC904700FC1F17 /* CAStreamBasicDescription.h */; }; + 8B8AEFA72EEC904700FC1F17 /* CACFObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF1F2EEC904700FC1F17 /* CACFObject.h */; }; + 8B8AEFA82EEC904700FC1F17 /* CAStreamRangedDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF202EEC904700FC1F17 /* CAStreamRangedDescription.h */; }; + 8B8AEFA92EEC904700FC1F17 /* CATokenMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF212EEC904700FC1F17 /* CATokenMap.h */; }; + 8B8AEFAA2EEC904700FC1F17 /* CAComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF222EEC904700FC1F17 /* CAComponent.h */; }; + 8B8AEFAB2EEC904700FC1F17 /* CAAudioBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF232EEC904700FC1F17 /* CAAudioBufferList.h */; }; + 8B8AEFAC2EEC904700FC1F17 /* CAAudioUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF242EEC904700FC1F17 /* CAAudioUnit.h */; }; + 8B8AEFAD2EEC904700FC1F17 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF252EEC904700FC1F17 /* CAAUParameter.h */; }; + 8B8AEFAE2EEC904700FC1F17 /* CAException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF262EEC904700FC1F17 /* CAException.h */; }; + 8B8AEFAF2EEC904700FC1F17 /* CAAUProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF272EEC904700FC1F17 /* CAAUProcessor.cpp */; }; + 8B8AEFB02EEC904700FC1F17 /* CAAUProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF282EEC904700FC1F17 /* CAAUProcessor.h */; }; + 8B8AEFB12EEC904700FC1F17 /* CAProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF292EEC904700FC1F17 /* CAProcess.h */; }; + 8B8AEFB22EEC904700FC1F17 /* CACFDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF2A2EEC904700FC1F17 /* CACFDictionary.h */; }; + 8B8AEFB32EEC904700FC1F17 /* CAPThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF2B2EEC904700FC1F17 /* CAPThread.h */; }; + 8B8AEFB42EEC904700FC1F17 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF2C2EEC904700FC1F17 /* CAAUParameter.cpp */; }; + 8B8AEFB52EEC904700FC1F17 /* CAAudioTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF2D2EEC904700FC1F17 /* CAAudioTimeStamp.h */; }; + 8B8AEFB62EEC904700FC1F17 /* CAFilePathUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF2E2EEC904700FC1F17 /* CAFilePathUtils.cpp */; }; + 8B8AEFB72EEC904700FC1F17 /* CAAudioValueRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF2F2EEC904700FC1F17 /* CAAudioValueRange.h */; }; + 8B8AEFB82EEC904700FC1F17 /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF302EEC904700FC1F17 /* CAVectorUnitTypes.h */; }; + 8B8AEFB92EEC904700FC1F17 /* CAAudioChannelLayoutObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF312EEC904700FC1F17 /* CAAudioChannelLayoutObject.cpp */; }; + 8B8AEFBA2EEC904700FC1F17 /* CAGuard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF322EEC904700FC1F17 /* CAGuard.cpp */; }; + 8B8AEFBB2EEC904700FC1F17 /* CACFNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF332EEC904700FC1F17 /* CACFNumber.h */; }; + 8B8AEFBC2EEC904700FC1F17 /* CACFDistributedNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF342EEC904700FC1F17 /* CACFDistributedNotification.cpp */; }; + 8B8AEFBD2EEC904700FC1F17 /* CACFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF352EEC904700FC1F17 /* CACFString.h */; }; + 8B8AEFBE2EEC904700FC1F17 /* CAAUMIDIMapManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF362EEC904700FC1F17 /* CAAUMIDIMapManager.cpp */; }; + 8B8AEFBF2EEC904700FC1F17 /* CAComponentDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF372EEC904700FC1F17 /* CAComponentDescription.cpp */; }; + 8B8AEFC02EEC904700FC1F17 /* CAHostTimeBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF382EEC904700FC1F17 /* CAHostTimeBase.h */; }; + 8B8AEFC12EEC904700FC1F17 /* CADebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF392EEC904700FC1F17 /* CADebugMacros.cpp */; }; + 8B8AEFC22EEC904700FC1F17 /* CAAudioFileFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF3A2EEC904700FC1F17 /* CAAudioFileFormats.h */; }; + 8B8AEFC32EEC904700FC1F17 /* CAAUMIDIMapManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF3B2EEC904700FC1F17 /* CAAUMIDIMapManager.h */; }; + 8B8AEFC42EEC904700FC1F17 /* CACFDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF3C2EEC904700FC1F17 /* CACFDictionary.cpp */; }; + 8B8AEFC52EEC904700FC1F17 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF3D2EEC904700FC1F17 /* CAMutex.h */; }; + 8B8AEFC62EEC904700FC1F17 /* CACFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF3E2EEC904700FC1F17 /* CACFString.cpp */; }; + 8B8AEFC72EEC904700FC1F17 /* CASettingsStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF3F2EEC904700FC1F17 /* CASettingsStorage.h */; }; + 8B8AEFC82EEC904700FC1F17 /* CADebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF402EEC904700FC1F17 /* CADebugPrintf.h */; }; + 8B8AEFC92EEC904700FC1F17 /* CAXException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF412EEC904700FC1F17 /* CAXException.cpp */; }; + 8B8AEFCA2EEC904700FC1F17 /* CAAUMIDIMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF422EEC904700FC1F17 /* CAAUMIDIMap.h */; }; + 8B8AEFCB2EEC904700FC1F17 /* AUParamInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF432EEC904700FC1F17 /* AUParamInfo.h */; }; + 8B8AEFCC2EEC904700FC1F17 /* CABitOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF442EEC904700FC1F17 /* CABitOperations.h */; }; + 8B8AEFCD2EEC904700FC1F17 /* CACFPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF452EEC904700FC1F17 /* CACFPreferences.cpp */; }; + 8B8AEFCE2EEC904700FC1F17 /* CABundleLocker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF462EEC904700FC1F17 /* CABundleLocker.h */; }; + 8B8AEFCF2EEC904700FC1F17 /* CAPropertyAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF472EEC904700FC1F17 /* CAPropertyAddress.h */; }; + 8B8AEFD02EEC904700FC1F17 /* CAXException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF482EEC904700FC1F17 /* CAXException.h */; }; + 8B8AEFD12EEC904700FC1F17 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF492EEC904700FC1F17 /* CAAudioChannelLayout.cpp */; }; + 8B8AEFD22EEC904700FC1F17 /* CAThreadSafeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF4A2EEC904700FC1F17 /* CAThreadSafeList.h */; }; + 8B8AEFD32EEC904700FC1F17 /* CAAudioUnitOutputCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF4B2EEC904700FC1F17 /* CAAudioUnitOutputCapturer.h */; }; + 8B8AEFD42EEC904700FC1F17 /* AUParamInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF4C2EEC904700FC1F17 /* AUParamInfo.cpp */; }; + 8B8AEFD52EEC904700FC1F17 /* CASharedLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF4D2EEC904700FC1F17 /* CASharedLibrary.cpp */; }; + 8B8AEFD62EEC904700FC1F17 /* CAAUMIDIMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF4E2EEC904700FC1F17 /* CAAUMIDIMap.cpp */; }; + 8B8AEFD72EEC904700FC1F17 /* CALogMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF4F2EEC904700FC1F17 /* CALogMacros.h */; }; + 8B8AEFD82EEC904700FC1F17 /* CACFMessagePort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF502EEC904700FC1F17 /* CACFMessagePort.cpp */; }; + 8B8AEFD92EEC904700FC1F17 /* CARingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF512EEC904700FC1F17 /* CARingBuffer.h */; }; + 8B8AEFDA2EEC904700FC1F17 /* AUOutputBL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF522EEC904700FC1F17 /* AUOutputBL.cpp */; }; + 8B8AEFDB2EEC904700FC1F17 /* CABufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF532EEC904700FC1F17 /* CABufferList.h */; }; + 8B8AEFDC2EEC904700FC1F17 /* CASharedLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF542EEC904700FC1F17 /* CASharedLibrary.h */; }; + 8B8AEFDD2EEC904700FC1F17 /* CACFData.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF552EEC904700FC1F17 /* CACFData.h */; }; + 8B8AEFDE2EEC904700FC1F17 /* CAStreamRangedDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF562EEC904700FC1F17 /* CAStreamRangedDescription.cpp */; }; + 8B8AEFDF2EEC904700FC1F17 /* CAPThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF572EEC904700FC1F17 /* CAPThread.cpp */; }; + 8B8AEFE02EEC904700FC1F17 /* CAAutoDisposer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF582EEC904700FC1F17 /* CAAutoDisposer.h */; }; + 8B8AEFE12EEC904700FC1F17 /* CACFPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF592EEC904700FC1F17 /* CACFPreferences.h */; }; + 8B8AEFE22EEC904700FC1F17 /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF5A2EEC904700FC1F17 /* CAVectorUnit.cpp */; }; + 8B8AEFE32EEC904700FC1F17 /* CAComponentDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF5B2EEC904700FC1F17 /* CAComponentDescription.h */; }; + 8B8AEFE42EEC904700FC1F17 /* CADebugMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF5C2EEC904700FC1F17 /* CADebugMacros.h */; }; + 8B8AEFE52EEC904700FC1F17 /* AUOutputBL.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF5D2EEC904700FC1F17 /* AUOutputBL.h */; }; + 8B8AEFE62EEC904700FC1F17 /* CADebugPrintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF5E2EEC904700FC1F17 /* CADebugPrintf.cpp */; }; + 8B8AEFE72EEC904700FC1F17 /* CARingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF5F2EEC904700FC1F17 /* CARingBuffer.cpp */; }; + 8B8AEFE82EEC904700FC1F17 /* CACFPlugIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF602EEC904700FC1F17 /* CACFPlugIn.h */; }; + 8B8AEFE92EEC904700FC1F17 /* CASettingsStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF612EEC904700FC1F17 /* CASettingsStorage.cpp */; }; + 8B8AEFEA2EEC904700FC1F17 /* CAMixMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF622EEC904700FC1F17 /* CAMixMap.h */; }; + 8B8AEFEB2EEC904700FC1F17 /* CACFDistributedNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF632EEC904700FC1F17 /* CACFDistributedNotification.h */; }; + 8B8AEFEC2EEC904700FC1F17 /* CAFilePathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF642EEC904700FC1F17 /* CAFilePathUtils.h */; }; + 8B8AEFED2EEC904700FC1F17 /* CATink.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF652EEC904700FC1F17 /* CATink.h */; }; + 8B8AEFEE2EEC904700FC1F17 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF662EEC904700FC1F17 /* CAStreamBasicDescription.cpp */; }; + 8B8AEFEF2EEC904700FC1F17 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF672EEC904700FC1F17 /* CAAudioChannelLayout.h */; }; + 8B8AEFF02EEC904700FC1F17 /* CAProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF682EEC904700FC1F17 /* CAProcess.cpp */; }; + 8B8AEFF12EEC904700FC1F17 /* CAHostTimeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF692EEC904700FC1F17 /* CAHostTimeBase.cpp */; }; + 8B8AEFF22EEC904700FC1F17 /* CAPersistence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF6A2EEC904700FC1F17 /* CAPersistence.cpp */; }; + 8B8AEFF32EEC904700FC1F17 /* CAAudioBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF6B2EEC904700FC1F17 /* CAAudioBufferList.cpp */; }; + 8B8AEFF42EEC904700FC1F17 /* CAAudioTimeStamp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF6C2EEC904700FC1F17 /* CAAudioTimeStamp.cpp */; }; + 8B8AEFF52EEC904700FC1F17 /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF6D2EEC904700FC1F17 /* CAVectorUnit.h */; }; + 8B8AEFF62EEC904700FC1F17 /* CAByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF6E2EEC904700FC1F17 /* CAByteOrder.h */; }; + 8B8AEFF72EEC904700FC1F17 /* CACFArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF6F2EEC904700FC1F17 /* CACFArray.h */; }; + 8B8AEFF82EEC904700FC1F17 /* CAAtomicStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF702EEC904700FC1F17 /* CAAtomicStack.h */; }; + 8B8AEFF92EEC904700FC1F17 /* CAReferenceCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF712EEC904700FC1F17 /* CAReferenceCounted.h */; }; + 8B8AEFFA2EEC904700FC1F17 /* CACFMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF722EEC904700FC1F17 /* CACFMachPort.cpp */; }; + 8B8AEFFB2EEC904700FC1F17 /* CABufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF732EEC904700FC1F17 /* CABufferList.cpp */; }; + 8B8AEFFC2EEC904700FC1F17 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF742EEC904700FC1F17 /* CAMutex.cpp */; }; + 8B8AEFFD2EEC904700FC1F17 /* CADebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF752EEC904700FC1F17 /* CADebugger.cpp */; }; + 8B8AEFFE2EEC904700FC1F17 /* CABundleLocker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF762EEC904700FC1F17 /* CABundleLocker.cpp */; }; + 8B8AEFFF2EEC904700FC1F17 /* CAAudioFileFormats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF772EEC904700FC1F17 /* CAAudioFileFormats.cpp */; }; + 8B8AF0002EEC904700FC1F17 /* CAMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF782EEC904700FC1F17 /* CAMath.h */; }; + 8B8AF0012EEC904700FC1F17 /* CACFArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF792EEC904700FC1F17 /* CACFArray.cpp */; }; + 8B8AF0022EEC904700FC1F17 /* CACFMessagePort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF7A2EEC904700FC1F17 /* CACFMessagePort.h */; }; + 8B8AF0032EEC904700FC1F17 /* CAAudioValueRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF7B2EEC904700FC1F17 /* CAAudioValueRange.cpp */; }; + 8B8AF0042EEC904700FC1F17 /* CAAudioUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF7C2EEC904700FC1F17 /* CAAudioUnit.cpp */; }; + 8B8AF0052EEC904700FC1F17 /* AUViewLocalizedStringKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF802EEC904700FC1F17 /* AUViewLocalizedStringKeys.h */; }; + 8B8AF0062EEC904700FC1F17 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF822EEC904700FC1F17 /* ComponentBase.cpp */; }; + 8B8AF0072EEC904700FC1F17 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF832EEC904700FC1F17 /* AUScopeElement.cpp */; }; + 8B8AF0082EEC904700FC1F17 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF842EEC904700FC1F17 /* ComponentBase.h */; }; + 8B8AF0092EEC904700FC1F17 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF852EEC904700FC1F17 /* AUBase.cpp */; }; + 8B8AF00A2EEC904700FC1F17 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF862EEC904700FC1F17 /* AUInputElement.h */; }; + 8B8AF00B2EEC904700FC1F17 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF872EEC904700FC1F17 /* AUBase.h */; }; + 8B8AF00C2EEC904700FC1F17 /* AUPlugInDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF882EEC904700FC1F17 /* AUPlugInDispatch.h */; }; + 8B8AF00D2EEC904700FC1F17 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF892EEC904700FC1F17 /* AUDispatch.h */; }; + 8B8AF00E2EEC904700FC1F17 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF8A2EEC904700FC1F17 /* AUOutputElement.cpp */; }; + 8B8AF0102EEC904700FC1F17 /* AUPlugInDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF8C2EEC904700FC1F17 /* AUPlugInDispatch.cpp */; }; + 8B8AF0112EEC904700FC1F17 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF8D2EEC904700FC1F17 /* AUOutputElement.h */; }; + 8B8AF0122EEC904700FC1F17 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF8E2EEC904700FC1F17 /* AUDispatch.cpp */; }; + 8B8AF0132EEC904700FC1F17 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF8F2EEC904700FC1F17 /* AUScopeElement.h */; }; + 8B8AF0142EEC904700FC1F17 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF902EEC904700FC1F17 /* AUInputElement.cpp */; }; + 8B8AF0152EEC904700FC1F17 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF922EEC904700FC1F17 /* AUEffectBase.cpp */; }; + 8B8AF0162EEC904700FC1F17 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF932EEC904700FC1F17 /* AUEffectBase.h */; }; + 8B8AF0172EEC904700FC1F17 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF952EEC904700FC1F17 /* AUTimestampGenerator.h */; }; + 8B8AF0182EEC904700FC1F17 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF962EEC904700FC1F17 /* AUBaseHelper.cpp */; }; + 8B8AF0192EEC904700FC1F17 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF972EEC904700FC1F17 /* AUSilentTimeout.h */; }; + 8B8AF01A2EEC904700FC1F17 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF982EEC904700FC1F17 /* AUInputFormatConverter.h */; }; + 8B8AF01B2EEC904700FC1F17 /* AUTimestampGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF992EEC904700FC1F17 /* AUTimestampGenerator.cpp */; }; + 8B8AF01C2EEC904700FC1F17 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B8AEF9A2EEC904700FC1F17 /* AUBuffer.cpp */; }; + 8B8AF01D2EEC904700FC1F17 /* AUMIDIDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF9B2EEC904700FC1F17 /* AUMIDIDefs.h */; }; + 8B8AF01E2EEC904700FC1F17 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF9C2EEC904700FC1F17 /* AUBuffer.h */; }; + 8B8AF01F2EEC904700FC1F17 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B8AEF9D2EEC904700FC1F17 /* AUBaseHelper.h */; }; + 8BA05A6B0720730100365D66 /* Dynamics3Mono.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */; }; + 8BA05A6E0720730100365D66 /* Dynamics3MonoVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */; }; + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; }; + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; }; + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; }; + 8BC6025C073B072D006C4272 /* Dynamics3Mono.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */; }; + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + 8B8AEF162EEC904700FC1F17 /* CAExtAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAExtAudioFile.h; sourceTree = ""; }; + 8B8AEF172EEC904700FC1F17 /* CACFMachPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMachPort.h; sourceTree = ""; }; + 8B8AEF182EEC904700FC1F17 /* CABool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABool.h; sourceTree = ""; }; + 8B8AEF192EEC904700FC1F17 /* CAComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponent.cpp; sourceTree = ""; }; + 8B8AEF1A2EEC904700FC1F17 /* CADebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugger.h; sourceTree = ""; }; + 8B8AEF1B2EEC904700FC1F17 /* CACFNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFNumber.cpp; sourceTree = ""; }; + 8B8AEF1C2EEC904700FC1F17 /* CAGuard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAGuard.h; sourceTree = ""; }; + 8B8AEF1D2EEC904700FC1F17 /* CAAtomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomic.h; sourceTree = ""; }; + 8B8AEF1E2EEC904700FC1F17 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; + 8B8AEF1F2EEC904700FC1F17 /* CACFObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFObject.h; sourceTree = ""; }; + 8B8AEF202EEC904700FC1F17 /* CAStreamRangedDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamRangedDescription.h; sourceTree = ""; }; + 8B8AEF212EEC904700FC1F17 /* CATokenMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATokenMap.h; sourceTree = ""; }; + 8B8AEF222EEC904700FC1F17 /* CAComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponent.h; sourceTree = ""; }; + 8B8AEF232EEC904700FC1F17 /* CAAudioBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioBufferList.h; sourceTree = ""; }; + 8B8AEF242EEC904700FC1F17 /* CAAudioUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnit.h; sourceTree = ""; }; + 8B8AEF252EEC904700FC1F17 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = ""; }; + 8B8AEF262EEC904700FC1F17 /* CAException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAException.h; sourceTree = ""; }; + 8B8AEF272EEC904700FC1F17 /* CAAUProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUProcessor.cpp; sourceTree = ""; }; + 8B8AEF282EEC904700FC1F17 /* CAAUProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUProcessor.h; sourceTree = ""; }; + 8B8AEF292EEC904700FC1F17 /* CAProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAProcess.h; sourceTree = ""; }; + 8B8AEF2A2EEC904700FC1F17 /* CACFDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDictionary.h; sourceTree = ""; }; + 8B8AEF2B2EEC904700FC1F17 /* CAPThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPThread.h; sourceTree = ""; }; + 8B8AEF2C2EEC904700FC1F17 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = ""; }; + 8B8AEF2D2EEC904700FC1F17 /* CAAudioTimeStamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioTimeStamp.h; sourceTree = ""; }; + 8B8AEF2E2EEC904700FC1F17 /* CAFilePathUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAFilePathUtils.cpp; sourceTree = ""; }; + 8B8AEF2F2EEC904700FC1F17 /* CAAudioValueRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioValueRange.h; sourceTree = ""; }; + 8B8AEF302EEC904700FC1F17 /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = ""; }; + 8B8AEF312EEC904700FC1F17 /* CAAudioChannelLayoutObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayoutObject.cpp; sourceTree = ""; }; + 8B8AEF322EEC904700FC1F17 /* CAGuard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAGuard.cpp; sourceTree = ""; }; + 8B8AEF332EEC904700FC1F17 /* CACFNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFNumber.h; sourceTree = ""; }; + 8B8AEF342EEC904700FC1F17 /* CACFDistributedNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDistributedNotification.cpp; sourceTree = ""; }; + 8B8AEF352EEC904700FC1F17 /* CACFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFString.h; sourceTree = ""; }; + 8B8AEF362EEC904700FC1F17 /* CAAUMIDIMapManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMapManager.cpp; sourceTree = ""; }; + 8B8AEF372EEC904700FC1F17 /* CAComponentDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponentDescription.cpp; sourceTree = ""; }; + 8B8AEF382EEC904700FC1F17 /* CAHostTimeBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAHostTimeBase.h; sourceTree = ""; }; + 8B8AEF392EEC904700FC1F17 /* CADebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugMacros.cpp; sourceTree = ""; }; + 8B8AEF3A2EEC904700FC1F17 /* CAAudioFileFormats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioFileFormats.h; sourceTree = ""; }; + 8B8AEF3B2EEC904700FC1F17 /* CAAUMIDIMapManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMapManager.h; sourceTree = ""; }; + 8B8AEF3C2EEC904700FC1F17 /* CACFDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDictionary.cpp; sourceTree = ""; }; + 8B8AEF3D2EEC904700FC1F17 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = ""; }; + 8B8AEF3E2EEC904700FC1F17 /* CACFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFString.cpp; sourceTree = ""; }; + 8B8AEF3F2EEC904700FC1F17 /* CASettingsStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASettingsStorage.h; sourceTree = ""; }; + 8B8AEF402EEC904700FC1F17 /* CADebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugPrintf.h; sourceTree = ""; }; + 8B8AEF412EEC904700FC1F17 /* CAXException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAXException.cpp; sourceTree = ""; }; + 8B8AEF422EEC904700FC1F17 /* CAAUMIDIMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMap.h; sourceTree = ""; }; + 8B8AEF432EEC904700FC1F17 /* AUParamInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUParamInfo.h; sourceTree = ""; }; + 8B8AEF442EEC904700FC1F17 /* CABitOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABitOperations.h; sourceTree = ""; }; + 8B8AEF452EEC904700FC1F17 /* CACFPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFPreferences.cpp; sourceTree = ""; }; + 8B8AEF462EEC904700FC1F17 /* CABundleLocker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABundleLocker.h; sourceTree = ""; }; + 8B8AEF472EEC904700FC1F17 /* CAPropertyAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPropertyAddress.h; sourceTree = ""; }; + 8B8AEF482EEC904700FC1F17 /* CAXException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAXException.h; sourceTree = ""; }; + 8B8AEF492EEC904700FC1F17 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = ""; }; + 8B8AEF4A2EEC904700FC1F17 /* CAThreadSafeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAThreadSafeList.h; sourceTree = ""; }; + 8B8AEF4B2EEC904700FC1F17 /* CAAudioUnitOutputCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnitOutputCapturer.h; sourceTree = ""; }; + 8B8AEF4C2EEC904700FC1F17 /* AUParamInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUParamInfo.cpp; sourceTree = ""; }; + 8B8AEF4D2EEC904700FC1F17 /* CASharedLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASharedLibrary.cpp; sourceTree = ""; }; + 8B8AEF4E2EEC904700FC1F17 /* CAAUMIDIMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMap.cpp; sourceTree = ""; }; + 8B8AEF4F2EEC904700FC1F17 /* CALogMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALogMacros.h; sourceTree = ""; }; + 8B8AEF502EEC904700FC1F17 /* CACFMessagePort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMessagePort.cpp; sourceTree = ""; }; + 8B8AEF512EEC904700FC1F17 /* CARingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CARingBuffer.h; sourceTree = ""; }; + 8B8AEF522EEC904700FC1F17 /* AUOutputBL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputBL.cpp; sourceTree = ""; }; + 8B8AEF532EEC904700FC1F17 /* CABufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABufferList.h; sourceTree = ""; }; + 8B8AEF542EEC904700FC1F17 /* CASharedLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASharedLibrary.h; sourceTree = ""; }; + 8B8AEF552EEC904700FC1F17 /* CACFData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFData.h; sourceTree = ""; }; + 8B8AEF562EEC904700FC1F17 /* CAStreamRangedDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamRangedDescription.cpp; sourceTree = ""; }; + 8B8AEF572EEC904700FC1F17 /* CAPThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPThread.cpp; sourceTree = ""; }; + 8B8AEF582EEC904700FC1F17 /* CAAutoDisposer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAutoDisposer.h; sourceTree = ""; }; + 8B8AEF592EEC904700FC1F17 /* CACFPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPreferences.h; sourceTree = ""; }; + 8B8AEF5A2EEC904700FC1F17 /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = ""; }; + 8B8AEF5B2EEC904700FC1F17 /* CAComponentDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponentDescription.h; sourceTree = ""; }; + 8B8AEF5C2EEC904700FC1F17 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = ""; }; + 8B8AEF5D2EEC904700FC1F17 /* AUOutputBL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputBL.h; sourceTree = ""; }; + 8B8AEF5E2EEC904700FC1F17 /* CADebugPrintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugPrintf.cpp; sourceTree = ""; }; + 8B8AEF5F2EEC904700FC1F17 /* CARingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CARingBuffer.cpp; sourceTree = ""; }; + 8B8AEF602EEC904700FC1F17 /* CACFPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPlugIn.h; sourceTree = ""; }; + 8B8AEF612EEC904700FC1F17 /* CASettingsStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASettingsStorage.cpp; sourceTree = ""; }; + 8B8AEF622EEC904700FC1F17 /* CAMixMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMixMap.h; sourceTree = ""; }; + 8B8AEF632EEC904700FC1F17 /* CACFDistributedNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDistributedNotification.h; sourceTree = ""; }; + 8B8AEF642EEC904700FC1F17 /* CAFilePathUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAFilePathUtils.h; sourceTree = ""; }; + 8B8AEF652EEC904700FC1F17 /* CATink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATink.h; sourceTree = ""; }; + 8B8AEF662EEC904700FC1F17 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = ""; }; + 8B8AEF672EEC904700FC1F17 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = ""; }; + 8B8AEF682EEC904700FC1F17 /* CAProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAProcess.cpp; sourceTree = ""; }; + 8B8AEF692EEC904700FC1F17 /* CAHostTimeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAHostTimeBase.cpp; sourceTree = ""; }; + 8B8AEF6A2EEC904700FC1F17 /* CAPersistence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPersistence.cpp; sourceTree = ""; }; + 8B8AEF6B2EEC904700FC1F17 /* CAAudioBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioBufferList.cpp; sourceTree = ""; }; + 8B8AEF6C2EEC904700FC1F17 /* CAAudioTimeStamp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioTimeStamp.cpp; sourceTree = ""; }; + 8B8AEF6D2EEC904700FC1F17 /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = ""; }; + 8B8AEF6E2EEC904700FC1F17 /* CAByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAByteOrder.h; sourceTree = ""; }; + 8B8AEF6F2EEC904700FC1F17 /* CACFArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFArray.h; sourceTree = ""; }; + 8B8AEF702EEC904700FC1F17 /* CAAtomicStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomicStack.h; sourceTree = ""; }; + 8B8AEF712EEC904700FC1F17 /* CAReferenceCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAReferenceCounted.h; sourceTree = ""; }; + 8B8AEF722EEC904700FC1F17 /* CACFMachPort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMachPort.cpp; sourceTree = ""; }; + 8B8AEF732EEC904700FC1F17 /* CABufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABufferList.cpp; sourceTree = ""; }; + 8B8AEF742EEC904700FC1F17 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = ""; }; + 8B8AEF752EEC904700FC1F17 /* CADebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugger.cpp; sourceTree = ""; }; + 8B8AEF762EEC904700FC1F17 /* CABundleLocker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABundleLocker.cpp; sourceTree = ""; }; + 8B8AEF772EEC904700FC1F17 /* CAAudioFileFormats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioFileFormats.cpp; sourceTree = ""; }; + 8B8AEF782EEC904700FC1F17 /* CAMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMath.h; sourceTree = ""; }; + 8B8AEF792EEC904700FC1F17 /* CACFArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFArray.cpp; sourceTree = ""; }; + 8B8AEF7A2EEC904700FC1F17 /* CACFMessagePort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMessagePort.h; sourceTree = ""; }; + 8B8AEF7B2EEC904700FC1F17 /* CAAudioValueRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioValueRange.cpp; sourceTree = ""; }; + 8B8AEF7C2EEC904700FC1F17 /* CAAudioUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioUnit.cpp; sourceTree = ""; }; + 8B8AEF802EEC904700FC1F17 /* AUViewLocalizedStringKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUViewLocalizedStringKeys.h; sourceTree = ""; }; + 8B8AEF822EEC904700FC1F17 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = ""; }; + 8B8AEF832EEC904700FC1F17 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = ""; }; + 8B8AEF842EEC904700FC1F17 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = ""; }; + 8B8AEF852EEC904700FC1F17 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = ""; }; + 8B8AEF862EEC904700FC1F17 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = ""; }; + 8B8AEF872EEC904700FC1F17 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = ""; }; + 8B8AEF882EEC904700FC1F17 /* AUPlugInDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUPlugInDispatch.h; sourceTree = ""; }; + 8B8AEF892EEC904700FC1F17 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = ""; }; + 8B8AEF8A2EEC904700FC1F17 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = ""; }; + 8B8AEF8B2EEC904700FC1F17 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = ""; }; + 8B8AEF8C2EEC904700FC1F17 /* AUPlugInDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUPlugInDispatch.cpp; sourceTree = ""; }; + 8B8AEF8D2EEC904700FC1F17 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = ""; }; + 8B8AEF8E2EEC904700FC1F17 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = ""; }; + 8B8AEF8F2EEC904700FC1F17 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = ""; }; + 8B8AEF902EEC904700FC1F17 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = ""; }; + 8B8AEF922EEC904700FC1F17 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = ""; }; + 8B8AEF932EEC904700FC1F17 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = ""; }; + 8B8AEF952EEC904700FC1F17 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = ""; }; + 8B8AEF962EEC904700FC1F17 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBaseHelper.cpp; sourceTree = ""; }; + 8B8AEF972EEC904700FC1F17 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = ""; }; + 8B8AEF982EEC904700FC1F17 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = ""; }; + 8B8AEF992EEC904700FC1F17 /* AUTimestampGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUTimestampGenerator.cpp; sourceTree = ""; }; + 8B8AEF9A2EEC904700FC1F17 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = ""; }; + 8B8AEF9B2EEC904700FC1F17 /* AUMIDIDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUMIDIDefs.h; sourceTree = ""; }; + 8B8AEF9C2EEC904700FC1F17 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = ""; }; + 8B8AEF9D2EEC904700FC1F17 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBaseHelper.h; sourceTree = ""; }; + 8B8AF0202EEC913B00FC1F17 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Dynamics3Mono.cpp; sourceTree = ""; }; + 8BA05A670720730100365D66 /* Dynamics3Mono.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = Dynamics3Mono.exp; sourceTree = ""; }; + 8BA05A680720730100365D66 /* Dynamics3Mono.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = Dynamics3Mono.r; sourceTree = ""; }; + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3MonoVersion.h; sourceTree = ""; }; + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; + 8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; + 8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dynamics3Mono.h; sourceTree = ""; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3Mono.component; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */, + 8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */, + 8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Dynamics3Mono */ = { + isa = PBXGroup; + children = ( + 08FB77ADFE841716C02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + ); + name = Dynamics3Mono; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */, + 8BA05B01072074F900365D66 /* CoreServices.framework */, + 8BA05AF9072074E100365D66 /* AudioToolbox.framework */, + 8BA05AFA072074E100365D66 /* AudioUnit.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8B8AEF142EEC904700FC1F17 /* CA_SDK */, + 8BA05A56072072A900365D66 /* AU Source */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */, + ); + name = Products; + sourceTree = ""; + }; + 8B8AEF142EEC904700FC1F17 /* CA_SDK */ = { + isa = PBXGroup; + children = ( + 8B8AEF152EEC904700FC1F17 /* PublicUtility */, + 8B8AEF7D2EEC904700FC1F17 /* AudioUnits */, + ); + name = CA_SDK; + path = ../../../../CA_SDK; + sourceTree = ""; + }; + 8B8AEF152EEC904700FC1F17 /* PublicUtility */ = { + isa = PBXGroup; + children = ( + 8B8AEF162EEC904700FC1F17 /* CAExtAudioFile.h */, + 8B8AEF172EEC904700FC1F17 /* CACFMachPort.h */, + 8B8AEF182EEC904700FC1F17 /* CABool.h */, + 8B8AEF192EEC904700FC1F17 /* CAComponent.cpp */, + 8B8AEF1A2EEC904700FC1F17 /* CADebugger.h */, + 8B8AEF1B2EEC904700FC1F17 /* CACFNumber.cpp */, + 8B8AEF1C2EEC904700FC1F17 /* CAGuard.h */, + 8B8AEF1D2EEC904700FC1F17 /* CAAtomic.h */, + 8B8AEF1E2EEC904700FC1F17 /* CAStreamBasicDescription.h */, + 8B8AEF1F2EEC904700FC1F17 /* CACFObject.h */, + 8B8AEF202EEC904700FC1F17 /* CAStreamRangedDescription.h */, + 8B8AEF212EEC904700FC1F17 /* CATokenMap.h */, + 8B8AEF222EEC904700FC1F17 /* CAComponent.h */, + 8B8AEF232EEC904700FC1F17 /* CAAudioBufferList.h */, + 8B8AEF242EEC904700FC1F17 /* CAAudioUnit.h */, + 8B8AEF252EEC904700FC1F17 /* CAAUParameter.h */, + 8B8AEF262EEC904700FC1F17 /* CAException.h */, + 8B8AEF272EEC904700FC1F17 /* CAAUProcessor.cpp */, + 8B8AEF282EEC904700FC1F17 /* CAAUProcessor.h */, + 8B8AEF292EEC904700FC1F17 /* CAProcess.h */, + 8B8AEF2A2EEC904700FC1F17 /* CACFDictionary.h */, + 8B8AEF2B2EEC904700FC1F17 /* CAPThread.h */, + 8B8AEF2C2EEC904700FC1F17 /* CAAUParameter.cpp */, + 8B8AEF2D2EEC904700FC1F17 /* CAAudioTimeStamp.h */, + 8B8AEF2E2EEC904700FC1F17 /* CAFilePathUtils.cpp */, + 8B8AEF2F2EEC904700FC1F17 /* CAAudioValueRange.h */, + 8B8AEF302EEC904700FC1F17 /* CAVectorUnitTypes.h */, + 8B8AEF312EEC904700FC1F17 /* CAAudioChannelLayoutObject.cpp */, + 8B8AEF322EEC904700FC1F17 /* CAGuard.cpp */, + 8B8AEF332EEC904700FC1F17 /* CACFNumber.h */, + 8B8AEF342EEC904700FC1F17 /* CACFDistributedNotification.cpp */, + 8B8AEF352EEC904700FC1F17 /* CACFString.h */, + 8B8AEF362EEC904700FC1F17 /* CAAUMIDIMapManager.cpp */, + 8B8AEF372EEC904700FC1F17 /* CAComponentDescription.cpp */, + 8B8AEF382EEC904700FC1F17 /* CAHostTimeBase.h */, + 8B8AEF392EEC904700FC1F17 /* CADebugMacros.cpp */, + 8B8AEF3A2EEC904700FC1F17 /* CAAudioFileFormats.h */, + 8B8AEF3B2EEC904700FC1F17 /* CAAUMIDIMapManager.h */, + 8B8AEF3C2EEC904700FC1F17 /* CACFDictionary.cpp */, + 8B8AEF3D2EEC904700FC1F17 /* CAMutex.h */, + 8B8AEF3E2EEC904700FC1F17 /* CACFString.cpp */, + 8B8AEF3F2EEC904700FC1F17 /* CASettingsStorage.h */, + 8B8AEF402EEC904700FC1F17 /* CADebugPrintf.h */, + 8B8AEF412EEC904700FC1F17 /* CAXException.cpp */, + 8B8AEF422EEC904700FC1F17 /* CAAUMIDIMap.h */, + 8B8AEF432EEC904700FC1F17 /* AUParamInfo.h */, + 8B8AEF442EEC904700FC1F17 /* CABitOperations.h */, + 8B8AEF452EEC904700FC1F17 /* CACFPreferences.cpp */, + 8B8AEF462EEC904700FC1F17 /* CABundleLocker.h */, + 8B8AEF472EEC904700FC1F17 /* CAPropertyAddress.h */, + 8B8AEF482EEC904700FC1F17 /* CAXException.h */, + 8B8AEF492EEC904700FC1F17 /* CAAudioChannelLayout.cpp */, + 8B8AEF4A2EEC904700FC1F17 /* CAThreadSafeList.h */, + 8B8AEF4B2EEC904700FC1F17 /* CAAudioUnitOutputCapturer.h */, + 8B8AEF4C2EEC904700FC1F17 /* AUParamInfo.cpp */, + 8B8AEF4D2EEC904700FC1F17 /* CASharedLibrary.cpp */, + 8B8AEF4E2EEC904700FC1F17 /* CAAUMIDIMap.cpp */, + 8B8AEF4F2EEC904700FC1F17 /* CALogMacros.h */, + 8B8AEF502EEC904700FC1F17 /* CACFMessagePort.cpp */, + 8B8AEF512EEC904700FC1F17 /* CARingBuffer.h */, + 8B8AEF522EEC904700FC1F17 /* AUOutputBL.cpp */, + 8B8AEF532EEC904700FC1F17 /* CABufferList.h */, + 8B8AEF542EEC904700FC1F17 /* CASharedLibrary.h */, + 8B8AEF552EEC904700FC1F17 /* CACFData.h */, + 8B8AEF562EEC904700FC1F17 /* CAStreamRangedDescription.cpp */, + 8B8AEF572EEC904700FC1F17 /* CAPThread.cpp */, + 8B8AEF582EEC904700FC1F17 /* CAAutoDisposer.h */, + 8B8AEF592EEC904700FC1F17 /* CACFPreferences.h */, + 8B8AEF5A2EEC904700FC1F17 /* CAVectorUnit.cpp */, + 8B8AEF5B2EEC904700FC1F17 /* CAComponentDescription.h */, + 8B8AEF5C2EEC904700FC1F17 /* CADebugMacros.h */, + 8B8AEF5D2EEC904700FC1F17 /* AUOutputBL.h */, + 8B8AEF5E2EEC904700FC1F17 /* CADebugPrintf.cpp */, + 8B8AEF5F2EEC904700FC1F17 /* CARingBuffer.cpp */, + 8B8AEF602EEC904700FC1F17 /* CACFPlugIn.h */, + 8B8AEF612EEC904700FC1F17 /* CASettingsStorage.cpp */, + 8B8AEF622EEC904700FC1F17 /* CAMixMap.h */, + 8B8AEF632EEC904700FC1F17 /* CACFDistributedNotification.h */, + 8B8AEF642EEC904700FC1F17 /* CAFilePathUtils.h */, + 8B8AEF652EEC904700FC1F17 /* CATink.h */, + 8B8AEF662EEC904700FC1F17 /* CAStreamBasicDescription.cpp */, + 8B8AEF672EEC904700FC1F17 /* CAAudioChannelLayout.h */, + 8B8AEF682EEC904700FC1F17 /* CAProcess.cpp */, + 8B8AEF692EEC904700FC1F17 /* CAHostTimeBase.cpp */, + 8B8AEF6A2EEC904700FC1F17 /* CAPersistence.cpp */, + 8B8AEF6B2EEC904700FC1F17 /* CAAudioBufferList.cpp */, + 8B8AEF6C2EEC904700FC1F17 /* CAAudioTimeStamp.cpp */, + 8B8AEF6D2EEC904700FC1F17 /* CAVectorUnit.h */, + 8B8AEF6E2EEC904700FC1F17 /* CAByteOrder.h */, + 8B8AEF6F2EEC904700FC1F17 /* CACFArray.h */, + 8B8AEF702EEC904700FC1F17 /* CAAtomicStack.h */, + 8B8AEF712EEC904700FC1F17 /* CAReferenceCounted.h */, + 8B8AEF722EEC904700FC1F17 /* CACFMachPort.cpp */, + 8B8AEF732EEC904700FC1F17 /* CABufferList.cpp */, + 8B8AEF742EEC904700FC1F17 /* CAMutex.cpp */, + 8B8AEF752EEC904700FC1F17 /* CADebugger.cpp */, + 8B8AEF762EEC904700FC1F17 /* CABundleLocker.cpp */, + 8B8AEF772EEC904700FC1F17 /* CAAudioFileFormats.cpp */, + 8B8AEF782EEC904700FC1F17 /* CAMath.h */, + 8B8AEF792EEC904700FC1F17 /* CACFArray.cpp */, + 8B8AEF7A2EEC904700FC1F17 /* CACFMessagePort.h */, + 8B8AEF7B2EEC904700FC1F17 /* CAAudioValueRange.cpp */, + 8B8AEF7C2EEC904700FC1F17 /* CAAudioUnit.cpp */, + ); + path = PublicUtility; + sourceTree = ""; + }; + 8B8AEF7D2EEC904700FC1F17 /* AudioUnits */ = { + isa = PBXGroup; + children = ( + 8B8AEF7E2EEC904700FC1F17 /* AUPublic */, + ); + path = AudioUnits; + sourceTree = ""; + }; + 8B8AEF7E2EEC904700FC1F17 /* AUPublic */ = { + isa = PBXGroup; + children = ( + 8B8AEF7F2EEC904700FC1F17 /* AUViewBase */, + 8B8AEF812EEC904700FC1F17 /* AUBase */, + 8B8AEF912EEC904700FC1F17 /* OtherBases */, + 8B8AEF942EEC904700FC1F17 /* Utility */, + ); + path = AUPublic; + sourceTree = ""; + }; + 8B8AEF7F2EEC904700FC1F17 /* AUViewBase */ = { + isa = PBXGroup; + children = ( + 8B8AEF802EEC904700FC1F17 /* AUViewLocalizedStringKeys.h */, + ); + path = AUViewBase; + sourceTree = ""; + }; + 8B8AEF812EEC904700FC1F17 /* AUBase */ = { + isa = PBXGroup; + children = ( + 8B8AEF822EEC904700FC1F17 /* ComponentBase.cpp */, + 8B8AEF832EEC904700FC1F17 /* AUScopeElement.cpp */, + 8B8AEF842EEC904700FC1F17 /* ComponentBase.h */, + 8B8AEF852EEC904700FC1F17 /* AUBase.cpp */, + 8B8AEF862EEC904700FC1F17 /* AUInputElement.h */, + 8B8AEF872EEC904700FC1F17 /* AUBase.h */, + 8B8AEF882EEC904700FC1F17 /* AUPlugInDispatch.h */, + 8B8AEF892EEC904700FC1F17 /* AUDispatch.h */, + 8B8AEF8A2EEC904700FC1F17 /* AUOutputElement.cpp */, + 8B8AEF8B2EEC904700FC1F17 /* AUResources.r */, + 8B8AEF8C2EEC904700FC1F17 /* AUPlugInDispatch.cpp */, + 8B8AEF8D2EEC904700FC1F17 /* AUOutputElement.h */, + 8B8AEF8E2EEC904700FC1F17 /* AUDispatch.cpp */, + 8B8AEF8F2EEC904700FC1F17 /* AUScopeElement.h */, + 8B8AEF902EEC904700FC1F17 /* AUInputElement.cpp */, + ); + path = AUBase; + sourceTree = ""; + }; + 8B8AEF912EEC904700FC1F17 /* OtherBases */ = { + isa = PBXGroup; + children = ( + 8B8AEF922EEC904700FC1F17 /* AUEffectBase.cpp */, + 8B8AEF932EEC904700FC1F17 /* AUEffectBase.h */, + ); + path = OtherBases; + sourceTree = ""; + }; + 8B8AEF942EEC904700FC1F17 /* Utility */ = { + isa = PBXGroup; + children = ( + 8B8AEF952EEC904700FC1F17 /* AUTimestampGenerator.h */, + 8B8AEF962EEC904700FC1F17 /* AUBaseHelper.cpp */, + 8B8AEF972EEC904700FC1F17 /* AUSilentTimeout.h */, + 8B8AEF982EEC904700FC1F17 /* AUInputFormatConverter.h */, + 8B8AEF992EEC904700FC1F17 /* AUTimestampGenerator.cpp */, + 8B8AEF9A2EEC904700FC1F17 /* AUBuffer.cpp */, + 8B8AEF9B2EEC904700FC1F17 /* AUMIDIDefs.h */, + 8B8AEF9C2EEC904700FC1F17 /* AUBuffer.h */, + 8B8AEF9D2EEC904700FC1F17 /* AUBaseHelper.h */, + ); + path = Utility; + sourceTree = ""; + }; + 8BA05A56072072A900365D66 /* AU Source */ = { + isa = PBXGroup; + children = ( + 8BC6025B073B072D006C4272 /* Dynamics3Mono.h */, + 8BA05A660720730100365D66 /* Dynamics3Mono.cpp */, + 8BA05A670720730100365D66 /* Dynamics3Mono.exp */, + 8BA05A680720730100365D66 /* Dynamics3Mono.r */, + 8BA05A690720730100365D66 /* Dynamics3MonoVersion.h */, + ); + name = "AU Source"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B8AEFCE2EEC904700FC1F17 /* CABundleLocker.h in Headers */, + 8B8AEFEF2EEC904700FC1F17 /* CAAudioChannelLayout.h in Headers */, + 8B8AEFE52EEC904700FC1F17 /* AUOutputBL.h in Headers */, + 8B8AEFC02EEC904700FC1F17 /* CAHostTimeBase.h in Headers */, + 8B8AF0082EEC904700FC1F17 /* ComponentBase.h in Headers */, + 8B8AEFF82EEC904700FC1F17 /* CAAtomicStack.h in Headers */, + 8B8AEFB52EEC904700FC1F17 /* CAAudioTimeStamp.h in Headers */, + 8B8AEFD22EEC904700FC1F17 /* CAThreadSafeList.h in Headers */, + 8B8AEFAD2EEC904700FC1F17 /* CAAUParameter.h in Headers */, + 8B8AF01F2EEC904700FC1F17 /* AUBaseHelper.h in Headers */, + 8B8AF0172EEC904700FC1F17 /* AUTimestampGenerator.h in Headers */, + 8B8AEFC82EEC904700FC1F17 /* CADebugPrintf.h in Headers */, + 8B8AF0022EEC904700FC1F17 /* CACFMessagePort.h in Headers */, + 8B8AEFB02EEC904700FC1F17 /* CAAUProcessor.h in Headers */, + 8B8AEFAC2EEC904700FC1F17 /* CAAudioUnit.h in Headers */, + 8B8AF0052EEC904700FC1F17 /* AUViewLocalizedStringKeys.h in Headers */, + 8B8AEFEB2EEC904700FC1F17 /* CACFDistributedNotification.h in Headers */, + 8B8AEFAA2EEC904700FC1F17 /* CAComponent.h in Headers */, + 8B8AEFB82EEC904700FC1F17 /* CAVectorUnitTypes.h in Headers */, + 8BA05A6E0720730100365D66 /* Dynamics3MonoVersion.h in Headers */, + 8B8AEFEC2EEC904700FC1F17 /* CAFilePathUtils.h in Headers */, + 8B8AEFAE2EEC904700FC1F17 /* CAException.h in Headers */, + 8B8AEFA52EEC904700FC1F17 /* CAAtomic.h in Headers */, + 8B8AEFA42EEC904700FC1F17 /* CAGuard.h in Headers */, + 8B8AF00A2EEC904700FC1F17 /* AUInputElement.h in Headers */, + 8B8AEFE12EEC904700FC1F17 /* CACFPreferences.h in Headers */, + 8B8AEFF62EEC904700FC1F17 /* CAByteOrder.h in Headers */, + 8B8AEFD92EEC904700FC1F17 /* CARingBuffer.h in Headers */, + 8B8AEFA02EEC904700FC1F17 /* CABool.h in Headers */, + 8B8AEFC52EEC904700FC1F17 /* CAMutex.h in Headers */, + 8B8AF00B2EEC904700FC1F17 /* AUBase.h in Headers */, + 8BC6025C073B072D006C4272 /* Dynamics3Mono.h in Headers */, + 8B8AEFBD2EEC904700FC1F17 /* CACFString.h in Headers */, + 8B8AEFDC2EEC904700FC1F17 /* CASharedLibrary.h in Headers */, + 8B8AEFA92EEC904700FC1F17 /* CATokenMap.h in Headers */, + 8B8AEF9E2EEC904700FC1F17 /* CAExtAudioFile.h in Headers */, + 8B8AEFB32EEC904700FC1F17 /* CAPThread.h in Headers */, + 8B8AEFCF2EEC904700FC1F17 /* CAPropertyAddress.h in Headers */, + 8B8AEFF92EEC904700FC1F17 /* CAReferenceCounted.h in Headers */, + 8B8AF01E2EEC904700FC1F17 /* AUBuffer.h in Headers */, + 8B8AF0002EEC904700FC1F17 /* CAMath.h in Headers */, + 8B8AEFE02EEC904700FC1F17 /* CAAutoDisposer.h in Headers */, + 8B8AEFA72EEC904700FC1F17 /* CACFObject.h in Headers */, + 8B8AEFC72EEC904700FC1F17 /* CASettingsStorage.h in Headers */, + 8B8AEFD02EEC904700FC1F17 /* CAXException.h in Headers */, + 8B8AEFED2EEC904700FC1F17 /* CATink.h in Headers */, + 8B8AF01A2EEC904700FC1F17 /* AUInputFormatConverter.h in Headers */, + 8B8AEFF52EEC904700FC1F17 /* CAVectorUnit.h in Headers */, + 8B8AEFB12EEC904700FC1F17 /* CAProcess.h in Headers */, + 8B8AEFB72EEC904700FC1F17 /* CAAudioValueRange.h in Headers */, + 8B8AEFCC2EEC904700FC1F17 /* CABitOperations.h in Headers */, + 8B8AEFC22EEC904700FC1F17 /* CAAudioFileFormats.h in Headers */, + 8B8AEFBB2EEC904700FC1F17 /* CACFNumber.h in Headers */, + 8B8AEFD32EEC904700FC1F17 /* CAAudioUnitOutputCapturer.h in Headers */, + 8B8AEFE42EEC904700FC1F17 /* CADebugMacros.h in Headers */, + 8B8AF01D2EEC904700FC1F17 /* AUMIDIDefs.h in Headers */, + 8B8AEFDD2EEC904700FC1F17 /* CACFData.h in Headers */, + 8B8AEFA62EEC904700FC1F17 /* CAStreamBasicDescription.h in Headers */, + 8B8AF00C2EEC904700FC1F17 /* AUPlugInDispatch.h in Headers */, + 8B8AEFA82EEC904700FC1F17 /* CAStreamRangedDescription.h in Headers */, + 8B8AEFE82EEC904700FC1F17 /* CACFPlugIn.h in Headers */, + 8B8AEFAB2EEC904700FC1F17 /* CAAudioBufferList.h in Headers */, + 8B8AEFC32EEC904700FC1F17 /* CAAUMIDIMapManager.h in Headers */, + 8B8AF0162EEC904700FC1F17 /* AUEffectBase.h in Headers */, + 8B8AEFB22EEC904700FC1F17 /* CACFDictionary.h in Headers */, + 8B8AF0132EEC904700FC1F17 /* AUScopeElement.h in Headers */, + 8B8AEFE32EEC904700FC1F17 /* CAComponentDescription.h in Headers */, + 8B8AF0192EEC904700FC1F17 /* AUSilentTimeout.h in Headers */, + 8B8AEFDB2EEC904700FC1F17 /* CABufferList.h in Headers */, + 8B8AF00D2EEC904700FC1F17 /* AUDispatch.h in Headers */, + 8B8AF0112EEC904700FC1F17 /* AUOutputElement.h in Headers */, + 8B8AEFD72EEC904700FC1F17 /* CALogMacros.h in Headers */, + 8B8AEFCB2EEC904700FC1F17 /* AUParamInfo.h in Headers */, + 8B8AEFEA2EEC904700FC1F17 /* CAMixMap.h in Headers */, + 8B8AEFF72EEC904700FC1F17 /* CACFArray.h in Headers */, + 8B8AEF9F2EEC904700FC1F17 /* CACFMachPort.h in Headers */, + 8B8AEFCA2EEC904700FC1F17 /* CAAUMIDIMap.h in Headers */, + 8B8AEFA22EEC904700FC1F17 /* CADebugger.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3Mono" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 8D01CCCD0486CAD60068D4B7 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3Mono; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = Dynamics3Mono; + productReference = 8D01CCD20486CAD60068D4B7 /* Dynamics3Mono.component */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1420; + }; + buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3Mono" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = en; + hasScannedForEncodings = 1; + knownRegions = ( + fr, + Base, + ja, + en, + de, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Dynamics3Mono */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3Mono */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B8AEFDA2EEC904700FC1F17 /* AUOutputBL.cpp in Sources */, + 8B8AEFFF2EEC904700FC1F17 /* CAAudioFileFormats.cpp in Sources */, + 8B8AEFF12EEC904700FC1F17 /* CAHostTimeBase.cpp in Sources */, + 8B8AEFC92EEC904700FC1F17 /* CAXException.cpp in Sources */, + 8B8AEFF32EEC904700FC1F17 /* CAAudioBufferList.cpp in Sources */, + 8B8AEFB62EEC904700FC1F17 /* CAFilePathUtils.cpp in Sources */, + 8B8AEFB42EEC904700FC1F17 /* CAAUParameter.cpp in Sources */, + 8B8AEFD62EEC904700FC1F17 /* CAAUMIDIMap.cpp in Sources */, + 8B8AF0032EEC904700FC1F17 /* CAAudioValueRange.cpp in Sources */, + 8B8AF0122EEC904700FC1F17 /* AUDispatch.cpp in Sources */, + 8B8AEFCD2EEC904700FC1F17 /* CACFPreferences.cpp in Sources */, + 8B8AF0102EEC904700FC1F17 /* AUPlugInDispatch.cpp in Sources */, + 8B8AEFAF2EEC904700FC1F17 /* CAAUProcessor.cpp in Sources */, + 8B8AEFC42EEC904700FC1F17 /* CACFDictionary.cpp in Sources */, + 8B8AF0182EEC904700FC1F17 /* AUBaseHelper.cpp in Sources */, + 8B8AEFFD2EEC904700FC1F17 /* CADebugger.cpp in Sources */, + 8B8AEFD12EEC904700FC1F17 /* CAAudioChannelLayout.cpp in Sources */, + 8B8AEFD42EEC904700FC1F17 /* AUParamInfo.cpp in Sources */, + 8B8AEFF22EEC904700FC1F17 /* CAPersistence.cpp in Sources */, + 8B8AEFE62EEC904700FC1F17 /* CADebugPrintf.cpp in Sources */, + 8B8AF01B2EEC904700FC1F17 /* AUTimestampGenerator.cpp in Sources */, + 8B8AEFEE2EEC904700FC1F17 /* CAStreamBasicDescription.cpp in Sources */, + 8B8AEFBE2EEC904700FC1F17 /* CAAUMIDIMapManager.cpp in Sources */, + 8B8AEFE92EEC904700FC1F17 /* CASettingsStorage.cpp in Sources */, + 8B8AF00E2EEC904700FC1F17 /* AUOutputElement.cpp in Sources */, + 8B8AEFBA2EEC904700FC1F17 /* CAGuard.cpp in Sources */, + 8BA05A6B0720730100365D66 /* Dynamics3Mono.cpp in Sources */, + 8B8AEFFC2EEC904700FC1F17 /* CAMutex.cpp in Sources */, + 8B8AF0152EEC904700FC1F17 /* AUEffectBase.cpp in Sources */, + 8B8AEFFA2EEC904700FC1F17 /* CACFMachPort.cpp in Sources */, + 8B8AF0092EEC904700FC1F17 /* AUBase.cpp in Sources */, + 8B8AEFD52EEC904700FC1F17 /* CASharedLibrary.cpp in Sources */, + 8B8AEFBC2EEC904700FC1F17 /* CACFDistributedNotification.cpp in Sources */, + 8B8AEFBF2EEC904700FC1F17 /* CAComponentDescription.cpp in Sources */, + 8B8AEFC62EEC904700FC1F17 /* CACFString.cpp in Sources */, + 8B8AF0062EEC904700FC1F17 /* ComponentBase.cpp in Sources */, + 8B8AEFE72EEC904700FC1F17 /* CARingBuffer.cpp in Sources */, + 8B8AF0072EEC904700FC1F17 /* AUScopeElement.cpp in Sources */, + 8B8AF0042EEC904700FC1F17 /* CAAudioUnit.cpp in Sources */, + 8B8AF0012EEC904700FC1F17 /* CACFArray.cpp in Sources */, + 8B8AEFFE2EEC904700FC1F17 /* CABundleLocker.cpp in Sources */, + 8B8AEFF02EEC904700FC1F17 /* CAProcess.cpp in Sources */, + 8B8AEFDE2EEC904700FC1F17 /* CAStreamRangedDescription.cpp in Sources */, + 8B8AEFDF2EEC904700FC1F17 /* CAPThread.cpp in Sources */, + 8B8AEFA12EEC904700FC1F17 /* CAComponent.cpp in Sources */, + 8B8AEFB92EEC904700FC1F17 /* CAAudioChannelLayoutObject.cpp in Sources */, + 8B8AEFF42EEC904700FC1F17 /* CAAudioTimeStamp.cpp in Sources */, + 8B8AEFFB2EEC904700FC1F17 /* CABufferList.cpp in Sources */, + 8B8AEFD82EEC904700FC1F17 /* CACFMessagePort.cpp in Sources */, + 8B8AEFE22EEC904700FC1F17 /* CAVectorUnit.cpp in Sources */, + 8B8AF0142EEC904700FC1F17 /* AUInputElement.cpp in Sources */, + 8B8AF01C2EEC904700FC1F17 /* AUBuffer.cpp in Sources */, + 8B8AEFC12EEC904700FC1F17 /* CADebugMacros.cpp in Sources */, + 8B8AEFA32EEC904700FC1F17 /* CACFNumber.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 8B8AF0202EEC913B00FC1F17 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3E4BA244089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + EXPORTED_SYMBOLS_FILE = Dynamics3Mono.exp; + GCC_OPTIMIZATION_LEVEL = 0; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}"; + PRODUCT_NAME = Dynamics3Mono; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + STRIP_STYLE = debugging; + WRAPPER_EXTENSION = component; + }; + name = Debug; + }; + 3E4BA245089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + EXPORTED_SYMBOLS_FILE = Dynamics3Mono.exp; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GENERATE_PKGINFO_FILE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_LDFLAGS = "-bundle"; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}"; + PRODUCT_NAME = Dynamics3Mono; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = debugging; + WRAPPER_EXTENSION = component; + }; + name = Release; + }; + 3E4BA248089833B7007656EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + 3E4BA249089833B7007656EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "Dynamics3Mono" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA244089833B7007656EC /* Debug */, + 3E4BA245089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "Dynamics3Mono" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E4BA248089833B7007656EC /* Debug */, + 3E4BA249089833B7007656EC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..6754cf72a2fff0b9958b3425b61365c41da2c2ad GIT binary patch literal 18121 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 literal 0 HcmV?d00001 diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcshareddata/xcschemes/Dynamics3Mono.xcscheme b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcshareddata/xcschemes/Dynamics3Mono.xcscheme new file mode 100644 index 000000000..ddc85d382 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcshareddata/xcschemes/Dynamics3Mono.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..3e8311d97 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3Mono.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Dynamics3Mono.xcscheme_^#shared#^_ + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Dynamics3MonoVersion.h b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3MonoVersion.h new file mode 100755 index 000000000..a40f9cfe0 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Dynamics3MonoVersion.h @@ -0,0 +1,58 @@ +/* +* File: Dynamics3MonoVersion.h +* +* Version: 1.0 +* +* Created: 11/20/25 +* +* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license +* +* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in +* consideration of your agreement to the following terms, and your use, installation, modification +* or redistribution of this Apple software constitutes acceptance of these terms. If you do +* not agree with these terms, please do not use, install, modify or redistribute this Apple +* software. +* +* In consideration of your agreement to abide by the following terms, and subject to these terms, +* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this +* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the +* Apple Software, with or without modifications, in source and/or binary forms; provided that if you +* redistribute the Apple Software in its entirety and without modifications, you must retain this +* notice and the following text and disclaimers in all such redistributions of the Apple Software. +* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to +* endorse or promote products derived from the Apple Software without specific prior written +* permission from Apple. Except as expressly stated in this notice, no other rights or +* licenses, express or implied, are granted by Apple herein, including but not limited to any +* patent rights that may be infringed by your derivative works or by other works in which the +* Apple Software may be incorporated. +* +* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR +* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY +* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE +* OR IN COMBINATION WITH YOUR PRODUCTS. +* +* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, +* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER +* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN +* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +#ifndef __Dynamics3MonoVersion_h__ +#define __Dynamics3MonoVersion_h__ + + +#ifdef DEBUG + #define kDynamics3MonoVersion 0xFFFFFFFF +#else + #define kDynamics3MonoVersion 0x00010000 +#endif + +//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~// +#define Dynamics3Mono_COMP_MANF 'Dthr' +#define Dynamics3Mono_COMP_SUBTYPE 'dym3' +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + +#endif + diff --git a/plugins/MacSignedAU/Dynamics3Mono/Info.plist b/plugins/MacSignedAU/Dynamics3Mono/Info.plist new file mode 100755 index 000000000..2baebf1b0 --- /dev/null +++ b/plugins/MacSignedAU/Dynamics3Mono/Info.plist @@ -0,0 +1,47 @@ + + + + + AudioComponents + + + description + ${PRODUCT_NAME:identifier} AU + factoryFunction + ${PRODUCT_NAME:identifier}Factory + manufacturer + Dthr + name + Airwindows: ${PRODUCT_NAME:identifier} + subtype + dym3 + type + aufx + version + 65536 + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECTNAMEASIDENTIFIER} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + DthX + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacSignedAU/Dynamics3Mono/en.lproj/InfoPlist.strings b/plugins/MacSignedAU/Dynamics3Mono/en.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..094b7c8306b879ec8047517ce95ebcc1ccf7df04 GIT binary patch literal 398 zcmZ{gI}5@<5QL}pR~(iW#wUnk5fw#Hn}EHTs6kC6@qzw$^}7=Sf^yvMWp;LVCa + + + + BuildVersion + 3 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + ${EXECUTABLE_NAME} + SourceVersion + 590000 + + diff --git a/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.cpp b/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.cpp index e0b91c22c..87f47ba4f 100755 --- a/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.cpp +++ b/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.cpp @@ -312,14 +312,32 @@ void PunchyDeluxe::PunchyDeluxeKernel::Process( const Float32 *inSourceP, } inputSample += band; inputSample *= drive; - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { inputSample *= pad; } - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function //begin 32 bit floating point dither int expon; frexpf((float)inputSample, &expon); diff --git a/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index da68654328fe9cc0725989ec33d2767d3ea393a9..b35447879ff245069557908617bdcf4e1efac847 100644 GIT binary patch delta 5854 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 R1);R^&K6YOUyU`Z{U0~z@T~v< delta 9416 zcmeHtd3;mF*Y`a$lLVSJP17Y!nzUJIX_~D`6P8xCvTud5mZg+7K%onCVTa5GaX~=v zBCP8=YHTWa6fWCaTmEu+%@hB_bc}s_dE9ocNaoH3ZW1NG6)Ab#DWUc z5DzwJ1+AeCbc9aO4SGON$cBC}2!_HiKjeWA#z6^`!gzQR=D<_%G&}>(!d!R`=D|YP z2%BItY=KwcRd@}y!t3w`Y=a%}9=s19!Cv?nK7)gB1Zv>~oPyJE2F}3+_ysP*75E+g zfLm}I?!W_t5JnOtMd2tGB_Jb8L`kSQ@>@|m)E;#}nW!V`ggT=xs4MD;d}tIJjmDrt zG!~6RMW`5+pi)$hCZTD_k7l8#&|I_ty?_L?7%fFBQ5C92HE0WZ1-*)1L)*{}^fr1Q zeS|(n2hbNa1Y#sfq&abtRN^9Tl15sRHl!_SM+TBXWH8Ag zLvj0`8aWCY10BS}6fAU-mRl#y~$K`O~aGKowkQ;45DOXia2nvr>AK3PDPl4WE$ zSw&tYuaT|fb@B$;M&2Sj$a~~NvX2}PR--52p>PJxY?@B*Q!$OE>Dvo1fhH}S&JYE*rG-(>zZ+u?G zn8Af51-{8$3QH=gL!`n@iJQp6tu?uUOB-Xtp3RjzW*;})wrs#3pWNsz5nr*Hf+TmjWlCrza~p;VeDoRb>EH*%Y~m?~})byaa&s9QKI)e4SKBHGIF+#7;M zqJuOcC$z5^hjlG@bB?erv>^N~?rko)irYb3RB`XnmV!Af#lMT&y_U8*!j*C5+y~r; z!+T}-tgOfzS>$V1R+cxVhSBzL69@LnuKQ_hJAtcvnl#L4Klc@vyoLLiJHUOyead~t zea?NseaU8jh&xQ5plxVd+K#rT9cU))NITKaw96Lm2v^G;WyU$qo#6B*xv#lzxKrF| z+Ld;vJ!ntbi}t3+=qdUu{f+)klZ0b3vw&pXgg0eIVT7!|a8IUl4DXpYxv;o!s;?ls zBCo=iE04(ZjjS9!+E6TQye7}6`d zYrq?_m|s+LH@S(A6LNZw_my-l>6bUMT+Zdn6+QB%lvY;c_VA6W=vUgeaP*jpBX#R} zi`!kr-KJTzRf9e50pgN3FiYI$9&itV17P#-L;KQf8sCrh-vAg0h}fruGt&WdAYIEo zk1{V#5+=z@lo1fc90U{)Ne9uv)ez0q(j3}d_*3q%#DTU7G;|0Zc@h#p2YN7Y;a~(4 zn4uXYLJ~BGWcHQ4CvAXf7RD3vHnt>(!pCh0L6;1-_Ds!cm33vi^1Eqa)a= z6;7F1Fhry>7dNG;3Aq)CI-ysF1`IW^?aR0tN z23Hgo`^qcwipNtQ9VM)doY=cR49Jy7W)A3=Sih?aptygpY^H5B6bbX92lT67ewYALx#W#d2IWuzl`s(| z!DN_1$I}V4jF!_1T1h9;NgH7rOotgT6Z}AdhgozookE|d3+W>I0u|^gnv^R~6ecu_ z6uwc$fFXGpvHuum;vb6;wkFtb_Hifj&v+(5L9r z^cngreU8ra)A@8kV7jp_G9Ati9XhmkxLbHSw9E839G(`L?)KilnmqrxsndUM%KT@O z?k`jN8`+Y%Lxr!byKf3J>R&vKSTYOC^NUK$eFeSpn4dD%RGZ^36}|r)tYKm;|Jl@R z+#vtIFKTvvS!q#GRw)Zrb=sKft@95PShI>MM;Dg#FV7q8Ygnf3@Mhz6dmG+qOxOv# z>Iwc}WP%Ui!yqNA4%uKI>|aag2EF|Nd@}S=SYXan0|($!ZX(+O>_@|(pTif8$2bIs zgMEZY~cGA&IYMLg}x5}(s{a=jywuKGT;cn z$4_t(F2T=(%Y8+@`~V=(m*^7uB3&u;iJi~^hqaoqE3QG@Rk#sA)@yK`E~U$=;U@e_ zm(vwAX<$}a=~&i%K+yRcK^ap>-85)~yKqnFrqYRO;7_z23DNtlXKwu%Dm~Nsq{~8RC3aNv^0L9adbX|QQcsZz!ju{^5>H0^J z0GR@jfQmK*kY6|*6YF~n$^)QHS$wa{caRNv85|-zavMK0t$G?>95 z>W#8cAJi9RqkgDA8h{3(LG(@f7TrPLrti>q>3ei1-9>kAMmcB*8j6NN70N{;P#&yD z`SgAI0sWBfVQ}~n-Anfc;Bf!{hr_?exc?3uqVZ@#<8`Y*m5m9L(Uf|^h~N6(I4qWdWj|t z3Z&eDY<_TE)*X1u2`1w`Su!NdQ^#5x>~IEsACUPiI*YzT=jb{5Jv~oNv52#e_zdX-+Q zK?k`c9Kx&+O|J`!!ySHOTmEoenN>e5j=<6X=yZs6ie-k2rZ=gc^%&8phX!kd>n?8q zW30!<2HmlV{y~%K^u&owPn?9C(_8dzP|sW$7mib~S6v!Ci+v%1AQvD)MR=sT((OK(Fk;uLiUAzyldT zAKVvb<9@h59>4>~1IxS-510qSgNO$)4-y`l@X&NK9)t(u96W^0cNiXybMXkA$3qCO zf;b+!@X(z`^Du;mi9Af=VG0jZw-*`+G{YshEHLv@JRVQrLCQlY4`DU999Q5<9%MWy zc!&|^8=v#zX_!Gw6`syRcom+>gPbNcP9*RwW}(^mNmhK@0!5Lr-2ohWX?CkD9wLHf zcnUuqoUyMOKgCUKnD(>yxq#%kJVaLEc|1h@T{4raScn(l7X~xY<#n|Y57EL6Q=guJ z+6^zpFXqa_9~n4UJ=HMs5^mxkmi5*3Xc%oNUcvAOFT=}uQ1TF4jaTATJg9h33)f72 z{kifK2YXmPpK5hDoDP@M<4JWoQr!+`$K2w){L=Et!LQuBvSN?>NZqun@sok+hB;QP z9UGW#9dUh-7=6#ryDn z9-8rx$U|!$(s{_>;Rznv@X)y~QwdfM^=YLrvzhq+W)+7IV|GIGSQUqlVwPBM#>en+ zd;*`uU*m7^DSR5A!Qb+b#6xo)l6kQ3kivtN2OAG|9vnP4H{ zSdTC9kjjJ0&x4zXG#)%WczI~SLrXfJhgScmG8unEsrXoB*QjdyUoPzYe=k{CW%oZ{ z*x^6$t;S1v7vHNR_#e6a1N^WN3qb@23BkgSNFGmRNC=TOW|xuh#sme4Y)ptD${-4`CI@W8O|$5f+Q8 z2-~P#s|eeu-GrJ%Q!Z&wdT=qDNC%QhI+9MLGwDLQl5V6s4?TG3$wMz5dh@`bwhs?| zdC2CW-zF}J^y17Ui}WFVNjB-nPViV5=ua5}uz)gx0$t*IP2OkfkcoE7u@GU2tc%HH1&hfkmIt`kgNCJ8P1dtBO*ZISQblHy8nUi#=u#e- z`lESZk*;h5*?^9bjbszc-;VK6PA~FM!9yiW<1PmDG1Td^%>J}L0Oe$RJ-&B-Z&^16 z<+*ZsztV!dDZ0E0ou`$nr7o*y(0Sfw&cj7e^e9~;I|&2sI$9NZpNGlyX$;vDIEoE$ zva@WKzmWa)=h}hyPneWI5TGNuCW77>jDh?K zhHt;JYmr;*V&opaj~}wj5jjziC=x?r*~N&4#1kE{lkw~pV;}iZghX0VOHn6Lf6+kE zV9^lKFj1~3Pn0hz6IF;NiYAMuil&QZil}Io=ta>+(Js*;k^j8t4>1vo#0qhoSSwBt z>%~TKir6N0h*QOGu}3^uTrBpB*NeA_cZzq5KM?N`?-hR`J}5pcJ|aFUJ}$l@0f}0Y zCTTC}Ajy<;lJu73Nb)7)C6$tyl4X(&l1-8=lGh}!OSVbAlpL4*D*0Vb5qdQSSY^s@A-^t$w>^q%y-^kFE3 z;!shjCe#tyHMAhqA387e`Orn7i$j-$E)Crtx-0bS&{Lsj!k!6R6t+67Dy$}KL)gZ! z&0z<_PK2Ed`zGvs*v+szGLVJHq_S99gntlzB>ZUj z@$i%3=fbaq-wb~sZz`9{b@Jx&6uC|AkY~ud$$Q9q$+P5r<^ALXzQzMSfHMoBR*??TD}lT}1PUln7gdBce}4am1pC znut9S$0E)}JXC-JD?|#3qNzfv2vdYBk`%2K-4r7gm5N0QLGhyECB-tu3dJhLA;n3> zDa9GZS;b|=EyaDs!$^q4k@84Yq`yUEM&!^)U*y=x@<YG z+bbt1mn&aZZd7hkZc)CY{8D*H`IWL(c}#gi`L*(t@{IDV@|^My`)TYCu@6;As@|%hs$r_(su8MURf(!pH9<8~g{nm=LA6-5O0`~byRgu^}Xu6>VoRB>W=EJ>YnPp zIz%m1hpJ`jB=r;O?&==up6cG}LFysuVd`APA=*%_Oe@zav{Bj^ZLGGr)}pm)?OLbSrA^a%wJo)+ zwLYz&-J`t`@7Kj=#rxwo#=jN6BmV99cjG^fKNWu_{%riY`1A1>;(v<26#q;7mH2B3 zBte|eBq1arG(naiPf#R8CB!7eCa4qA60#D;B|Md|Dd9xIO89&u=={2Qy7{^Vx`nz`y4AWhx+>jf-4@-ey7zQDb-Vn!_jRA^zR-QCJES|UJEQwn z_nq#F?yByZ?uK5f*XwP1yWXKs)wk9^p>L~iug})^*ALVW)(_Etsz0JXtN%g&qyD1) zivF7ZhW=OmU4z`9H6$A>h7^O%;5GC%^fMG0W*S~HEHkVytTL=IR2gavuNbx(-Y{%8 zd}#Q{;NNHX*idUYZMbCk#c;)N&G4sDWRw`28l}cCV~jD@s5WYh@kX7oxzS~O!Z^T~ zZ!9vF7{?pSj1|TiM!%6a&Nj|5K5blY{K$C0_`oDFH8F*llqR)FV@fdTO-7T~lxga0 z>T2p?>Sf9@6_|=mWu^+#MAKx`9Me3%X@O~>=>^j=(+bln(;8EiX{%|M>5%E9>4NF9 z>8k0v>89z9>7MDn>7g0SA!emH)~qtenYHF*v(;=jr<&bnkGYLG)7;72#oWz2&^+8c z!aUMkU>;{KHkX2^ULN<<}Kz|&0EcT%%8DT$$TogHu+fc zx5<~2e@(t?kytdA1dG99wj^0B7MsOsaa+8WR+iqDzLx%$L6#wwVU`h=e9I_Hp{2-D zVwq)GV|m50*YZtDSV}@ldP=X9!jy?AGg4^E?3AZc=BF%75mJ_jK*xz;h(Qfq~kw?1io+B(-d-}=0DrFFe^t96?V*`zkD&1AFM zTG`sz+S@wXy4iZ#vTS{A)wZu}-`LLEezaY)-L~DcH?d3YVRpGa(jIL$*vpsk6*k>74AG z=A7ZA&RNb?&Uc)(&a0^rsclkoQY%wer|wTZl3JU3H1&Au`P3g$FQopI`djMnseh#2 zc8UBhu}k7=>I!j1x}sb$E~CrjGP@F8ZWsIC0#^%HM^`6TXIEF(0M|g*AXkp7!Zp|R zl544JnQMh>o$F=SX4fmO-L4N^dtLio2V93;XI$UAF1RkbuDGtdes%rs`qPcwDt9xt z%k6fjxxMa8cV~AucTabgyRUnMyV&iY>Yndj=oZ{d+{@f6-D}*{?)C1C?w#)4?hoA` zx%az2aewYU=>E!G>ptfG&V4IQo@PvImDW3LaN2~lxoL~iUP}8W?NZur9`MLKN{`y3 z_2@iCPm0IxN%f?8T6kJ{vOOi9XFa<-`#hg{zVICLoc5gceDAs7`N{K}=bqp5zzbgD zm3n2~2yc`(#@ohQ>|N%q_OA23;eE%u)BC=6kM|Sr=iYvyA2$DH*m5mp7wTMta5*8J#n_WOU2O&KQs}sP6QNL+nl^@Q}}g-wmG` GIsXNifEOG9 diff --git a/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.cpp b/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.cpp index 8c0cca602..54b30464b 100755 --- a/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.cpp +++ b/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.cpp @@ -333,7 +333,16 @@ void PunchyGuitar::PunchyGuitarKernel::Process( const Float32 *inSourceP, } inputSample += (band*angG[9]); inputSample *= drive; - inputSample = sin(fmin(fmax(inputSample,-M_PI),M_PI)); + inputSample = fmin(fmax(inputSample,-2.032610446872596),2.032610446872596); + long double X = inputSample * inputSample; + long double temp = inputSample * X; + inputSample -= (temp*0.125); temp *= X; + inputSample += (temp*0.0078125); temp *= X; + inputSample -= (temp*0.000244140625); temp *= X; + inputSample += (temp*0.000003814697265625); temp *= X; + inputSample -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gateroller < 1.0) diff --git a/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedAU/PunchyGuitar/PunchyGuitar.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index fac4d1b91a4235483e7bff0da9d456ad203bce32..de826aee8a8668ca285bf7255ba12b99c65db18a 100644 GIT binary patch delta 6070 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 diff --git a/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 52145e8788d80cabf54f041eee934d90d9170d71..5b4e263165370d7cbd65e4382ac93f2e5f5a6b55 100755 GIT binary patch delta 9807 zcmaiZ2V9d^_y0Zj-iIBMfRz; zWAl3@yWd8gP-oNw^+LT-2^xZiqEa*rjYeaT8%;&i&~!8d%|vt1BD5GSLGPh*v=XgC z8_|bo6WW1xqFrb=`UD+7htN^*yxBh3=xC&^`1s`UO2ef1;Ow zfPw&l5CpX$0wUcI1!HoK8MS24ZeUI@B{n^ci|`a6&}MAcn&Wx!4&&rDGtZAa3qexu~>=K zSc7#q1sicA+!!~(O>r~a9JjzNaVy*!x54f45Ihu@;$gT9562_$NIVLU#$)hUJPuF9 zlkgNg6)(n1@KQHkhL_{_@Cy7P-h?;fE%+n66>r14@hA8oK8a7^)A$0ug0JEm_%^8K}tH~O&maHS|$p>Tu z*+@Plo5*Ieo$Mfc$Wd~Pd`6Cw6XYbhL@tvn#GW zq@(C)I)+Z6Q|UB1oz9@MsfRA0%V;@WPd}g==ytk;?xcI@DSDcop=aqidY*nxFVL^( z4f-|xhTf)+=pXb?`cfbQ6$BwrkO-kdm{1fh)DqqjqJ&r>UPuy5Lb_lVG6jd=5}FGw zgqA`pp|#LPcw6WobQQV@-Gx3vq0m?8FANq+gdxI6VXWX5m>>$1g_*)UVTrI*s1PcJ zb;2fLhp=BbAbchq7fuK#Jw2$CY-3taIb9ImixslrY#dw0mb0~N3){-{+ZqX(K$|OTe$O48~1dHbBa@GLaD zd#iR0i+h(9mkcf_9bL)aSZrQ%X+kG*K&AS zL9c;@^-4<%MpvPwXgSL3)T*8Dv07{edOu$lULzP*_|LReXoYuTΠ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 diff --git a/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/xcshareddata/xcschemes/ConsoleHBuss.xcscheme b/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/xcshareddata/xcschemes/ConsoleHBuss.xcscheme index 8cd8fb270..88561c710 100644 --- a/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/xcshareddata/xcschemes/ConsoleHBuss.xcscheme +++ b/plugins/MacSignedVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/xcshareddata/xcschemes/ConsoleHBuss.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.cpp b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.cpp index c72d32c91..a43c7d260 100755 --- a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.cpp +++ b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.cpp @@ -34,7 +34,7 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 diff --git a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.h b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.h index b2dd09fca..9c239ca3a 100755 --- a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.h +++ b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBuss.h @@ -95,25 +95,16 @@ private: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBussProc.cpp b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBussProc.cpp index ace7e9f96..91a6ee2fc 100755 --- a/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBussProc.cpp +++ b/plugins/MacSignedVST/ConsoleHBuss/source/ConsoleHBussProc.cpp @@ -28,37 +28,47 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; double sloRez = pow(1.0-THR,10.0) / overallscale; @@ -248,101 +258,79 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -405,47 +393,39 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -487,35 +467,45 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-THR, 6.0) * 8.0; @@ -707,101 +697,79 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -864,47 +832,39 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 1abf06fbd3cf70a5c2d3dfd2553f391320af39d4..dc60ae0c9c994231cbc663964c3fc06cf990025e 100755 GIT binary patch delta 9854 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 A+W-In delta 12127 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 diff --git a/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/xcshareddata/xcschemes/ConsoleHChannel.xcscheme b/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/xcshareddata/xcschemes/ConsoleHChannel.xcscheme index 53292d4a9..8c48f7029 100644 --- a/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/xcshareddata/xcschemes/ConsoleHChannel.xcscheme +++ b/plugins/MacSignedVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/xcshareddata/xcschemes/ConsoleHChannel.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.cpp b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.cpp index 2d49c52ca..9ee7ba52c 100755 --- a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.cpp +++ b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.cpp @@ -61,10 +61,10 @@ ConsoleHChannel::ConsoleHChannel(audioMasterCallback audioMaster) : } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.h b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.h index c3cb7a9f5..7a20001ea 100755 --- a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.h +++ b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannel.h @@ -145,26 +145,18 @@ private: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp index 9910d71bc..f2b5d4449 100755 --- a/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp +++ b/plugins/MacSignedVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp @@ -22,6 +22,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -159,393 +173,359 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -572,7 +552,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { @@ -654,6 +634,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -671,110 +652,123 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -791,393 +785,359 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1204,7 +1164,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 98656486c29ebd3a32defcade75ddcce55859cba..f7b97efa8b07d926277d960f543d43439c0c78a3 100755 GIT binary patch delta 10496 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 Hw`}r10Fi^g delta 14218 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%0D%YX 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 WHlTxV{q7N=`m2-M` diff --git a/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/xcshareddata/xcschemes/ConsoleHPre.xcscheme b/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/xcshareddata/xcschemes/ConsoleHPre.xcscheme index ef8d9e4eb..f23ee359c 100644 --- a/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/xcshareddata/xcschemes/ConsoleHPre.xcscheme +++ b/plugins/MacSignedVST/ConsoleHPre/ConsoleHPre.xcodeproj/xcshareddata/xcschemes/ConsoleHPre.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.cpp b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.cpp index 49e8d328d..c500b6c68 100755 --- a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.cpp +++ b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.cpp @@ -60,10 +60,11 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxFL = 0.0; bezMaxFR = 0.0; - bezCompS[bez_cycle] = 1.0; bezGateL = 2.0; bezGateR = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.h b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.h index 066568e3a..f242a79cb 100755 --- a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.h +++ b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPre.h @@ -146,25 +146,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxFL; - double bezMaxFR; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; double bezGateL; + double bezMaxR; + double bezMinR; double bezGateR; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPreProc.cpp b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPreProc.cpp index 11dc2eb7e..88ffee948 100755 --- a/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPreProc.cpp +++ b/plugins/MacSignedVST/ConsoleHPre/source/ConsoleHPreProc.cpp @@ -22,6 +22,7 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -158,398 +172,373 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -644,6 +633,7 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -661,110 +651,123 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -780,398 +783,373 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index af68e24b09682a4a9a6164109ec4ac5e7b553f13..5b1027d936c580d09acc9b377b37fce4d687fdf6 100755 GIT binary patch delta 11959 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 delta 14080 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 LUEfWg9b5h%A)Gt{ diff --git a/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/xcshareddata/xcschemes/ConsoleX2Buss.xcscheme b/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/xcshareddata/xcschemes/ConsoleX2Buss.xcscheme index 1c8a39986..99c3f1eae 100644 --- a/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/xcshareddata/xcschemes/ConsoleX2Buss.xcscheme +++ b/plugins/MacSignedVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/xcshareddata/xcschemes/ConsoleX2Buss.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp index d27cd2cec..a5f742744 100755 --- a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp +++ b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp @@ -12,17 +12,17 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.5; - B = 0.5; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 1.0; - J = 0.5; - K = 0.5; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -44,7 +44,7 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -94,17 +94,17 @@ static float pinParameter(float data) VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; + chunkData[0] = HIG; + chunkData[1] = HMG; + chunkData[2] = LMG; + chunkData[3] = BSG; + chunkData[4] = HIF; + chunkData[5] = HMF; + chunkData[6] = LMF; + chunkData[7] = BSF; + chunkData[8] = THR; + chunkData[9] = PAN; + chunkData[10] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -116,17 +116,17 @@ VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); + HIG = pinParameter(chunkData[0]); + HMG = pinParameter(chunkData[1]); + LMG = pinParameter(chunkData[2]); + BSG = pinParameter(chunkData[3]); + HIF = pinParameter(chunkData[4]); + HMF = pinParameter(chunkData[5]); + LMF = pinParameter(chunkData[6]); + BSF = pinParameter(chunkData[7]); + THR = pinParameter(chunkData[8]); + PAN = pinParameter(chunkData[9]); + FAD = pinParameter(chunkData[10]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -136,85 +136,85 @@ VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Buss::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Buss::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Buss::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Buss::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: float2string (A, text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Buss::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.h b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.h index f13fa39c5..1fa28c929 100755 --- a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.h +++ b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2Buss.h @@ -16,17 +16,17 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, + kParamHIG =0, + kParamHMG =1, + kParamLMG =2, + kParamBSG =3, + kParamHIF =4, + kParamHMF =5, + kParamLMF =6, + kParamBSF =7, + kParamTHR =8, + kParamPAN =9, + kParamFAD =10, kNumParameters = 11 }; // @@ -62,17 +62,17 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float PAN; + float FAD; enum { biq_freq, @@ -108,26 +108,17 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 - + //Dynamics2 custom for buss + double avg32L[33]; double avg32R[33]; double avg16L[17]; diff --git a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp index ccc0d1399..55c705365 100755 --- a/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp +++ b/plugins/MacSignedVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp @@ -21,133 +21,142 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -167,198 +176,177 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -403,47 +391,39 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -478,133 +458,142 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -624,198 +613,177 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -860,48 +828,39 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 8b3e781a0a6f0d96f35e806160ba8fb2aed2bd51..dd2ad956e96755dbf018ecfa952d0c20fa01f4cd 100755 GIT binary patch delta 9820 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 diff --git a/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/xcshareddata/xcschemes/ConsoleX2Channel.xcscheme b/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/xcshareddata/xcschemes/ConsoleX2Channel.xcscheme index d33b046d8..a501ff082 100644 --- a/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/xcshareddata/xcschemes/ConsoleX2Channel.xcscheme +++ b/plugins/MacSignedVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/xcshareddata/xcschemes/ConsoleX2Channel.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp index 1d253c15a..2129cd918 100755 --- a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp +++ b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp @@ -12,24 +12,24 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; - R = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -50,10 +50,10 @@ ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -130,24 +130,24 @@ static float pinParameter(float data) VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; - chunkData[17] = R; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = PAN; + chunkData[17] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -159,24 +159,24 @@ VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); - R = pinParameter(chunkData[17]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + PAN = pinParameter(chunkData[16]); + FAD = pinParameter(chunkData[17]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -186,120 +186,120 @@ VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPrese void ConsoleX2Channel::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; - case kParamR: R = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Channel::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; - case kParamR: return R; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Channel::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; - case kParamR: float2string (R, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Channel::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.h b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.h index 7862eafbc..2b57ebb85 100755 --- a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.h +++ b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2Channel.h @@ -16,24 +16,24 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, - kParamR =17, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamPAN =16, + kParamFAD =17, kNumParameters = 18 }; // const int dscBuf = 256; @@ -70,24 +70,24 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; - float R; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float PAN; + float FAD; enum { biq_freq, @@ -123,26 +123,18 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp index 906bc23a4..127bf13bc 100755 --- a/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp +++ b/plugins/MacSignedVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp @@ -21,149 +21,158 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -173,307 +182,265 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -525,7 +492,7 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 } //blank out lowpass if just switched off } //Cabs2 - + double gainR = (panA*temp)+(panB*(1.0-temp)); double gainL = 1.57079633-gainR; gainR = sin(gainR); gainL = sin(gainL); @@ -581,149 +548,158 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -733,307 +709,265 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index ac2c8378dc21be1a349fdd62e8adf7e22c7acd04..450194f46c0fc5ca6179d56cbe4742bc3e9566fe 100755 GIT binary patch delta 9976 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 E12_=hfB*mh delta 13673 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 @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp index 1d6244eab..37598510d 100755 --- a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp +++ b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp @@ -12,23 +12,23 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -49,10 +49,11 @@ ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -128,23 +129,23 @@ static float pinParameter(float data) VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -156,23 +157,23 @@ VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + FAD = pinParameter(chunkData[16]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -182,115 +183,115 @@ VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Pre::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Pre::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Pre::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Pre::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Pre::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.h b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.h index 3fa48a8f8..5ea8485af 100755 --- a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.h +++ b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2Pre.h @@ -16,23 +16,23 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamFAD =16, kNumParameters = 17 }; // const int dscBuf = 256; @@ -69,23 +69,23 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float FAD; enum { biq_freq, @@ -124,23 +124,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; - double bezGate; - //Dynamics2 + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; + double bezGateL; + double bezMaxR; + double bezMinR; + double bezGateR; + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp index 4c8abed86..18ab0486d 100755 --- a/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp +++ b/plugins/MacSignedVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp @@ -21,148 +21,157 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - - inTrimA = inTrimB; inTrimB = Q*2.0; + + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -172,309 +181,285 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -526,7 +511,7 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa } //blank out lowpass if just switched off } //Cabs2 - + double gain = (inTrimA*temp)+(inTrimB*(1.0-temp)); if (gain > 1.0) gain *= gain; if (gain < 1.0) gain = 1.0-pow(1.0-gain,2); @@ -567,149 +552,158 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst overallscale *= getSampleRate(); int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = Q*2.0; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -718,310 +712,286 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleR = *in2; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section + inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..eba446f40 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,108 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3 */; + codeSenseManager = 8B02375F1D42B1C400E1E8C8 /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 364, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 324, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786891871; + PBXWorkspaceStateSaveDate = 786891871; + }; + sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; + userBuildSettings = { + }; + }; + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {948, 2682}}"; + sepNavSelRange = "{626, 0}"; + sepNavVisRange = "{4021, 1604}"; + sepNavWindowFrame = "{{12, 47}, {895, 831}}"; + }; + }; + 245463B80991757100464AD3 /* Dynamics3.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1110, 1476}}"; + sepNavSelRange = "{2526, 0}"; + sepNavVisRange = "{0, 1139}"; + sepNavWindowFrame = "{{20, 47}, {895, 831}}"; + }; + }; + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {859, 20267}}"; + sepNavSelRange = "{10616, 0}"; + sepNavVisRange = "{9653, 2414}"; + sepNavWindowFrame = "{{15, 42}, {895, 831}}"; + }; + }; + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {975, 2952}}"; + sepNavSelRange = "{4749, 0}"; + sepNavVisRange = "{2763, 1253}"; + sepNavWindowFrame = "{{31, 42}, {895, 831}}"; + }; + }; + 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8B02375F1D42B1C400E1E8C8 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..1187683d4 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1503 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8B02375D1D42B1C400E1E8C8 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 810 + 810 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 185 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 6 + 4 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {185, 428}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {202, 446}} + GroupTreeTableConfiguration + + MainColumn + 185 + + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 202pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8B0237581D42B1C400E1E8C8 + PBXProjectModuleLabel + Gain.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8B0237591D42B1C400E1E8C8 + PBXProjectModuleLabel + Gain.h + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {603, 0}} + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + Proportion + 441pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {603, 414}} + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {603, 282}} + + Module + PBXBuildResultsModule + + + + + Proportion + 603pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AAFC22EE7071A00A3F512 + 1CA23ED40692098700951B8B + 8B5AAFC32EE7071A00A3F512 + 8B0237581D42B1C400E1E8C8 + 8B5AAFC42EE7071A00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + 1 + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0% + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 213}} + {{395, 0}, {415, 213}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 213}} + {{0, 213}, {810, 225}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 7}, {810, 438}} + + Module + PBXDebugSessionModule + Proportion + 443pt + + + Name + Debug + ServiceClasses + + XCModuleDock + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + XCConsole + + TableOfContents + + 1CC8E6A5069209BD00BB180A + 1CC8E6A6069209BD00BB180A + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 1CC8E6A7069209BD00BB180A + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786892570.31316698 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AAFC52EE7071A00A3F512 + /Users/christopherjohnson/Desktop/Dynamics3/Dynamics3.xcodeproj + + WindowString + 38 299 810 487 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.projectFormatConflicts + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 8BCAE52E1D49920D0047D4BD + + GeometryConfiguration + + Frame + {{0, 0}, {472, 302}} + RubberWindowFrame + 569 378 472 322 0 0 1440 878 + + Module + XCProjectFormatConflictsModule + Proportion + 302pt + + + Proportion + 302pt + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + + TableOfContents + + 8BCAE52F1D49920D0047D4BD + 8BCAE5301D49920D0047D4BD + 8BCAE52E1D49920D0047D4BD + + WindowContentMinSize + 450 300 + WindowString + 569 378 472 322 0 0 1440 878 + WindowToolGUID + 8BCAE52F1D49920D0047D4BD + WindowToolIsVisible + + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj new file mode 100755 index 000000000..bd2c3097d --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj @@ -0,0 +1,462 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 2407DEB9089929BA00EB68BF /* Dynamics3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */; }; + 245463B90991757100464AD3 /* Dynamics3.h in Headers */ = {isa = PBXBuildFile; fileRef = 245463B80991757100464AD3 /* Dynamics3.h */; }; + 24CFB70407E7A0220081BD57 /* PkgInfo in Resources */ = {isa = PBXBuildFile; fileRef = 24CFB70307E7A0220081BD57 /* PkgInfo */; }; + 24D8287009A914000093AEF8 /* Dynamics3Proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */; }; + 24D8287F09A9164A0093AEF8 /* xcode_vst_prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */; }; + 8B2242F72EEC9303009150EE /* vstfxstore.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242EB2EEC9303009150EE /* vstfxstore.h */; }; + 8B2242F82EEC9303009150EE /* aeffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242EC2EEC9303009150EE /* aeffect.h */; }; + 8B2242F92EEC9303009150EE /* aeffectx.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242ED2EEC9303009150EE /* aeffectx.h */; }; + 8B2242FA2EEC9303009150EE /* audioeffectx.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242F12EEC9303009150EE /* audioeffectx.h */; }; + 8B2242FB2EEC9303009150EE /* audioeffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B2242F22EEC9303009150EE /* audioeffect.cpp */; }; + 8B2242FC2EEC9303009150EE /* audioeffectx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B2242F32EEC9303009150EE /* audioeffectx.cpp */; }; + 8B2242FD2EEC9303009150EE /* aeffeditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242F42EEC9303009150EE /* aeffeditor.h */; }; + 8B2242FE2EEC9303009150EE /* vstplugmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B2242F52EEC9303009150EE /* vstplugmain.cpp */; }; + 8B2242FF2EEC9303009150EE /* audioeffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2242F62EEC9303009150EE /* audioeffect.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2407DE920899296600EB68BF /* Dynamics3.vst */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3.vst; sourceTree = BUILT_PRODUCTS_DIR; }; + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Dynamics3.cpp; path = source/Dynamics3.cpp; sourceTree = ""; }; + 245463B80991757100464AD3 /* Dynamics3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Dynamics3.h; path = source/Dynamics3.h; sourceTree = ""; }; + 24CFB70307E7A0220081BD57 /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PkgInfo; path = mac/PkgInfo; sourceTree = ""; }; + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Dynamics3Proc.cpp; path = source/Dynamics3Proc.cpp; sourceTree = ""; }; + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = xcode_vst_prefix.h; path = mac/xcode_vst_prefix.h; sourceTree = SOURCE_ROOT; }; + 8B2242EB2EEC9303009150EE /* vstfxstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstfxstore.h; sourceTree = ""; }; + 8B2242EC2EEC9303009150EE /* aeffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffect.h; sourceTree = ""; }; + 8B2242ED2EEC9303009150EE /* aeffectx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffectx.h; sourceTree = ""; }; + 8B2242F12EEC9303009150EE /* audioeffectx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audioeffectx.h; sourceTree = ""; }; + 8B2242F22EEC9303009150EE /* audioeffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audioeffect.cpp; sourceTree = ""; }; + 8B2242F32EEC9303009150EE /* audioeffectx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audioeffectx.cpp; sourceTree = ""; }; + 8B2242F42EEC9303009150EE /* aeffeditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffeditor.h; sourceTree = ""; }; + 8B2242F52EEC9303009150EE /* vstplugmain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstplugmain.cpp; sourceTree = ""; }; + 8B2242F62EEC9303009150EE /* audioeffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audioeffect.h; sourceTree = ""; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = mac/Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* FM-Chopper */ = { + isa = PBXGroup; + children = ( + 19C28FB4FE9D528D11CA2CBB /* Products */, + 089C167CFE841241C02AAC07 /* Resources */, + 08FB77ADFE841716C02AAC07 /* Source */, + ); + name = "FM-Chopper"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */, + 24CFB70307E7A0220081BD57 /* PkgInfo */, + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8B2242E82EEC9303009150EE /* vstsdk2.4 */, + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */, + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */, + 245463B80991757100464AD3 /* Dynamics3.h */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2407DE920899296600EB68BF /* Dynamics3.vst */, + ); + name = Products; + sourceTree = ""; + }; + 8B2242E82EEC9303009150EE /* vstsdk2.4 */ = { + isa = PBXGroup; + children = ( + 8B2242E92EEC9303009150EE /* pluginterfaces */, + 8B2242EE2EEC9303009150EE /* public.sdk */, + ); + name = vstsdk2.4; + path = ../../../../vstsdk2.4; + sourceTree = ""; + }; + 8B2242E92EEC9303009150EE /* pluginterfaces */ = { + isa = PBXGroup; + children = ( + 8B2242EA2EEC9303009150EE /* vst2.x */, + ); + path = pluginterfaces; + sourceTree = ""; + }; + 8B2242EA2EEC9303009150EE /* vst2.x */ = { + isa = PBXGroup; + children = ( + 8B2242EB2EEC9303009150EE /* vstfxstore.h */, + 8B2242EC2EEC9303009150EE /* aeffect.h */, + 8B2242ED2EEC9303009150EE /* aeffectx.h */, + ); + path = vst2.x; + sourceTree = ""; + }; + 8B2242EE2EEC9303009150EE /* public.sdk */ = { + isa = PBXGroup; + children = ( + 8B2242EF2EEC9303009150EE /* source */, + ); + path = public.sdk; + sourceTree = ""; + }; + 8B2242EF2EEC9303009150EE /* source */ = { + isa = PBXGroup; + children = ( + 8B2242F02EEC9303009150EE /* vst2.x */, + ); + path = source; + sourceTree = ""; + }; + 8B2242F02EEC9303009150EE /* vst2.x */ = { + isa = PBXGroup; + children = ( + 8B2242F12EEC9303009150EE /* audioeffectx.h */, + 8B2242F22EEC9303009150EE /* audioeffect.cpp */, + 8B2242F32EEC9303009150EE /* audioeffectx.cpp */, + 8B2242F42EEC9303009150EE /* aeffeditor.h */, + 8B2242F52EEC9303009150EE /* vstplugmain.cpp */, + 8B2242F62EEC9303009150EE /* audioeffect.h */, + ); + path = vst2.x; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B2242FD2EEC9303009150EE /* aeffeditor.h in Headers */, + 245463B90991757100464AD3 /* Dynamics3.h in Headers */, + 8B2242FF2EEC9303009150EE /* audioeffect.h in Headers */, + 8B2242F82EEC9303009150EE /* aeffect.h in Headers */, + 24D8287F09A9164A0093AEF8 /* xcode_vst_prefix.h in Headers */, + 8B2242FA2EEC9303009150EE /* audioeffectx.h in Headers */, + 8B2242F72EEC9303009150EE /* vstfxstore.h in Headers */, + 8B2242F92EEC9303009150EE /* aeffectx.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24BEAAED08919AE700E695F9 /* Build configuration list for PBXNativeTarget "Dynamics3" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 24CFB70807E7A07C0081BD57 /* Copy PkgInfo */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = "FM-Chopper"; + productReference = 2407DE920899296600EB68BF /* Dynamics3.vst */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1420; + }; + buildConfigurationList = 24BEAAF108919AE700E695F9 /* Build configuration list for PBXProject "Dynamics3" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = en; + hasScannedForEncodings = 1; + knownRegions = ( + en, + fr, + de, + Base, + ja, + ); + mainGroup = 089C166AFE841209C02AAC07 /* FM-Chopper */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24CFB70407E7A0220081BD57 /* PkgInfo in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 24CFB70807E7A07C0081BD57 /* Copy PkgInfo */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy PkgInfo"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "cp mac/PkgInfo \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.vst/Contents/\""; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B2242FC2EEC9303009150EE /* audioeffectx.cpp in Sources */, + 2407DEB9089929BA00EB68BF /* Dynamics3.cpp in Sources */, + 8B2242FB2EEC9303009150EE /* audioeffect.cpp in Sources */, + 8B2242FE2EEC9303009150EE /* vstplugmain.cpp in Sources */, + 24D8287009A914000093AEF8 /* Dynamics3Proc.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 24BEAAEE08919AE700E695F9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = ""; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/vstsdk2.4/**"; + INFOPLIST_FILE = ./mac/Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST"; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.airwindows.Dynamics3; + PRODUCT_NAME = Dynamics3; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SECTORDER_FLAGS = ""; + STRIP_STYLE = debugging; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = vst; + }; + name = Debug; + }; + 24BEAAEF08919AE700E695F9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; + CODE_SIGN_STYLE = Manual; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/vstsdk2.4/**"; + INFOPLIST_FILE = ./mac/Info.plist; + INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/VST"; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 11.1; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.airwindows.Dynamics3; + PRODUCT_NAME = Dynamics3; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SECTORDER_FLAGS = ""; + SKIP_INSTALL = NO; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = debugging; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = vst; + }; + name = Release; + }; + 24BEAAF208919AE700E695F9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_MODEL_TUNING = G5; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = ""; + INFOPLIST_PREPROCESS = NO; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 24BEAAF308919AE700E695F9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_MODEL_TUNING = G4; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = s; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = ""; + INFOPLIST_PREPROCESS = NO; + MACOSX_DEPLOYMENT_TARGET = 11.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 24BEAAED08919AE700E695F9 /* Build configuration list for PBXNativeTarget "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24BEAAEE08919AE700E695F9 /* Debug */, + 24BEAAEF08919AE700E695F9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 24BEAAF108919AE700E695F9 /* Build configuration list for PBXProject "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24BEAAF208919AE700E695F9 /* Debug */, + 24BEAAF308919AE700E695F9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 000000000..a80c03824 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100755 index 0000000000000000000000000000000000000000..34d38f551e9d140737b126502ecce047d75ea126 GIT binary patch literal 24532 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 F`F|+uK^*`9 literal 0 HcmV?d00001 diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100755 index 0000000000000000000000000000000000000000..314de0ff8716f1de186bd9e12b891393458717e5 GIT binary patch literal 10373 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 Ee-@_#ZU6uP literal 0 HcmV?d00001 diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 new file mode 100755 index 000000000..c5723261d --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 @@ -0,0 +1,1372 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Xcode3/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 91857D9F148EF61800AAA11B + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 089C1671FE841209C02AAC07 + 19C28FB4FE9D528D11CA2CBB + 089C167CFE841241C02AAC07 + 08FB77ADFE841716C02AAC07 + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 11 + 10 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 693}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 711}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + Gain.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + Gain.cpp + _historyCapacity + 0 + bookmark + 911C2A9D1491A5F600A430AF + history + + 915DCCBB1491A5B8008574E6 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {1053, 508}} + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + PBXNavigatorGroup + Proportion + 508pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 513}, {1053, 198}} + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + XCDetailModule + Proportion + 198pt + + + Proportion + 1053pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 911C2A901491A5F600A430AF + 1CE0B1FE06471DED0097A5F4 + 911C2A911491A5F600A430AF + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Xcode3/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 91857DA0148EF61800AAA11B + /Users/spiadmin/Documents/Gain/Gain.xcodeproj + + WindowString + 286 197 1261 752 0 0 1680 1028 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {743, 413}} + RubberWindowFrame + 112 208 743 695 0 0 1680 1028 + + Module + PBXNavigatorGroup + Proportion + 413pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 418}, {743, 236}} + RubberWindowFrame + 112 208 743 695 0 0 1680 1028 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 654pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 91857DA0148EF61800AAA11B + 911C2A921491A5F600A430AF + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 112 208 743 695 0 0 1680 1028 + WindowToolGUID + 91857DA0148EF61800AAA11B + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser new file mode 100755 index 000000000..df947808e --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser @@ -0,0 +1,143 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Gain */; + codeSenseManager = 91857D95148EF55400AAA11B /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 829, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 789, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 345089498; + PBXWorkspaceStateSaveDate = 345089498; + }; + perUserProjectItems = { + 911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = 911C2A9D1491A5F600A430AF /* PBXTextBookmark */; + 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */; + }; + sourceControlManager = 91857D94148EF55400AAA11B /* Source Control */; + userBuildSettings = { + }; + }; + 2407DEB6089929BA00EB68BF /* Gain.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 1768}}"; + sepNavSelRange = "{247, 0}"; + sepNavVisRange = "{0, 1657}"; + }; + }; + 245463B80991757100464AD3 /* Gain.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 975}}"; + sepNavSelRange = "{1552, 0}"; + sepNavVisRange = "{796, 1857}"; + sepNavWindowFrame = "{{15, 465}, {750, 558}}"; + }; + }; + 24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 488}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 798}"; + }; + }; + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {859, 19825}}"; + sepNavSelRange = "{10641, 0}"; + sepNavVisRange = "{10076, 1095}"; + }; + }; + 24D8286F09A914000093AEF8 /* GainProc.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 482}}"; + sepNavSelRange = "{239, 0}"; + sepNavVisRange = "{0, 950}"; + }; + }; + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 493}}"; + sepNavSelRange = "{249, 0}"; + sepNavVisRange = "{0, 249}"; + }; + }; + 8D01CCC60486CAD60068D4B7 /* Gain */ = { + activeExec = 0; + }; + 911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */; + name = "Gain.cpp: 10"; + rLen = 0; + rLoc = 247; + rType = 0; + vrLen = 1657; + vrLoc = 0; + }; + 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */; + name = "Gain.cpp: 10"; + rLen = 0; + rLoc = 247; + rType = 0; + vrLen = 1625; + vrLoc = 0; + }; + 91857D94148EF55400AAA11B /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 91857D95148EF55400AAA11B /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; +} diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme new file mode 100644 index 000000000..ec9d145ca --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcshareddata/xcschemes/Dynamics3.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 000000000..80296c60f --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Dynamics3.xcscheme_^#shared#^_ + + orderHint + 1 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 000000000..a7bdd62d4 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + «PROJECTNAME».xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme new file mode 100755 index 000000000..0df2de4a3 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacSignedVST/Dynamics3/mac/Info.plist b/plugins/MacSignedVST/Dynamics3/mac/Info.plist new file mode 100755 index 000000000..4084cacc5 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/mac/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Dynamics3 + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + Dthr + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacSignedVST/Dynamics3/mac/PkgInfo b/plugins/MacSignedVST/Dynamics3/mac/PkgInfo new file mode 100755 index 000000000..19a9cf67e --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/mac/PkgInfo @@ -0,0 +1 @@ +BNDL???? \ No newline at end of file diff --git a/plugins/MacSignedVST/Dynamics3/mac/xcode_vst_prefix.h b/plugins/MacSignedVST/Dynamics3/mac/xcode_vst_prefix.h new file mode 100755 index 000000000..eaf4c0b4b --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/mac/xcode_vst_prefix.h @@ -0,0 +1,17 @@ +#define MAC 1 +#define MACX 1 + +#define USE_NAMESPACE 0 + +#define TARGET_API_MAC_CARBON 1 +#define USENAVSERVICES 1 + +#define __CF_USE_FRAMEWORK_INCLUDES__ + +#if __MWERKS__ +#define __NOEXTENSIONS__ +#endif + +#define QUARTZ 1 + +#include \ No newline at end of file diff --git a/plugins/MacSignedVST/Dynamics3/source/Dynamics3.cpp b/plugins/MacSignedVST/Dynamics3/source/Dynamics3.cpp new file mode 100755 index 000000000..47424b601 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/source/Dynamics3.cpp @@ -0,0 +1,148 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Dynamics3(audioMaster);} + +Dynamics3::Dynamics3(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 1.0; + B = 0.5; + C = 0.5; + D = 0.0; + + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + setUniqueID(kUniqueId); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +Dynamics3::~Dynamics3() {} +VstInt32 Dynamics3::getVendorVersion () {return 1000;} +void Dynamics3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void Dynamics3::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 Dynamics3::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 Dynamics3::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void Dynamics3::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float Dynamics3::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Dynamics3::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Dynamics3::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Dynamics3::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Dynamics3::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Dynamics3::getEffectName(char* name) { + vst_strncpy(name, "Dynamics3", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Dynamics3::getPlugCategory() {return kPlugCategEffect;} + +bool Dynamics3::getProductString(char* text) { + vst_strncpy (text, "airwindows Dynamics3", kVstMaxProductStrLen); return true; +} + +bool Dynamics3::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugins/MacSignedVST/Dynamics3/source/Dynamics3.h b/plugins/MacSignedVST/Dynamics3/source/Dynamics3.h new file mode 100755 index 000000000..9e23dffc8 --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/source/Dynamics3.h @@ -0,0 +1,81 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#define __Dynamics3_H + +#ifndef __audioeffect__ +#include "audioeffectx.h" +#endif + +#include +#include +#include + +enum { + kParamA =0, + kParamB =1, + kParamC =2, + kParamD =3, + kNumParameters = 4 +}; // + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'dyn3'; //Change this to what the AU identity is! + +class Dynamics3 : + public AudioEffectX +{ +public: + Dynamics3(audioMasterCallback audioMaster); + ~Dynamics3(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual VstInt32 getChunk (void** data, bool isPreset); + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + float C; + float D; + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif diff --git a/plugins/MacSignedVST/Dynamics3/source/Dynamics3Proc.cpp b/plugins/MacSignedVST/Dynamics3/source/Dynamics3Proc.cpp new file mode 100755 index 000000000..86a8fb63e --- /dev/null +++ b/plugins/MacSignedVST/Dynamics3/source/Dynamics3Proc.cpp @@ -0,0 +1,160 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +void Dynamics3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Dynamics3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 2ce2f2daa8962eea682152665e383cf3ebeea7d4..83f94cbcc052a2c4a88118fe223fc099768e95a0 100755 GIT binary patch delta 9960 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⁢sp)8LvMMJ62S|T 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 delta 13666 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 diff --git a/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/xcshareddata/xcschemes/PunchyDeluxe.xcscheme b/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/xcshareddata/xcschemes/PunchyDeluxe.xcscheme index 6de26d5c0..25c9c78c5 100644 --- a/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/xcshareddata/xcschemes/PunchyDeluxe.xcscheme +++ b/plugins/MacSignedVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/xcshareddata/xcschemes/PunchyDeluxe.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp b/plugins/MacSignedVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp index 140e739fc..0eef3c796 100755 --- a/plugins/MacSignedVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp +++ b/plugins/MacSignedVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp @@ -77,7 +77,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -90,7 +99,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { @@ -190,7 +208,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -203,7 +230,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { diff --git a/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate index 6a8ead0b7cae721ed76eef96498fe497a7b8e422..adce129d5bcacdc9d80667b3bfd4d5075f845b0a 100755 GIT binary patch delta 9970 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 Chi=dS diff --git a/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/xcshareddata/xcschemes/PunchyGuitar.xcscheme b/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/xcshareddata/xcschemes/PunchyGuitar.xcscheme index 10953d9b9..a4e969283 100644 --- a/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/xcshareddata/xcschemes/PunchyGuitar.xcscheme +++ b/plugins/MacSignedVST/PunchyGuitar/PunchyGuitar.xcodeproj/xcshareddata/xcschemes/PunchyGuitar.xcscheme @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@ diff --git a/plugins/MacSignedVST/PunchyGuitar/source/PunchyGuitarProc.cpp b/plugins/MacSignedVST/PunchyGuitar/source/PunchyGuitarProc.cpp index 02396a754..1cffc39b1 100755 --- a/plugins/MacSignedVST/PunchyGuitar/source/PunchyGuitarProc.cpp +++ b/plugins/MacSignedVST/PunchyGuitar/source/PunchyGuitarProc.cpp @@ -90,7 +90,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -161,7 +170,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) @@ -291,7 +309,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -362,7 +389,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) diff --git a/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser index 5008459bc..a4a9cda42 100755 --- a/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784133798; - PBXWorkspaceStateSaveDate = 784133798; + PBXPerProjectTemplateStateSaveDate = 787078939; + PBXWorkspaceStateSaveDate = 787078939; }; perUserProjectItems = { - 8B7D6CCA2EBCE491000B38FA /* PBXTextBookmark */ = 8B7D6CCA2EBCE491000B38FA /* PBXTextBookmark */; - 8B7D6D422EBCF5FF000B38FA /* PBXTextBookmark */ = 8B7D6D422EBCF5FF000B38FA /* PBXTextBookmark */; + 8B5AB4EE2EE9E43F00A3F512 /* PBXTextBookmark */ = 8B5AB4EE2EE9E43F00A3F512 /* PBXTextBookmark */; + 8B5AB4F72EE9E4A500A3F512 /* PBXTextBookmark */ = 8B5AB4F72EE9E4A500A3F512 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -62,18 +62,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleHBuss.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {848, 3402}}"; - sepNavSelRange = "{7170, 0}"; - sepNavVisRange = "{6237, 1903}"; + sepNavIntBoundsRect = "{{0, 0}, {966, 4158}}"; + sepNavSelRange = "{904, 0}"; + sepNavVisRange = "{354, 960}"; sepNavWindowFrame = "{{537, 47}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleHBuss.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1119, 2862}}"; - sepNavSelRange = "{3981, 0}"; - sepNavVisRange = "{507, 2080}"; - sepNavWindowFrame = "{{604, 37}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1119, 2520}}"; + sepNavSelRange = "{3227, 0}"; + sepNavVisRange = "{2863, 1082}"; + sepNavWindowFrame = "{{545, 38}, {895, 831}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -86,10 +86,10 @@ }; 24D8286F09A914000093AEF8 /* ConsoleHBussProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {750, 17982}}"; - sepNavSelRange = "{49873, 0}"; - sepNavVisRange = "{1131, 265}"; - sepNavWindowFrame = "{{390, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {867, 16146}}"; + sepNavSelRange = "{48196, 0}"; + sepNavVisRange = "{1237, 167}"; + sepNavWindowFrame = "{{541, 47}, {895, 831}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -106,25 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B7D6CCA2EBCE491000B38FA /* PBXTextBookmark */ = { + 8B5AB4EE2EE9E43F00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ConsoleHBussProc.cpp */; - name = "ConsoleHBussProc.cpp: 1273"; + name = "ConsoleHBussProc.cpp: 887"; rLen = 0; - rLoc = 49873; + rLoc = 48196; rType = 0; - vrLen = 196; - vrLoc = 1004; + vrLen = 167; + vrLoc = 1237; }; - 8B7D6D422EBCF5FF000B38FA /* PBXTextBookmark */ = { + 8B5AB4F72EE9E4A500A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ConsoleHBussProc.cpp */; - name = "ConsoleHBussProc.cpp: 927"; + name = "ConsoleHBussProc.cpp: 887"; rLen = 0; - rLoc = 49873; + rLoc = 48196; rType = 0; - vrLen = 265; - vrLoc = 1131; + vrLen = 167; + vrLoc = 1237; }; 8D01CCC60486CAD60068D4B7 /* ConsoleHBuss */ = { activeExec = 0; diff --git a/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 index bb58e82d3..c4934dfb9 100755 --- a/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj/christopherjohnson.perspectivev3 @@ -300,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 6 + 5 4 0 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 798 278 810 487 0 0 1440 878 + 607 279 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -351,10 +351,10 @@ _historyCapacity 0 bookmark - 8B7D6D422EBCF5FF000B38FA + 8B5AB4F72EE9E4A500A3F512 history - 8B7D6CCA2EBCE491000B38FA + 8B5AB4EE2EE9E43F00A3F512 SplitCount @@ -368,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 102}} + {{0, 0}, {603, 86}} RubberWindowFrame - 798 278 810 487 0 0 1440 878 + 607 279 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 102pt + 86pt Proportion - 339pt + 355pt Tabs @@ -393,9 +393,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 312}} - RubberWindowFrame - 798 278 810 487 0 0 1440 878 + {{10, 27}, {603, 328}} Module XCDetailModule @@ -449,7 +447,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 328}} + RubberWindowFrame + 607 279 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -477,11 +477,11 @@ TableOfContents - 8B7D6D432EBCF5FF000B38FA + 8B5AB4F82EE9E4A500A3F512 1CA23ED40692098700951B8B - 8B7D6D442EBCF5FF000B38FA + 8B5AB4F92EE9E4A500A3F512 8B0237581D42B1C400E1E8C8 - 8B7D6D452EBCF5FF000B38FA + 8B5AB4FA2EE9E4A500A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +634,7 @@ StatusbarIsVisible TimeStamp - 784135679.627774 + 787080357.03041804 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -651,11 +651,10 @@ 5 WindowOrderList - 8B7D6D462EBCF5FF000B38FA - /Users/christopherjohnson/Desktop/ConsoleHBuss/ConsoleHBuss.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleHBuss/ConsoleHBuss.xcodeproj WindowString - 798 278 810 487 0 0 1440 878 + 607 279 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.cpp b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.cpp index c72d32c91..a43c7d260 100755 --- a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.cpp +++ b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.cpp @@ -34,7 +34,7 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 diff --git a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.h b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.h index b2dd09fca..9c239ca3a 100755 --- a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.h +++ b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBuss.h @@ -95,25 +95,16 @@ private: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBussProc.cpp b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBussProc.cpp index ace7e9f96..91a6ee2fc 100755 --- a/plugins/MacVST/ConsoleHBuss/source/ConsoleHBussProc.cpp +++ b/plugins/MacVST/ConsoleHBuss/source/ConsoleHBussProc.cpp @@ -28,37 +28,47 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; double sloRez = pow(1.0-THR,10.0) / overallscale; @@ -248,101 +258,79 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -405,47 +393,39 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -487,35 +467,45 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-THR, 6.0) * 8.0; @@ -707,101 +697,79 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -864,47 +832,39 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser index 5b442e5f1..9903d5572 100755 --- a/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.pbxuser @@ -49,14 +49,14 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784126236; - PBXWorkspaceStateSaveDate = 784126236; + PBXPerProjectTemplateStateSaveDate = 787147834; + PBXWorkspaceStateSaveDate = 787147834; }; perUserProjectItems = { + 8B5AB5372EE9ECD700A3F512 /* PBXTextBookmark */ = 8B5AB5372EE9ECD700A3F512 /* PBXTextBookmark */; + 8B6012832EEAEC76003E53A7 /* PBXTextBookmark */ = 8B6012832EEAEC76003E53A7 /* PBXTextBookmark */; 8B7D6CC22EBCE48F000B38FA /* PBXTextBookmark */ = 8B7D6CC22EBCE48F000B38FA /* PBXTextBookmark */; 8B7D6CC32EBCE48F000B38FA /* PBXTextBookmark */ = 8B7D6CC32EBCE48F000B38FA /* PBXTextBookmark */; - 8B7D6CC42EBCE48F000B38FA /* PBXTextBookmark */ = 8B7D6CC42EBCE48F000B38FA /* PBXTextBookmark */; - 8B7D6CC52EBCE48F000B38FA /* PBXTextBookmark */ = 8B7D6CC52EBCE48F000B38FA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -64,18 +64,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleHChannel.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {993, 7020}}"; - sepNavSelRange = "{0, 15912}"; - sepNavVisRange = "{0, 773}"; - sepNavWindowFrame = "{{9, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {993, 7812}}"; + sepNavSelRange = "{1283, 0}"; + sepNavVisRange = "{903, 843}"; + sepNavWindowFrame = "{{746, 47}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleHChannel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1110, 3312}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 3924}}"; sepNavSelRange = "{885, 0}"; - sepNavVisRange = "{816, 95}"; - sepNavWindowFrame = "{{8, 47}, {895, 831}}"; + sepNavVisRange = "{833, 78}"; + sepNavWindowFrame = "{{722, 47}, {895, 831}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -88,10 +88,10 @@ }; 24D8286F09A914000093AEF8 /* ConsoleHChannelProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1308, 22914}}"; - sepNavSelRange = "{0, 63595}"; - sepNavVisRange = "{5487, 1908}"; - sepNavWindowFrame = "{{6, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1182, 22410}}"; + sepNavSelRange = "{33172, 0}"; + sepNavVisRange = "{31385, 1792}"; + sepNavWindowFrame = "{{543, 47}, {895, 831}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -108,12 +108,32 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B5AB5372EE9ECD700A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 245463B80991757100464AD3 /* ConsoleHChannel.h */; + name = "ConsoleHChannel.h: 47"; + rLen = 0; + rLoc = 885; + rType = 0; + vrLen = 78; + vrLoc = 833; + }; + 8B6012832EEAEC76003E53A7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 245463B80991757100464AD3 /* ConsoleHChannel.h */; + name = "ConsoleHChannel.h: 47"; + rLen = 0; + rLoc = 885; + rType = 0; + vrLen = 78; + vrLoc = 833; + }; 8B7D6CC22EBCE48F000B38FA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* ConsoleHChannel.cpp */; name = "ConsoleHChannel.cpp: 369"; rLen = 0; - rLoc = 15176; + rLoc = 15140; rType = 0; vrLen = 62; vrLoc = 697; @@ -123,31 +143,11 @@ fRef = 24D8286F09A914000093AEF8 /* ConsoleHChannelProc.cpp */; name = "ConsoleHChannelProc.cpp: 201"; rLen = 0; - rLoc = 9636; + rLoc = 8111; rType = 0; vrLen = 288; vrLoc = 6545; }; - 8B7D6CC42EBCE48F000B38FA /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 245463B80991757100464AD3 /* ConsoleHChannel.h */; - name = "ConsoleHChannel.h: 47"; - rLen = 0; - rLoc = 885; - rType = 0; - vrLen = 96; - vrLoc = 816; - }; - 8B7D6CC52EBCE48F000B38FA /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 245463B80991757100464AD3 /* ConsoleHChannel.h */; - name = "ConsoleHChannel.h: 47"; - rLen = 0; - rLoc = 885; - rType = 0; - vrLen = 95; - vrLoc = 816; - }; 8D01CCC60486CAD60068D4B7 /* ConsoleHChannel */ = { activeExec = 0; }; diff --git a/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 index b55c622c5..e57c81051 100755 --- a/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj/christopherjohnson.perspectivev3 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 9 262 810 487 0 0 1440 878 + 629 255 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -351,12 +351,12 @@ _historyCapacity 0 bookmark - 8B7D6CC52EBCE48F000B38FA + 8B6012832EEAEC76003E53A7 history 8B7D6CC22EBCE48F000B38FA 8B7D6CC32EBCE48F000B38FA - 8B7D6CC42EBCE48F000B38FA + 8B5AB5372EE9ECD700A3F512 SplitCount @@ -370,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 102}} RubberWindowFrame - 9 262 810 487 0 0 1440 878 + 629 255 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 102pt Proportion - 309pt + 339pt Tabs @@ -395,7 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 312}} + RubberWindowFrame + 629 255 810 487 0 0 1440 878 Module XCDetailModule @@ -450,8 +452,6 @@ Frame {{10, 27}, {603, 282}} - RubberWindowFrame - 9 262 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -479,11 +479,11 @@ TableOfContents - 8B7D6CC62EBCE48F000B38FA + 8B6012842EEAEC76003E53A7 1CA23ED40692098700951B8B - 8B7D6CC72EBCE48F000B38FA + 8B6012852EEAEC76003E53A7 8B0237581D42B1C400E1E8C8 - 8B7D6CC82EBCE48F000B38FA + 8B6012862EEAEC76003E53A7 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -636,7 +636,7 @@ StatusbarIsVisible TimeStamp - 784131215.90781498 + 787147894.47989905 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -653,11 +653,11 @@ 5 WindowOrderList - 8B7D6CC92EBCE48F000B38FA - /Users/christopherjohnson/Desktop/ConsoleHChannel/ConsoleHChannel.xcodeproj + 8B6012872EEAEC76003E53A7 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleHChannel/ConsoleHChannel.xcodeproj WindowString - 9 262 810 487 0 0 1440 878 + 629 255 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.cpp b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.cpp index 2d49c52ca..9ee7ba52c 100755 --- a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.cpp +++ b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.cpp @@ -61,10 +61,10 @@ ConsoleHChannel::ConsoleHChannel(audioMasterCallback audioMaster) : } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.h b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.h index c3cb7a9f5..7a20001ea 100755 --- a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.h +++ b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannel.h @@ -145,26 +145,18 @@ private: //HipCrush with four bands enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp index 9910d71bc..f2b5d4449 100755 --- a/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp +++ b/plugins/MacVST/ConsoleHChannel/source/ConsoleHChannelProc.cpp @@ -22,6 +22,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -159,393 +173,359 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -572,7 +552,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { @@ -654,6 +634,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -671,110 +652,123 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -791,393 +785,359 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1204,7 +1164,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser index c8dfda5e6..6ec256e2d 100755 --- a/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.pbxuser @@ -49,8 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 784132091; - PBXWorkspaceStateSaveDate = 784132091; + PBXPerProjectTemplateStateSaveDate = 787147927; + PBXWorkspaceStateSaveDate = 787147927; + }; + perUserProjectItems = { + 8B5AB6712EEA346800A3F512 /* PBXTextBookmark */ = 8B5AB6712EEA346800A3F512 /* PBXTextBookmark */; + 8B6012A52EEAECD3003E53A7 /* PBXTextBookmark */ = 8B6012A52EEAECD3003E53A7 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -58,18 +62,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleHPre.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {957, 7794}}"; - sepNavSelRange = "{1288, 0}"; - sepNavVisRange = "{689, 800}"; - sepNavWindowFrame = "{{544, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {840, 7038}}"; + sepNavSelRange = "{1310, 0}"; + sepNavVisRange = "{2578, 201}"; + sepNavWindowFrame = "{{24, 42}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleHPre.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1002, 4320}}"; - sepNavSelRange = "{4269, 0}"; - sepNavVisRange = "{3815, 751}"; - sepNavWindowFrame = "{{529, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1047, 4104}}"; + sepNavSelRange = "{3899, 339}"; + sepNavVisRange = "{3505, 852}"; + sepNavWindowFrame = "{{5, 49}, {882, 829}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -82,10 +86,10 @@ }; 24D8286F09A914000093AEF8 /* ConsoleHPreProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1221, 22518}}"; - sepNavSelRange = "{55320, 0}"; - sepNavVisRange = "{53678, 1923}"; - sepNavWindowFrame = "{{89, 24}, {1268, 829}}"; + sepNavIntBoundsRect = "{{0, 0}, {1029, 22230}}"; + sepNavSelRange = "{33118, 0}"; + sepNavVisRange = "{2125, 1898}"; + sepNavWindowFrame = "{{7, 38}, {871, 840}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -102,6 +106,26 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B5AB6712EEA346800A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* ConsoleHPre.cpp */; + name = "ConsoleHPre.cpp: 68"; + rLen = 0; + rLoc = 1310; + rType = 0; + vrLen = 231; + vrLoc = 2578; + }; + 8B6012A52EEAECD3003E53A7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* ConsoleHPre.cpp */; + name = "ConsoleHPre.cpp: 68"; + rLen = 0; + rLoc = 1310; + rType = 0; + vrLen = 201; + vrLoc = 2578; + }; 8D01CCC60486CAD60068D4B7 /* ConsoleHPre */ = { activeExec = 0; }; diff --git a/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 index 6c2980abc..304174b1f 100755 --- a/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -298,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 7 + 6 4 0 @@ -321,7 +323,7 @@ 185 RubberWindowFrame - 74 277 810 487 0 0 1440 878 + 27 349 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -337,7 +339,7 @@ PBXProjectModuleGUID 8B0237581D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + ConsoleHPre.cpp PBXSplitModuleInNavigatorKey Split0 @@ -345,7 +347,15 @@ PBXProjectModuleGUID 8B0237591D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + ConsoleHPre.cpp + _historyCapacity + 0 + bookmark + 8B6012A52EEAECD3003E53A7 + history + + 8B5AB6712EEA346800A3F512 + SplitCount 1 @@ -358,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 0}} + {{0, 0}, {603, 102}} RubberWindowFrame - 74 277 810 487 0 0 1440 878 + 27 349 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 0pt + 102pt Proportion - 441pt + 339pt Tabs @@ -383,7 +393,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 312}} + RubberWindowFrame + 27 349 810 487 0 0 1440 878 Module XCDetailModule @@ -437,9 +449,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} - RubberWindowFrame - 74 277 810 487 0 0 1440 878 + {{10, 27}, {603, 282}} Module PBXBuildResultsModule @@ -467,11 +477,11 @@ TableOfContents - 8B7D6D0B2EBCEE76000B38FA + 8B6012A62EEAECD3003E53A7 1CA23ED40692098700951B8B - 8B7D6D0C2EBCEE76000B38FA + 8B6012A72EEAECD3003E53A7 8B0237581D42B1C400E1E8C8 - 8B7D6D0D2EBCEE76000B38FA + 8B6012A82EEAECD3003E53A7 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -624,7 +634,7 @@ StatusbarIsVisible TimeStamp - 784133750.60373998 + 787147987.95249295 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -641,10 +651,11 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/ConsoleHPre/ConsoleHPre.xcodeproj + 8B6012A92EEAECD3003E53A7 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleHPre/ConsoleHPre.xcodeproj WindowString - 74 277 810 487 0 0 1440 878 + 27 349 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.cpp b/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.cpp index 49e8d328d..c500b6c68 100755 --- a/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.cpp +++ b/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.cpp @@ -60,10 +60,11 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) } //HipCrush with four bands - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxFL = 0.0; bezMaxFR = 0.0; - bezCompS[bez_cycle] = 1.0; bezGateL = 2.0; bezGateR = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; diff --git a/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.h b/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.h index 066568e3a..f242a79cb 100755 --- a/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.h +++ b/plugins/MacVST/ConsoleHPre/source/ConsoleHPre.h @@ -146,25 +146,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxFL; - double bezMaxFR; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; double bezGateL; + double bezMaxR; + double bezMinR; double bezGateR; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacVST/ConsoleHPre/source/ConsoleHPreProc.cpp b/plugins/MacVST/ConsoleHPre/source/ConsoleHPreProc.cpp index 11dc2eb7e..88ffee948 100755 --- a/plugins/MacVST/ConsoleHPre/source/ConsoleHPreProc.cpp +++ b/plugins/MacVST/ConsoleHPre/source/ConsoleHPreProc.cpp @@ -22,6 +22,7 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -158,398 +172,373 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -644,6 +633,7 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -661,110 +651,123 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -780,398 +783,373 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser index e2108537e..f26ba99b7 100755 --- a/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783620239; - PBXWorkspaceStateSaveDate = 783620239; + PBXPerProjectTemplateStateSaveDate = 787257710; + PBXWorkspaceStateSaveDate = 787257710; }; perUserProjectItems = { - 8B5C9E812EB51CB9008B9860 /* PBXTextBookmark */ = 8B5C9E812EB51CB9008B9860 /* PBXTextBookmark */; - 8B692C242EB4F63600F51381 /* PBXTextBookmark */ = 8B692C242EB4F63600F51381 /* PBXTextBookmark */; + 8B5AB5BB2EEA14A400A3F512 /* PBXTextBookmark */ = 8B5AB5BB2EEA14A400A3F512 /* PBXTextBookmark */; + 8B6371F52EEC99E7004A406F /* PBXTextBookmark */ = 8B6371F52EEC99E7004A406F /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -62,18 +62,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleX2Buss.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {975, 4266}}"; - sepNavSelRange = "{7594, 739}"; - sepNavVisRange = "{6198, 2275}"; - sepNavWindowFrame = "{{9, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {848, 3870}}"; + sepNavSelRange = "{8580, 0}"; + sepNavVisRange = "{7410, 1892}"; + sepNavWindowFrame = "{{658, 47}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleX2Buss.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1101, 3006}}"; - sepNavSelRange = "{3923, 0}"; - sepNavVisRange = "{3323, 661}"; - sepNavWindowFrame = "{{7, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {957, 2898}}"; + sepNavSelRange = "{2733, 0}"; + sepNavVisRange = "{0, 805}"; + sepNavWindowFrame = "{{735, 47}, {895, 831}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -86,10 +86,10 @@ }; 24D8286F09A914000093AEF8 /* ConsoleX2BussProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1029, 16560}}"; - sepNavSelRange = "{41563, 0}"; - sepNavVisRange = "{21407, 165}"; - sepNavWindowFrame = "{{7, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 16020}}"; + sepNavSelRange = "{40293, 0}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{334, 47}, {895, 831}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -106,25 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B5C9E812EB51CB9008B9860 /* PBXTextBookmark */ = { + 8B5AB5BB2EEA14A400A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ConsoleX2BussProc.cpp */; - name = "ConsoleX2BussProc.cpp: 906"; + name = "ConsoleX2BussProc.cpp: 865"; rLen = 0; - rLoc = 41563; + rLoc = 40293; rType = 0; - vrLen = 165; - vrLoc = 21407; + vrLen = 190; + vrLoc = 21583; }; - 8B692C242EB4F63600F51381 /* PBXTextBookmark */ = { + 8B6371F52EEC99E7004A406F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ConsoleX2BussProc.cpp */; - name = "ConsoleX2BussProc.cpp: 907"; + name = "ConsoleX2BussProc.cpp: 865"; rLen = 0; - rLoc = 41563; + rLoc = 40293; rType = 0; - vrLen = 165; - vrLoc = 21427; + vrLen = 0; + vrLoc = 0; }; 8D01CCC60486CAD60068D4B7 /* ConsoleX2Buss */ = { activeExec = 0; diff --git a/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 index fa8e5dd73..232ff30c8 100755 --- a/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj/christopherjohnson.perspectivev3 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 23 300 810 487 0 0 1440 878 + 435 334 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -351,10 +351,10 @@ _historyCapacity 0 bookmark - 8B5C9E812EB51CB9008B9860 + 8B6371F52EEC99E7004A406F history - 8B692C242EB4F63600F51381 + 8B5AB5BB2EEA14A400A3F512 SplitCount @@ -368,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 69}} + {{0, 0}, {603, 32}} RubberWindowFrame - 23 300 810 487 0 0 1440 878 + 435 334 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 69pt + 32pt Proportion - 372pt + 409pt Tabs @@ -393,9 +393,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 345}} + {{10, 27}, {603, 382}} RubberWindowFrame - 23 300 810 487 0 0 1440 878 + 435 334 810 487 0 0 1440 878 Module XCDetailModule @@ -477,11 +477,11 @@ TableOfContents - 8B5C9E522EB51894008B9860 + 8B6371F62EEC99E7004A406F 1CA23ED40692098700951B8B - 8B5C9E532EB51894008B9860 + 8B6371F72EEC99E7004A406F 8B0237581D42B1C400E1E8C8 - 8B5C9E542EB51894008B9860 + 8B6371F82EEC99E7004A406F 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +634,7 @@ StatusbarIsVisible TimeStamp - 783621305.02929103 + 787257831.72824299 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -654,7 +654,7 @@ /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleX2Buss/ConsoleX2Buss.xcodeproj WindowString - 23 300 810 487 0 0 1440 878 + 435 334 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp index d27cd2cec..a5f742744 100755 --- a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp +++ b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.cpp @@ -12,17 +12,17 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.5; - B = 0.5; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 1.0; - J = 0.5; - K = 0.5; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -44,7 +44,7 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -94,17 +94,17 @@ static float pinParameter(float data) VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; + chunkData[0] = HIG; + chunkData[1] = HMG; + chunkData[2] = LMG; + chunkData[3] = BSG; + chunkData[4] = HIF; + chunkData[5] = HMF; + chunkData[6] = LMF; + chunkData[7] = BSF; + chunkData[8] = THR; + chunkData[9] = PAN; + chunkData[10] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -116,17 +116,17 @@ VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); + HIG = pinParameter(chunkData[0]); + HMG = pinParameter(chunkData[1]); + LMG = pinParameter(chunkData[2]); + BSG = pinParameter(chunkData[3]); + HIF = pinParameter(chunkData[4]); + HMF = pinParameter(chunkData[5]); + LMF = pinParameter(chunkData[6]); + BSF = pinParameter(chunkData[7]); + THR = pinParameter(chunkData[8]); + PAN = pinParameter(chunkData[9]); + FAD = pinParameter(chunkData[10]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -136,85 +136,85 @@ VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Buss::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Buss::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Buss::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Buss::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: float2string (A, text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Buss::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.h b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.h index f13fa39c5..1fa28c929 100755 --- a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.h +++ b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2Buss.h @@ -16,17 +16,17 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, + kParamHIG =0, + kParamHMG =1, + kParamLMG =2, + kParamBSG =3, + kParamHIF =4, + kParamHMF =5, + kParamLMF =6, + kParamBSF =7, + kParamTHR =8, + kParamPAN =9, + kParamFAD =10, kNumParameters = 11 }; // @@ -62,17 +62,17 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float PAN; + float FAD; enum { biq_freq, @@ -108,26 +108,17 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 - + //Dynamics2 custom for buss + double avg32L[33]; double avg32R[33]; double avg16L[17]; diff --git a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp index ccc0d1399..55c705365 100755 --- a/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp +++ b/plugins/MacVST/ConsoleX2Buss/source/ConsoleX2BussProc.cpp @@ -21,133 +21,142 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -167,198 +176,177 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -403,47 +391,39 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -478,133 +458,142 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -624,198 +613,177 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -860,48 +828,39 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser index 82e525f60..5148e27ab 100755 --- a/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783605003; - PBXWorkspaceStateSaveDate = 783605003; + PBXPerProjectTemplateStateSaveDate = 787100300; + PBXWorkspaceStateSaveDate = 787100300; }; perUserProjectItems = { - 8B692BEA2EB4E28E00F51381 /* PBXTextBookmark */ = 8B692BEA2EB4E28E00F51381 /* PBXTextBookmark */; + 8B5AB6382EEA332A00A3F512 /* PBXTextBookmark */ = 8B5AB6382EEA332A00A3F512 /* PBXTextBookmark */; + 8B5AB6392EEA332A00A3F512 /* PBXTextBookmark */ = 8B5AB6392EEA332A00A3F512 /* PBXTextBookmark */; 8BC5BE2E2EB165A900031C01 /* PBXTextBookmark */ = 8BC5BE2E2EB165A900031C01 /* PBXTextBookmark */; - 8BC5BE302EB165A900031C01 /* PBXTextBookmark */ = 8BC5BE302EB165A900031C01 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -63,18 +63,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleX2Channel.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {723, 5742}}"; - sepNavSelRange = "{8738, 73}"; - sepNavVisRange = "{8222, 217}"; + sepNavIntBoundsRect = "{{0, 0}, {777, 5814}}"; + sepNavSelRange = "{9004, 0}"; + sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{545, 47}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleX2Channel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1002, 4176}}"; - sepNavSelRange = "{4572, 0}"; - sepNavVisRange = "{4107, 593}"; - sepNavWindowFrame = "{{545, 38}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1101, 3402}}"; + sepNavSelRange = "{3373, 0}"; + sepNavVisRange = "{3532, 724}"; + sepNavWindowFrame = "{{601, 47}, {895, 831}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -87,10 +87,10 @@ }; 24D8286F09A914000093AEF8 /* ConsoleX2ChannelProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {858, 20862}}"; - sepNavSelRange = "{51155, 0}"; - sepNavVisRange = "{31760, 1474}"; - sepNavWindowFrame = "{{459, 45}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1101, 19368}}"; + sepNavSelRange = "{22669, 0}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{3, 46}, {895, 831}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -107,36 +107,36 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B692BEA2EB4E28E00F51381 /* PBXTextBookmark */ = { + 8B5AB6382EEA332A00A3F512 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* ConsoleX2Channel.cpp */; name = "ConsoleX2Channel.cpp: 261"; - rLen = 73; - rLoc = 8738; + rLen = 0; + rLoc = 9004; rType = 0; - vrLen = 217; - vrLoc = 8222; + vrLen = 0; + vrLoc = 0; + }; + 8B5AB6392EEA332A00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* ConsoleX2ChannelProc.cpp */; + name = "ConsoleX2ChannelProc.cpp: 495"; + rLen = 0; + rLoc = 22669; + rType = 0; + vrLen = 0; + vrLoc = 0; }; 8BC5BE2E2EB165A900031C01 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ConsoleX2ChannelProc.cpp */; name = "ConsoleX2ChannelProc.cpp: 492"; rLen = 0; - rLoc = 24427; + rLoc = 22669; rType = 0; vrLen = 98; vrLoc = 22602; }; - 8BC5BE302EB165A900031C01 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2407DEB6089929BA00EB68BF /* ConsoleX2Channel.cpp */; - name = "ConsoleX2Channel.cpp: 251"; - rLen = 73; - rLoc = 8738; - rType = 0; - vrLen = 176; - vrLoc = 8282; - }; 8D01CCC60486CAD60068D4B7 /* ConsoleX2Channel */ = { activeExec = 0; }; diff --git a/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 index dbcc634ad..7650747c8 100755 --- a/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj/christopherjohnson.perspectivev3 @@ -300,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 5 + 6 4 0 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 767 257 810 487 0 0 1440 878 + 14 340 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -339,7 +339,7 @@ PBXProjectModuleGUID 8B0237581D42B1C400E1E8C8 PBXProjectModuleLabel - ConsoleX2Channel.cpp + ConsoleX2ChannelProc.cpp PBXSplitModuleInNavigatorKey Split0 @@ -347,15 +347,15 @@ PBXProjectModuleGUID 8B0237591D42B1C400E1E8C8 PBXProjectModuleLabel - ConsoleX2Channel.cpp + ConsoleX2ChannelProc.cpp _historyCapacity 0 bookmark - 8B692BEA2EB4E28E00F51381 + 8B5AB6392EEA332A00A3F512 history + 8B5AB6382EEA332A00A3F512 8BC5BE2E2EB165A900031C01 - 8BC5BE302EB165A900031C01 SplitCount @@ -369,18 +369,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 69}} + {{0, 0}, {603, 32}} RubberWindowFrame - 767 257 810 487 0 0 1440 878 + 14 340 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 69pt + 32pt Proportion - 372pt + 409pt Tabs @@ -394,9 +394,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 345}} + {{10, 27}, {603, 382}} RubberWindowFrame - 767 257 810 487 0 0 1440 878 + 14 340 810 487 0 0 1440 878 Module XCDetailModule @@ -450,7 +450,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 363}} Module PBXBuildResultsModule @@ -478,11 +478,11 @@ TableOfContents - 8B692BEB2EB4E28E00F51381 + 8B5AB63A2EEA332A00A3F512 1CA23ED40692098700951B8B - 8B692BEC2EB4E28E00F51381 + 8B5AB63B2EEA332A00A3F512 8B0237581D42B1C400E1E8C8 - 8B692BED2EB4E28E00F51381 + 8B5AB63C2EEA332A00A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -635,7 +635,7 @@ StatusbarIsVisible TimeStamp - 783606414.77670801 + 787100458.98253703 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -652,11 +652,11 @@ 5 WindowOrderList - 8B692BEE2EB4E28E00F51381 + 8B5AB63D2EEA332A00A3F512 /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleX2Channel/ConsoleX2Channel.xcodeproj WindowString - 767 257 810 487 0 0 1440 878 + 14 340 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp index 1d253c15a..2129cd918 100755 --- a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp +++ b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.cpp @@ -12,24 +12,24 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; - R = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -50,10 +50,10 @@ ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -130,24 +130,24 @@ static float pinParameter(float data) VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; - chunkData[17] = R; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = PAN; + chunkData[17] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -159,24 +159,24 @@ VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); - R = pinParameter(chunkData[17]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + PAN = pinParameter(chunkData[16]); + FAD = pinParameter(chunkData[17]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -186,120 +186,120 @@ VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPrese void ConsoleX2Channel::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; - case kParamR: R = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Channel::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; - case kParamR: return R; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Channel::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; - case kParamR: float2string (R, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Channel::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.h b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.h index 7862eafbc..2b57ebb85 100755 --- a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.h +++ b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2Channel.h @@ -16,24 +16,24 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, - kParamR =17, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamPAN =16, + kParamFAD =17, kNumParameters = 18 }; // const int dscBuf = 256; @@ -70,24 +70,24 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; - float R; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float PAN; + float FAD; enum { biq_freq, @@ -123,26 +123,18 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp index 906bc23a4..127bf13bc 100755 --- a/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp +++ b/plugins/MacVST/ConsoleX2Channel/source/ConsoleX2ChannelProc.cpp @@ -21,149 +21,158 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -173,307 +182,265 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -525,7 +492,7 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 } //blank out lowpass if just switched off } //Cabs2 - + double gainR = (panA*temp)+(panB*(1.0-temp)); double gainL = 1.57079633-gainR; gainR = sin(gainR); gainL = sin(gainL); @@ -581,149 +548,158 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -733,307 +709,265 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser index 9eb110d68..f81e4a6ed 100755 --- a/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 783603931; - PBXWorkspaceStateSaveDate = 783603931; + PBXPerProjectTemplateStateSaveDate = 787095373; + PBXWorkspaceStateSaveDate = 787095373; }; perUserProjectItems = { + 8B5AB6782EEA346C00A3F512 /* PBXTextBookmark */ = 8B5AB6782EEA346C00A3F512 /* PBXTextBookmark */; + 8B5AB67D2EEA34FC00A3F512 /* PBXTextBookmark */ = 8B5AB67D2EEA34FC00A3F512 /* PBXTextBookmark */; 8B692BB82EB4DCCF00F51381 /* PBXTextBookmark */ = 8B692BB82EB4DCCF00F51381 /* PBXTextBookmark */; - 8B692BB92EB4DCCF00F51381 /* PBXBookmark */ = 8B692BB92EB4DCCF00F51381 /* PBXBookmark */; - 8B692BBA2EB4DCCF00F51381 /* PBXTextBookmark */ = 8B692BBA2EB4DCCF00F51381 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -63,18 +63,18 @@ }; 2407DEB6089929BA00EB68BF /* ConsoleX2Pre.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {848, 5256}}"; - sepNavSelRange = "{1603, 0}"; - sepNavVisRange = "{6887, 2487}"; + sepNavIntBoundsRect = "{{0, 0}, {966, 6318}}"; + sepNavSelRange = "{1207, 0}"; + sepNavVisRange = "{684, 865}"; sepNavWindowFrame = "{{545, 47}, {895, 831}}"; }; }; 245463B80991757100464AD3 /* ConsoleX2Pre.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {554, 3618}}"; - sepNavSelRange = "{2830, 0}"; - sepNavVisRange = "{2805, 39}"; - sepNavWindowFrame = "{{545, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 3636}}"; + sepNavSelRange = "{2892, 0}"; + sepNavVisRange = "{2948, 24}"; + sepNavWindowFrame = "{{669, 38}, {768, 840}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -87,9 +87,9 @@ }; 24D8286F09A914000093AEF8 /* ConsoleX2PreProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1182, 19944}}"; - sepNavSelRange = "{49326, 0}"; - sepNavVisRange = "{48536, 1773}"; + sepNavIntBoundsRect = "{{0, 0}, {1101, 19224}}"; + sepNavSelRange = "{20840, 0}"; + sepNavVisRange = "{19760, 2092}"; sepNavWindowFrame = "{{524, 47}, {895, 831}}"; }; }; @@ -107,30 +107,36 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B5AB6782EEA346C00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 245463B80991757100464AD3 /* ConsoleX2Pre.h */; + name = "ConsoleX2Pre.h: 85"; + rLen = 0; + rLoc = 2892; + rType = 0; + vrLen = 24; + vrLoc = 2948; + }; + 8B5AB67D2EEA34FC00A3F512 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 245463B80991757100464AD3 /* ConsoleX2Pre.h */; + name = "ConsoleX2Pre.h: 85"; + rLen = 0; + rLoc = 2892; + rType = 0; + vrLen = 24; + vrLoc = 2948; + }; 8B692BB82EB4DCCF00F51381 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* ConsoleX2Pre.cpp */; name = "ConsoleX2Pre.cpp: 88"; rLen = 0; - rLoc = 2198; + rLoc = 2267; rType = 0; vrLen = 51; vrLoc = 779; }; - 8B692BB92EB4DCCF00F51381 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 245463B80991757100464AD3 /* ConsoleX2Pre.h */; - }; - 8B692BBA2EB4DCCF00F51381 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 245463B80991757100464AD3 /* ConsoleX2Pre.h */; - name = "ConsoleX2Pre.h: 85"; - rLen = 0; - rLoc = 2830; - rType = 0; - vrLen = 39; - vrLoc = 2805; - }; 8D01CCC60486CAD60068D4B7 /* ConsoleX2Pre */ = { activeExec = 0; }; diff --git a/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 index 713c7ad50..bbd0a7bda 100755 --- a/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -323,7 +321,7 @@ 185 RubberWindowFrame - 639 298 810 487 0 0 1440 878 + 632 298 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -351,11 +349,11 @@ _historyCapacity 0 bookmark - 8B692BBA2EB4DCCF00F51381 + 8B5AB67D2EEA34FC00A3F512 history 8B692BB82EB4DCCF00F51381 - 8B692BB92EB4DCCF00F51381 + 8B5AB6782EEA346C00A3F512 SplitCount @@ -369,18 +367,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 69}} + {{0, 0}, {603, 51}} RubberWindowFrame - 639 298 810 487 0 0 1440 878 + 632 298 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 69pt + 51pt Proportion - 372pt + 390pt Tabs @@ -394,9 +392,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 345}} - RubberWindowFrame - 639 298 810 487 0 0 1440 878 + {{10, 27}, {603, 363}} Module XCDetailModule @@ -450,7 +446,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 328}} + {{10, 27}, {603, 363}} + RubberWindowFrame + 632 298 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -478,11 +476,11 @@ TableOfContents - 8B692BBB2EB4DCCF00F51381 + 8B5AB6062EEA1F5100A3F512 1CA23ED40692098700951B8B - 8B692BBC2EB4DCCF00F51381 + 8B5AB6072EEA1F5100A3F512 8B0237581D42B1C400E1E8C8 - 8B692BBD2EB4DCCF00F51381 + 8B5AB6082EEA1F5100A3F512 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -635,7 +633,7 @@ StatusbarIsVisible TimeStamp - 783604943.16103494 + 787100924.42353201 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -652,11 +650,11 @@ 5 WindowOrderList - 8B692BBE2EB4DCCF00F51381 + 8B5AB67E2EEA34FC00A3F512 /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ConsoleX2Pre/ConsoleX2Pre.xcodeproj WindowString - 639 298 810 487 0 0 1440 878 + 632 298 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp index 1d6244eab..37598510d 100755 --- a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp +++ b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.cpp @@ -12,23 +12,23 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -49,10 +49,11 @@ ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; + bezMaxL = 0.0; bezMinL = 0.0; bezGateL = 2.0; + bezMaxR = 0.0; bezMinR = 0.0; bezGateR = 2.0; //Dual mono version + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -128,23 +129,23 @@ static float pinParameter(float data) VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -156,23 +157,23 @@ VstInt32 ConsoleX2Pre::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + FAD = pinParameter(chunkData[16]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -182,115 +183,115 @@ VstInt32 ConsoleX2Pre::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Pre::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Pre::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Pre::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Pre::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Pre::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.h b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.h index 3fa48a8f8..5ea8485af 100755 --- a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.h +++ b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2Pre.h @@ -16,23 +16,23 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamFAD =16, kNumParameters = 17 }; // const int dscBuf = 256; @@ -69,23 +69,23 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float FAD; enum { biq_freq, @@ -124,23 +124,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; - double bezGate; - //Dynamics2 + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; + double bezGateL; + double bezMaxR; + double bezMinR; + double bezGateR; + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp index 4c8abed86..18ab0486d 100755 --- a/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp +++ b/plugins/MacVST/ConsoleX2Pre/source/ConsoleX2PreProc.cpp @@ -21,148 +21,157 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - - inTrimA = inTrimB; inTrimB = Q*2.0; + + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -172,309 +181,285 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -526,7 +511,7 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa } //blank out lowpass if just switched off } //Cabs2 - + double gain = (inTrimA*temp)+(inTrimB*(1.0-temp)); if (gain > 1.0) gain *= gain; if (gain < 1.0) gain = 1.0-pow(1.0-gain,2); @@ -567,149 +552,158 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst overallscale *= getSampleRate(); int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = Q*2.0; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -718,310 +712,286 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleR = *in2; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section + inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser new file mode 100755 index 000000000..eba446f40 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.pbxuser @@ -0,0 +1,108 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Dynamics3 */; + codeSenseManager = 8B02375F1D42B1C400E1E8C8 /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 364, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 324, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 786891871; + PBXWorkspaceStateSaveDate = 786891871; + }; + sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; + userBuildSettings = { + }; + }; + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {948, 2682}}"; + sepNavSelRange = "{626, 0}"; + sepNavVisRange = "{4021, 1604}"; + sepNavWindowFrame = "{{12, 47}, {895, 831}}"; + }; + }; + 245463B80991757100464AD3 /* Dynamics3.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1110, 1476}}"; + sepNavSelRange = "{2526, 0}"; + sepNavVisRange = "{0, 1139}"; + sepNavWindowFrame = "{{20, 47}, {895, 831}}"; + }; + }; + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {859, 20267}}"; + sepNavSelRange = "{10616, 0}"; + sepNavVisRange = "{9653, 2414}"; + sepNavWindowFrame = "{{15, 42}, {895, 831}}"; + }; + }; + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {975, 2952}}"; + sepNavSelRange = "{4749, 0}"; + sepNavVisRange = "{2763, 1253}"; + sepNavWindowFrame = "{{31, 42}, {895, 831}}"; + }; + }; + 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 8B02375F1D42B1C400E1E8C8 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + activeExec = 0; + }; +} diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 new file mode 100755 index 000000000..1187683d4 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/christopherjohnson.perspectivev3 @@ -0,0 +1,1503 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + 8B02375D1D42B1C400E1E8C8 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + + XCObserverAutoDisconnectKey + + XCObserverDefintionKey + + PBXStatusErrorsKey + 0 + + XCObserverFactoryKey + XCPerspectivesSpecificationIdentifier + XCObserverGUIDKey + XCObserverProjectIdentifier + XCObserverNotificationKey + PBXStatusBuildStateMessageNotification + XCObserverTargetKey + XCMainBuildResultsModuleGUID + XCObserverTriggerKey + awakenModuleWithObserver: + XCObserverValidationKey + + PBXStatusErrorsKey + 2 + + + + OpenEditors + + PerspectiveWidths + + 810 + 810 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 185 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77ADFE841716C02AAC07 + 1C37FBAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 6 + 4 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {185, 428}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {202, 446}} + GroupTreeTableConfiguration + + MainColumn + 185 + + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 202pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 8B0237581D42B1C400E1E8C8 + PBXProjectModuleLabel + Gain.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8B0237591D42B1C400E1E8C8 + PBXProjectModuleLabel + Gain.h + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {603, 0}} + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + Proportion + 441pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {603, 414}} + RubberWindowFrame + 38 299 810 487 0 0 1440 878 + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1023 + XCBuildResultsTrigger_Open + 1012 + + GeometryConfiguration + + Frame + {{10, 27}, {603, 282}} + + Module + PBXBuildResultsModule + + + + + Proportion + 603pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + 8B5AAFC22EE7071A00A3F512 + 1CA23ED40692098700951B8B + 8B5AAFC32EE7071A00A3F512 + 8B0237581D42B1C400E1E8C8 + 8B5AAFC42EE7071A00A3F512 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + 1 + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {810, 0}} + + Module + PBXDebugCLIModule + Proportion + 0% + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {395, 213}} + {{395, 0}, {415, 213}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {810, 213}} + {{0, 213}, {810, 225}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 7}, {810, 438}} + + Module + PBXDebugSessionModule + Proportion + 443pt + + + Name + Debug + ServiceClasses + + XCModuleDock + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + XCConsole + + TableOfContents + + 1CC8E6A5069209BD00BB180A + 1CC8E6A6069209BD00BB180A + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + 1CC8E6A7069209BD00BB180A + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 786892570.31316698 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + 8B5AAFC52EE7071A00A3F512 + /Users/christopherjohnson/Desktop/Dynamics3/Dynamics3.xcodeproj + + WindowString + 38 299 810 487 0 0 1440 878 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {700, 358}} + RubberWindowFrame + 149 87 700 400 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D5B069F1CE1000CFCEE + 1C530D5C069F1CE1000CFCEE + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 149 87 440 400 0 0 1440 878 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.projectFormatConflicts + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 8BCAE52E1D49920D0047D4BD + + GeometryConfiguration + + Frame + {{0, 0}, {472, 302}} + RubberWindowFrame + 569 378 472 322 0 0 1440 878 + + Module + XCProjectFormatConflictsModule + Proportion + 302pt + + + Proportion + 302pt + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + + TableOfContents + + 8BCAE52F1D49920D0047D4BD + 8BCAE5301D49920D0047D4BD + 8BCAE52E1D49920D0047D4BD + + WindowContentMinSize + 450 300 + WindowString + 569 378 472 322 0 0 1440 878 + WindowToolGUID + 8BCAE52F1D49920D0047D4BD + WindowToolIsVisible + + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj new file mode 100755 index 000000000..9c828f3b1 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.pbxproj @@ -0,0 +1,2201 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 2407DEB9089929BA00EB68BF /* Dynamics3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */; }; + 245463B90991757100464AD3 /* Dynamics3.h in Headers */ = {isa = PBXBuildFile; fileRef = 245463B80991757100464AD3 /* Dynamics3.h */; }; + 24A202190F90D1DE003BB5A7 /* aeffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FF910F90D1DD003BB5A7 /* aeffect.h */; }; + 24A2021A0F90D1DE003BB5A7 /* aeffectx.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FF920F90D1DD003BB5A7 /* aeffectx.h */; }; + 24A2021B0F90D1DE003BB5A7 /* vstfxstore.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FF930F90D1DD003BB5A7 /* vstfxstore.h */; }; + 24A2021D0F90D1DE003BB5A7 /* adelay.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FF990F90D1DD003BB5A7 /* adelay.h */; }; + 24A202240F90D1DE003BB5A7 /* sdeditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFA20F90D1DD003BB5A7 /* sdeditor.h */; }; + 24A202260F90D1DE003BB5A7 /* surrounddelay.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFA40F90D1DD003BB5A7 /* surrounddelay.h */; }; + 24A2022A0F90D1DE003BB5A7 /* again.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFAB0F90D1DD003BB5A7 /* again.h */; }; + 24A202330F90D1DE003BB5A7 /* gmnames.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFBF0F90D1DD003BB5A7 /* gmnames.h */; }; + 24A202350F90D1DE003BB5A7 /* vstxsynth.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFC10F90D1DD003BB5A7 /* vstxsynth.h */; }; + 24A202460F90D1DE003BB5A7 /* aeffeditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFD80F90D1DD003BB5A7 /* aeffeditor.h */; }; + 24A202480F90D1DE003BB5A7 /* audioeffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFDA0F90D1DD003BB5A7 /* audioeffect.h */; }; + 24A2024A0F90D1DE003BB5A7 /* audioeffectx.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFDC0F90D1DD003BB5A7 /* audioeffectx.h */; }; + 24A2024D0F90D1DE003BB5A7 /* cw_vst_prefix.pch++ in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFE20F90D1DD003BB5A7 /* cw_vst_prefix.pch++ */; }; + 24A202510F90D1DE003BB5A7 /* xcode_au_prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFEC0F90D1DD003BB5A7 /* xcode_au_prefix.h */; }; + 24A202520F90D1DE003BB5A7 /* xcode_vst_prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2FFED0F90D1DD003BB5A7 /* xcode_vst_prefix.h */; }; + 24A202680F90D1DE003BB5A7 /* controlsgui.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A200050F90D1DD003BB5A7 /* controlsgui.h */; }; + 24A2026A0F90D1DE003BB5A7 /* pdrawtesteditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A200070F90D1DD003BB5A7 /* pdrawtesteditor.h */; }; + 24A2026C0F90D1DE003BB5A7 /* pdrawtesteffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A200090F90D1DD003BB5A7 /* pdrawtesteffect.h */; }; + 24A2026F0F90D1DE003BB5A7 /* pdrawtestview.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2000C0F90D1DD003BB5A7 /* pdrawtestview.h */; }; + 24A202710F90D1DE003BB5A7 /* pprimitivesviews.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2000E0F90D1DD003BB5A7 /* pprimitivesviews.h */; }; + 24A202780F90D1DE003BB5A7 /* aeffguieditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A200180F90D1DD003BB5A7 /* aeffguieditor.h */; }; + 24A2027A0F90D1DE003BB5A7 /* cfileselector.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2001A0F90D1DD003BB5A7 /* cfileselector.h */; }; + 24A2027D0F90D1DE003BB5A7 /* cscrollview.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2001D0F90D1DD003BB5A7 /* cscrollview.h */; }; + 24A2027F0F90D1DE003BB5A7 /* ctabview.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2001F0F90D1DD003BB5A7 /* ctabview.h */; }; + 24A203A50F90D1DE003BB5A7 /* plugguieditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A201470F90D1DE003BB5A7 /* plugguieditor.h */; }; + 24A203A70F90D1DE003BB5A7 /* vstcontrols.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A201490F90D1DE003BB5A7 /* vstcontrols.h */; }; + 24A203A90F90D1DE003BB5A7 /* vstgui.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2014B0F90D1DE003BB5A7 /* vstgui.h */; }; + 24A203AA0F90D1DE003BB5A7 /* vstkeycode.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2014C0F90D1DE003BB5A7 /* vstkeycode.h */; }; + 24A203AB0F90D1DE003BB5A7 /* vstplugscarbon.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2014D0F90D1DE003BB5A7 /* vstplugscarbon.h */; }; + 24A203AC0F90D1DE003BB5A7 /* vstplugsmac.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2014E0F90D1DE003BB5A7 /* vstplugsmac.h */; }; + 24A203AD0F90D1DE003BB5A7 /* vstplugsmacho.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2014F0F90D1DE003BB5A7 /* vstplugsmacho.h */; }; + 24A203AE0F90D1DE003BB5A7 /* vstplugsquartz.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A201500F90D1DE003BB5A7 /* vstplugsquartz.h */; }; + 24A203CB0F90D251003BB5A7 /* audioeffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24A2FFD90F90D1DD003BB5A7 /* audioeffect.cpp */; }; + 24A203CC0F90D251003BB5A7 /* audioeffectx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */; }; + 24A203CD0F90D251003BB5A7 /* vstplugmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24A2FFDD0F90D1DD003BB5A7 /* vstplugmain.cpp */; }; + 24CFB70407E7A0220081BD57 /* PkgInfo in Resources */ = {isa = PBXBuildFile; fileRef = 24CFB70307E7A0220081BD57 /* PkgInfo */; }; + 24D8287009A914000093AEF8 /* Dynamics3Proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */; }; + 24D8287F09A9164A0093AEF8 /* xcode_vst_prefix.h in Headers */ = {isa = PBXBuildFile; fileRef = 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 24A203D60F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8D01CCD20486CAD60068D4B7; + remoteInfo = again; + }; + 24A203D80F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F4476974093DAE42008998C4; + remoteInfo = adelay; + }; + 24A203DA0F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F4FF52220929FBF500DDED7A; + remoteInfo = vstxsynth; + }; + 24A203DC0F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F4476A10093DCAF9008998C4; + remoteInfo = surrounddelay; + }; + 24A203DE0F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F4FF52F3092A312800DDED7A; + remoteInfo = minihost; + }; + 24A203E40F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFE50F90D1DD003BB5A7 /* drawtest.xcode */; + proxyType = 2; + remoteGlobalIDString = 8D01CCD20486CAD60068D4B7; + remoteInfo = AudioUnit; + }; + 24A203E60F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFE50F90D1DD003BB5A7 /* drawtest.xcode */; + proxyType = 2; + remoteGlobalIDString = F4C9F1D407B2320800010DAD; + remoteInfo = VST; + }; + 24A203EC0F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFE80F90D1DD003BB5A7 /* drawtest.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8D01CCD20486CAD60068D4B7; + remoteInfo = AudioUnit; + }; + 24A203EE0F90D272003BB5A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 24A2FFE80F90D1DD003BB5A7 /* drawtest.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F4C9F1D407B2320800010DAD; + remoteInfo = VST; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 2407DE920899296600EB68BF /* Dynamics3.vst */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Dynamics3.vst; sourceTree = BUILT_PRODUCTS_DIR; }; + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Dynamics3.cpp; path = source/Dynamics3.cpp; sourceTree = ""; }; + 2434720A098313350063BBF1 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; + 245463B80991757100464AD3 /* Dynamics3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Dynamics3.h; path = source/Dynamics3.h; sourceTree = ""; }; + 24A200000F90D1DD003BB5A7 /* bmp10014.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10014.bmp; sourceTree = ""; }; + 24A200010F90D1DD003BB5A7 /* bmp10015.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10015.bmp; sourceTree = ""; }; + 24A200020F90D1DD003BB5A7 /* bmp10016.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10016.bmp; sourceTree = ""; }; + 24A200040F90D1DD003BB5A7 /* controlsgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = controlsgui.cpp; sourceTree = ""; }; + 24A200050F90D1DD003BB5A7 /* controlsgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controlsgui.h; sourceTree = ""; }; + 24A200060F90D1DD003BB5A7 /* pdrawtesteditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pdrawtesteditor.cpp; sourceTree = ""; }; + 24A200070F90D1DD003BB5A7 /* pdrawtesteditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pdrawtesteditor.h; sourceTree = ""; }; + 24A200080F90D1DD003BB5A7 /* pdrawtesteffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pdrawtesteffect.cpp; sourceTree = ""; }; + 24A200090F90D1DD003BB5A7 /* pdrawtesteffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pdrawtesteffect.h; sourceTree = ""; }; + 24A2000A0F90D1DD003BB5A7 /* pdrawtestmain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pdrawtestmain.cpp; sourceTree = ""; }; + 24A2000B0F90D1DD003BB5A7 /* pdrawtestview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pdrawtestview.cpp; sourceTree = ""; }; + 24A2000C0F90D1DD003BB5A7 /* pdrawtestview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pdrawtestview.h; sourceTree = ""; }; + 24A2000D0F90D1DD003BB5A7 /* pprimitivesviews.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pprimitivesviews.cpp; sourceTree = ""; }; + 24A2000E0F90D1DD003BB5A7 /* pprimitivesviews.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pprimitivesviews.h; sourceTree = ""; }; + 24A200100F90D1DD003BB5A7 /* drawtest.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = drawtest.def; sourceTree = ""; }; + 24A200110F90D1DD003BB5A7 /* drawtest.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = drawtest.rc; sourceTree = ""; }; + 24A200120F90D1DD003BB5A7 /* drawtest.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = drawtest.vcproj; sourceTree = ""; }; + 24A200140F90D1DD003BB5A7 /* drawtest.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = drawtest.dsp; sourceTree = ""; }; + 24A200150F90D1DD003BB5A7 /* drawtest.dsw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = drawtest.dsw; sourceTree = ""; }; + 24A200170F90D1DD003BB5A7 /* aeffguieditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aeffguieditor.cpp; sourceTree = ""; }; + 24A200180F90D1DD003BB5A7 /* aeffguieditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffguieditor.h; sourceTree = ""; }; + 24A200190F90D1DD003BB5A7 /* cfileselector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cfileselector.cpp; sourceTree = ""; }; + 24A2001A0F90D1DD003BB5A7 /* cfileselector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cfileselector.h; sourceTree = ""; }; + 24A2001B0F90D1DD003BB5A7 /* Changelog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Changelog; sourceTree = ""; }; + 24A2001C0F90D1DD003BB5A7 /* cscrollview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cscrollview.cpp; sourceTree = ""; }; + 24A2001D0F90D1DD003BB5A7 /* cscrollview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cscrollview.h; sourceTree = ""; }; + 24A2001E0F90D1DD003BB5A7 /* ctabview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ctabview.cpp; sourceTree = ""; }; + 24A2001F0F90D1DD003BB5A7 /* ctabview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ctabview.h; sourceTree = ""; }; + 24A200220F90D1DD003BB5A7 /* aeffguieditor_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = aeffguieditor_8cpp.html; sourceTree = ""; }; + 24A200230F90D1DD003BB5A7 /* aeffguieditor_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = aeffguieditor_8h.html; sourceTree = ""; }; + 24A200240F90D1DD003BB5A7 /* annotated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = annotated.html; sourceTree = ""; }; + 24A200250F90D1DD003BB5A7 /* cfileselector_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = cfileselector_8cpp.html; sourceTree = ""; }; + 24A200260F90D1DD003BB5A7 /* cfileselector_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = cfileselector_8h.html; sourceTree = ""; }; + 24A200270F90D1DD003BB5A7 /* class_a_eff_g_u_i_editor-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_a_eff_g_u_i_editor-members.html"; sourceTree = ""; }; + 24A200280F90D1DD003BB5A7 /* class_a_eff_g_u_i_editor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_a_eff_g_u_i_editor.html; sourceTree = ""; }; + 24A200290F90D1DD003BB5A7 /* class_c_anim_knob-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_anim_knob-members.html"; sourceTree = ""; }; + 24A2002A0F90D1DD003BB5A7 /* class_c_anim_knob.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_anim_knob.html; sourceTree = ""; }; + 24A2002B0F90D1DD003BB5A7 /* class_c_anim_knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_anim_knob.png; sourceTree = ""; }; + 24A2002C0F90D1DD003BB5A7 /* class_c_attribute_list_entry-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_attribute_list_entry-members.html"; sourceTree = ""; }; + 24A2002D0F90D1DD003BB5A7 /* class_c_attribute_list_entry.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_attribute_list_entry.html; sourceTree = ""; }; + 24A2002E0F90D1DD003BB5A7 /* class_c_auto_animation-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_auto_animation-members.html"; sourceTree = ""; }; + 24A2002F0F90D1DD003BB5A7 /* class_c_auto_animation.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_auto_animation.html; sourceTree = ""; }; + 24A200300F90D1DD003BB5A7 /* class_c_auto_animation.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_auto_animation.png; sourceTree = ""; }; + 24A200310F90D1DD003BB5A7 /* class_c_bitmap-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_bitmap-members.html"; sourceTree = ""; }; + 24A200320F90D1DD003BB5A7 /* class_c_bitmap.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_bitmap.html; sourceTree = ""; }; + 24A200330F90D1DD003BB5A7 /* class_c_bitmap.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_bitmap.png; sourceTree = ""; }; + 24A200340F90D1DD003BB5A7 /* class_c_c_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_c_view-members.html"; sourceTree = ""; }; + 24A200350F90D1DD003BB5A7 /* class_c_c_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_c_view.html; sourceTree = ""; }; + 24A200360F90D1DD003BB5A7 /* class_c_control-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_control-members.html"; sourceTree = ""; }; + 24A200370F90D1DD003BB5A7 /* class_c_control.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_control.html; sourceTree = ""; }; + 24A200380F90D1DD003BB5A7 /* class_c_control.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_control.png; sourceTree = ""; }; + 24A200390F90D1DD003BB5A7 /* class_c_control_listener-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_control_listener-members.html"; sourceTree = ""; }; + 24A2003A0F90D1DD003BB5A7 /* class_c_control_listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_control_listener.html; sourceTree = ""; }; + 24A2003B0F90D1DD003BB5A7 /* class_c_control_listener.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_control_listener.png; sourceTree = ""; }; + 24A2003C0F90D1DD003BB5A7 /* class_c_drag_container-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_drag_container-members.html"; sourceTree = ""; }; + 24A2003D0F90D1DD003BB5A7 /* class_c_drag_container.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_drag_container.html; sourceTree = ""; }; + 24A2003E0F90D1DD003BB5A7 /* class_c_drag_container.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_drag_container.png; sourceTree = ""; }; + 24A2003F0F90D1DD003BB5A7 /* class_c_draw_context-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_draw_context-members.html"; sourceTree = ""; }; + 24A200400F90D1DD003BB5A7 /* class_c_draw_context.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_draw_context.html; sourceTree = ""; }; + 24A200410F90D1DD003BB5A7 /* class_c_draw_context.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_draw_context.png; sourceTree = ""; }; + 24A200420F90D1DD003BB5A7 /* class_c_file_selector-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_file_selector-members.html"; sourceTree = ""; }; + 24A200430F90D1DD003BB5A7 /* class_c_file_selector.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_file_selector.html; sourceTree = ""; }; + 24A200440F90D1DD003BB5A7 /* class_c_frame-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_frame-members.html"; sourceTree = ""; }; + 24A200450F90D1DD003BB5A7 /* class_c_frame.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_frame.html; sourceTree = ""; }; + 24A200460F90D1DD003BB5A7 /* class_c_frame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_frame.png; sourceTree = ""; }; + 24A200470F90D1DD003BB5A7 /* class_c_horizontal_slider-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_horizontal_slider-members.html"; sourceTree = ""; }; + 24A200480F90D1DD003BB5A7 /* class_c_horizontal_slider.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_horizontal_slider.html; sourceTree = ""; }; + 24A200490F90D1DD003BB5A7 /* class_c_horizontal_slider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_horizontal_slider.png; sourceTree = ""; }; + 24A2004A0F90D1DD003BB5A7 /* class_c_horizontal_switch-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_horizontal_switch-members.html"; sourceTree = ""; }; + 24A2004B0F90D1DD003BB5A7 /* class_c_horizontal_switch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_horizontal_switch.html; sourceTree = ""; }; + 24A2004C0F90D1DD003BB5A7 /* class_c_horizontal_switch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_horizontal_switch.png; sourceTree = ""; }; + 24A2004D0F90D1DD003BB5A7 /* class_c_kick_button-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_kick_button-members.html"; sourceTree = ""; }; + 24A2004E0F90D1DD003BB5A7 /* class_c_kick_button.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_kick_button.html; sourceTree = ""; }; + 24A2004F0F90D1DD003BB5A7 /* class_c_kick_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_kick_button.png; sourceTree = ""; }; + 24A200500F90D1DD003BB5A7 /* class_c_knob-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_knob-members.html"; sourceTree = ""; }; + 24A200510F90D1DD003BB5A7 /* class_c_knob.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_knob.html; sourceTree = ""; }; + 24A200520F90D1DD003BB5A7 /* class_c_knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_knob.png; sourceTree = ""; }; + 24A200530F90D1DD003BB5A7 /* class_c_movie_bitmap-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_movie_bitmap-members.html"; sourceTree = ""; }; + 24A200540F90D1DD003BB5A7 /* class_c_movie_bitmap.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_movie_bitmap.html; sourceTree = ""; }; + 24A200550F90D1DD003BB5A7 /* class_c_movie_bitmap.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_movie_bitmap.png; sourceTree = ""; }; + 24A200560F90D1DD003BB5A7 /* class_c_movie_button-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_movie_button-members.html"; sourceTree = ""; }; + 24A200570F90D1DD003BB5A7 /* class_c_movie_button.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_movie_button.html; sourceTree = ""; }; + 24A200580F90D1DD003BB5A7 /* class_c_movie_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_movie_button.png; sourceTree = ""; }; + 24A200590F90D1DD003BB5A7 /* class_c_offscreen_context-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_offscreen_context-members.html"; sourceTree = ""; }; + 24A2005A0F90D1DD003BB5A7 /* class_c_offscreen_context.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_offscreen_context.html; sourceTree = ""; }; + 24A2005B0F90D1DD003BB5A7 /* class_c_offscreen_context.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_offscreen_context.png; sourceTree = ""; }; + 24A2005C0F90D1DD003BB5A7 /* class_c_on_off_button-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_on_off_button-members.html"; sourceTree = ""; }; + 24A2005D0F90D1DD003BB5A7 /* class_c_on_off_button.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_on_off_button.html; sourceTree = ""; }; + 24A2005E0F90D1DD003BB5A7 /* class_c_on_off_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_on_off_button.png; sourceTree = ""; }; + 24A2005F0F90D1DD003BB5A7 /* class_c_option_menu-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_option_menu-members.html"; sourceTree = ""; }; + 24A200600F90D1DD003BB5A7 /* class_c_option_menu.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_option_menu.html; sourceTree = ""; }; + 24A200610F90D1DD003BB5A7 /* class_c_option_menu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_option_menu.png; sourceTree = ""; }; + 24A200620F90D1DD003BB5A7 /* class_c_option_menu_scheme-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_option_menu_scheme-members.html"; sourceTree = ""; }; + 24A200630F90D1DD003BB5A7 /* class_c_option_menu_scheme.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_option_menu_scheme.html; sourceTree = ""; }; + 24A200640F90D1DD003BB5A7 /* class_c_option_menu_scheme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_option_menu_scheme.png; sourceTree = ""; }; + 24A200650F90D1DD003BB5A7 /* class_c_param_display-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_param_display-members.html"; sourceTree = ""; }; + 24A200660F90D1DD003BB5A7 /* class_c_param_display.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_param_display.html; sourceTree = ""; }; + 24A200670F90D1DD003BB5A7 /* class_c_param_display.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_param_display.png; sourceTree = ""; }; + 24A200680F90D1DD003BB5A7 /* class_c_reference_counter-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_reference_counter-members.html"; sourceTree = ""; }; + 24A200690F90D1DD003BB5A7 /* class_c_reference_counter.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_reference_counter.html; sourceTree = ""; }; + 24A2006A0F90D1DD003BB5A7 /* class_c_reference_counter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_reference_counter.png; sourceTree = ""; }; + 24A2006B0F90D1DD003BB5A7 /* class_c_rocker_switch-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_rocker_switch-members.html"; sourceTree = ""; }; + 24A2006C0F90D1DD003BB5A7 /* class_c_rocker_switch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_rocker_switch.html; sourceTree = ""; }; + 24A2006D0F90D1DD003BB5A7 /* class_c_rocker_switch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_rocker_switch.png; sourceTree = ""; }; + 24A2006E0F90D1DD003BB5A7 /* class_c_scroll_container-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_scroll_container-members.html"; sourceTree = ""; }; + 24A2006F0F90D1DD003BB5A7 /* class_c_scroll_container.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_scroll_container.html; sourceTree = ""; }; + 24A200700F90D1DD003BB5A7 /* class_c_scroll_container.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_scroll_container.png; sourceTree = ""; }; + 24A200710F90D1DD003BB5A7 /* class_c_scroll_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_scroll_view-members.html"; sourceTree = ""; }; + 24A200720F90D1DD003BB5A7 /* class_c_scroll_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_scroll_view.html; sourceTree = ""; }; + 24A200730F90D1DD003BB5A7 /* class_c_scroll_view.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_scroll_view.png; sourceTree = ""; }; + 24A200740F90D1DD003BB5A7 /* class_c_scrollbar-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_scrollbar-members.html"; sourceTree = ""; }; + 24A200750F90D1DD003BB5A7 /* class_c_scrollbar.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_scrollbar.html; sourceTree = ""; }; + 24A200760F90D1DD003BB5A7 /* class_c_scrollbar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_scrollbar.png; sourceTree = ""; }; + 24A200770F90D1DD003BB5A7 /* class_c_slider-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_slider-members.html"; sourceTree = ""; }; + 24A200780F90D1DD003BB5A7 /* class_c_slider.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_slider.html; sourceTree = ""; }; + 24A200790F90D1DD003BB5A7 /* class_c_slider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_slider.png; sourceTree = ""; }; + 24A2007A0F90D1DD003BB5A7 /* class_c_special_digit-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_special_digit-members.html"; sourceTree = ""; }; + 24A2007B0F90D1DD003BB5A7 /* class_c_special_digit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_special_digit.html; sourceTree = ""; }; + 24A2007C0F90D1DD003BB5A7 /* class_c_special_digit.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_special_digit.png; sourceTree = ""; }; + 24A2007D0F90D1DD003BB5A7 /* class_c_splash_screen-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_splash_screen-members.html"; sourceTree = ""; }; + 24A2007E0F90D1DD003BB5A7 /* class_c_splash_screen.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_splash_screen.html; sourceTree = ""; }; + 24A2007F0F90D1DD003BB5A7 /* class_c_splash_screen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_splash_screen.png; sourceTree = ""; }; + 24A200800F90D1DD003BB5A7 /* class_c_splash_screen_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_splash_screen_view-members.html"; sourceTree = ""; }; + 24A200810F90D1DD003BB5A7 /* class_c_splash_screen_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_splash_screen_view.html; sourceTree = ""; }; + 24A200820F90D1DD003BB5A7 /* class_c_splash_screen_view.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_splash_screen_view.png; sourceTree = ""; }; + 24A200830F90D1DD003BB5A7 /* class_c_tab_button-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_tab_button-members.html"; sourceTree = ""; }; + 24A200840F90D1DD003BB5A7 /* class_c_tab_button.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_tab_button.html; sourceTree = ""; }; + 24A200850F90D1DD003BB5A7 /* class_c_tab_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_tab_button.png; sourceTree = ""; }; + 24A200860F90D1DD003BB5A7 /* class_c_tab_child_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_tab_child_view-members.html"; sourceTree = ""; }; + 24A200870F90D1DD003BB5A7 /* class_c_tab_child_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_tab_child_view.html; sourceTree = ""; }; + 24A200880F90D1DD003BB5A7 /* class_c_tab_child_view.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_tab_child_view.png; sourceTree = ""; }; + 24A200890F90D1DD003BB5A7 /* class_c_tab_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_tab_view-members.html"; sourceTree = ""; }; + 24A2008A0F90D1DD003BB5A7 /* class_c_tab_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_tab_view.html; sourceTree = ""; }; + 24A2008B0F90D1DD003BB5A7 /* class_c_tab_view.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_tab_view.png; sourceTree = ""; }; + 24A2008C0F90D1DD003BB5A7 /* class_c_text_edit-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_text_edit-members.html"; sourceTree = ""; }; + 24A2008D0F90D1DD003BB5A7 /* class_c_text_edit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_text_edit.html; sourceTree = ""; }; + 24A2008E0F90D1DD003BB5A7 /* class_c_text_edit.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_text_edit.png; sourceTree = ""; }; + 24A2008F0F90D1DD003BB5A7 /* class_c_text_label-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_text_label-members.html"; sourceTree = ""; }; + 24A200900F90D1DD003BB5A7 /* class_c_text_label.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_text_label.html; sourceTree = ""; }; + 24A200910F90D1DD003BB5A7 /* class_c_text_label.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_text_label.png; sourceTree = ""; }; + 24A200920F90D1DD003BB5A7 /* class_c_vertical_slider-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_vertical_slider-members.html"; sourceTree = ""; }; + 24A200930F90D1DD003BB5A7 /* class_c_vertical_slider.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_vertical_slider.html; sourceTree = ""; }; + 24A200940F90D1DD003BB5A7 /* class_c_vertical_slider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_vertical_slider.png; sourceTree = ""; }; + 24A200950F90D1DD003BB5A7 /* class_c_vertical_switch-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_vertical_switch-members.html"; sourceTree = ""; }; + 24A200960F90D1DD003BB5A7 /* class_c_vertical_switch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_vertical_switch.html; sourceTree = ""; }; + 24A200970F90D1DD003BB5A7 /* class_c_vertical_switch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_vertical_switch.png; sourceTree = ""; }; + 24A200980F90D1DD003BB5A7 /* class_c_view-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_view-members.html"; sourceTree = ""; }; + 24A200990F90D1DD003BB5A7 /* class_c_view.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_view.html; sourceTree = ""; }; + 24A2009A0F90D1DD003BB5A7 /* class_c_view.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_view.png; sourceTree = ""; }; + 24A2009B0F90D1DD003BB5A7 /* class_c_view_container-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_view_container-members.html"; sourceTree = ""; }; + 24A2009C0F90D1DD003BB5A7 /* class_c_view_container.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_view_container.html; sourceTree = ""; }; + 24A2009D0F90D1DD003BB5A7 /* class_c_view_container.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_view_container.png; sourceTree = ""; }; + 24A2009E0F90D1DD003BB5A7 /* class_c_vu_meter-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_c_vu_meter-members.html"; sourceTree = ""; }; + 24A2009F0F90D1DD003BB5A7 /* class_c_vu_meter.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_c_vu_meter.html; sourceTree = ""; }; + 24A200A00F90D1DD003BB5A7 /* class_c_vu_meter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_c_vu_meter.png; sourceTree = ""; }; + 24A200A10F90D1DD003BB5A7 /* class_i_scrollbar_drawer-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_i_scrollbar_drawer-members.html"; sourceTree = ""; }; + 24A200A20F90D1DD003BB5A7 /* class_i_scrollbar_drawer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_i_scrollbar_drawer.html; sourceTree = ""; }; + 24A200A30F90D1DD003BB5A7 /* class_plugin_g_u_i_editor-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "class_plugin_g_u_i_editor-members.html"; sourceTree = ""; }; + 24A200A40F90D1DD003BB5A7 /* class_plugin_g_u_i_editor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = class_plugin_g_u_i_editor.html; sourceTree = ""; }; + 24A200A50F90D1DD003BB5A7 /* cscrollview_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = cscrollview_8cpp.html; sourceTree = ""; }; + 24A200A60F90D1DD003BB5A7 /* cscrollview_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = cscrollview_8h.html; sourceTree = ""; }; + 24A200A70F90D1DD003BB5A7 /* ctabview_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = ctabview_8cpp.html; sourceTree = ""; }; + 24A200A80F90D1DD003BB5A7 /* ctabview_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = ctabview_8h.html; sourceTree = ""; }; + 24A200A90F90D1DD003BB5A7 /* deprecated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = deprecated.html; sourceTree = ""; }; + 24A200AA0F90D1DD003BB5A7 /* doc_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = doc_8h.html; sourceTree = ""; }; + 24A200AB0F90D1DD003BB5A7 /* doxygen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = doxygen.css; sourceTree = ""; }; + 24A200AC0F90D1DD003BB5A7 /* doxygen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = doxygen.png; sourceTree = ""; }; + 24A200AD0F90D1DD003BB5A7 /* files.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = files.html; sourceTree = ""; }; + 24A200AE0F90D1DD003BB5A7 /* ftv2blank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2blank.png; sourceTree = ""; }; + 24A200AF0F90D1DD003BB5A7 /* ftv2doc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2doc.png; sourceTree = ""; }; + 24A200B00F90D1DD003BB5A7 /* ftv2folderclosed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2folderclosed.png; sourceTree = ""; }; + 24A200B10F90D1DE003BB5A7 /* ftv2folderopen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2folderopen.png; sourceTree = ""; }; + 24A200B20F90D1DE003BB5A7 /* ftv2lastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2lastnode.png; sourceTree = ""; }; + 24A200B30F90D1DE003BB5A7 /* ftv2link.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2link.png; sourceTree = ""; }; + 24A200B40F90D1DE003BB5A7 /* ftv2mlastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2mlastnode.png; sourceTree = ""; }; + 24A200B50F90D1DE003BB5A7 /* ftv2mnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2mnode.png; sourceTree = ""; }; + 24A200B60F90D1DE003BB5A7 /* ftv2node.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2node.png; sourceTree = ""; }; + 24A200B70F90D1DE003BB5A7 /* ftv2plastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2plastnode.png; sourceTree = ""; }; + 24A200B80F90D1DE003BB5A7 /* ftv2pnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2pnode.png; sourceTree = ""; }; + 24A200B90F90D1DE003BB5A7 /* ftv2vertline.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2vertline.png; sourceTree = ""; }; + 24A200BA0F90D1DE003BB5A7 /* functions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions.html; sourceTree = ""; }; + 24A200BB0F90D1DE003BB5A7 /* functions_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x62.html; sourceTree = ""; }; + 24A200BC0F90D1DE003BB5A7 /* functions_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x63.html; sourceTree = ""; }; + 24A200BD0F90D1DE003BB5A7 /* functions_0x64.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x64.html; sourceTree = ""; }; + 24A200BE0F90D1DE003BB5A7 /* functions_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x65.html; sourceTree = ""; }; + 24A200BF0F90D1DE003BB5A7 /* functions_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x66.html; sourceTree = ""; }; + 24A200C00F90D1DE003BB5A7 /* functions_0x67.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x67.html; sourceTree = ""; }; + 24A200C10F90D1DE003BB5A7 /* functions_0x68.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x68.html; sourceTree = ""; }; + 24A200C20F90D1DE003BB5A7 /* functions_0x69.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x69.html; sourceTree = ""; }; + 24A200C30F90D1DE003BB5A7 /* functions_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x6b.html; sourceTree = ""; }; + 24A200C40F90D1DE003BB5A7 /* functions_0x6c.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x6c.html; sourceTree = ""; }; + 24A200C50F90D1DE003BB5A7 /* functions_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x6d.html; sourceTree = ""; }; + 24A200C60F90D1DE003BB5A7 /* functions_0x6e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x6e.html; sourceTree = ""; }; + 24A200C70F90D1DE003BB5A7 /* functions_0x6f.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x6f.html; sourceTree = ""; }; + 24A200C80F90D1DE003BB5A7 /* functions_0x70.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x70.html; sourceTree = ""; }; + 24A200C90F90D1DE003BB5A7 /* functions_0x72.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x72.html; sourceTree = ""; }; + 24A200CA0F90D1DE003BB5A7 /* functions_0x73.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x73.html; sourceTree = ""; }; + 24A200CB0F90D1DE003BB5A7 /* functions_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x74.html; sourceTree = ""; }; + 24A200CC0F90D1DE003BB5A7 /* functions_0x75.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x75.html; sourceTree = ""; }; + 24A200CD0F90D1DE003BB5A7 /* functions_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x76.html; sourceTree = ""; }; + 24A200CE0F90D1DE003BB5A7 /* functions_0x77.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x77.html; sourceTree = ""; }; + 24A200CF0F90D1DE003BB5A7 /* functions_0x78.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x78.html; sourceTree = ""; }; + 24A200D00F90D1DE003BB5A7 /* functions_0x79.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x79.html; sourceTree = ""; }; + 24A200D10F90D1DE003BB5A7 /* functions_0x7a.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x7a.html; sourceTree = ""; }; + 24A200D20F90D1DE003BB5A7 /* functions_0x7e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_0x7e.html; sourceTree = ""; }; + 24A200D30F90D1DE003BB5A7 /* functions_eval.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_eval.html; sourceTree = ""; }; + 24A200D40F90D1DE003BB5A7 /* functions_func.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func.html; sourceTree = ""; }; + 24A200D50F90D1DE003BB5A7 /* functions_func_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x62.html; sourceTree = ""; }; + 24A200D60F90D1DE003BB5A7 /* functions_func_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x63.html; sourceTree = ""; }; + 24A200D70F90D1DE003BB5A7 /* functions_func_0x64.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x64.html; sourceTree = ""; }; + 24A200D80F90D1DE003BB5A7 /* functions_func_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x65.html; sourceTree = ""; }; + 24A200D90F90D1DE003BB5A7 /* functions_func_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x66.html; sourceTree = ""; }; + 24A200DA0F90D1DE003BB5A7 /* functions_func_0x67.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x67.html; sourceTree = ""; }; + 24A200DB0F90D1DE003BB5A7 /* functions_func_0x68.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x68.html; sourceTree = ""; }; + 24A200DC0F90D1DE003BB5A7 /* functions_func_0x69.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x69.html; sourceTree = ""; }; + 24A200DD0F90D1DE003BB5A7 /* functions_func_0x6c.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x6c.html; sourceTree = ""; }; + 24A200DE0F90D1DE003BB5A7 /* functions_func_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x6d.html; sourceTree = ""; }; + 24A200DF0F90D1DE003BB5A7 /* functions_func_0x6e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x6e.html; sourceTree = ""; }; + 24A200E00F90D1DE003BB5A7 /* functions_func_0x6f.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x6f.html; sourceTree = ""; }; + 24A200E10F90D1DE003BB5A7 /* functions_func_0x70.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x70.html; sourceTree = ""; }; + 24A200E20F90D1DE003BB5A7 /* functions_func_0x72.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x72.html; sourceTree = ""; }; + 24A200E30F90D1DE003BB5A7 /* functions_func_0x73.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x73.html; sourceTree = ""; }; + 24A200E40F90D1DE003BB5A7 /* functions_func_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x74.html; sourceTree = ""; }; + 24A200E50F90D1DE003BB5A7 /* functions_func_0x75.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x75.html; sourceTree = ""; }; + 24A200E60F90D1DE003BB5A7 /* functions_func_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x76.html; sourceTree = ""; }; + 24A200E70F90D1DE003BB5A7 /* functions_func_0x77.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x77.html; sourceTree = ""; }; + 24A200E80F90D1DE003BB5A7 /* functions_func_0x7e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_func_0x7e.html; sourceTree = ""; }; + 24A200E90F90D1DE003BB5A7 /* functions_rela.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_rela.html; sourceTree = ""; }; + 24A200EA0F90D1DE003BB5A7 /* functions_vars.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars.html; sourceTree = ""; }; + 24A200EB0F90D1DE003BB5A7 /* functions_vars_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x62.html; sourceTree = ""; }; + 24A200EC0F90D1DE003BB5A7 /* functions_vars_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x63.html; sourceTree = ""; }; + 24A200ED0F90D1DE003BB5A7 /* functions_vars_0x64.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x64.html; sourceTree = ""; }; + 24A200EE0F90D1DE003BB5A7 /* functions_vars_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x65.html; sourceTree = ""; }; + 24A200EF0F90D1DE003BB5A7 /* functions_vars_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x66.html; sourceTree = ""; }; + 24A200F00F90D1DE003BB5A7 /* functions_vars_0x67.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x67.html; sourceTree = ""; }; + 24A200F10F90D1DE003BB5A7 /* functions_vars_0x68.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x68.html; sourceTree = ""; }; + 24A200F20F90D1DE003BB5A7 /* functions_vars_0x69.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x69.html; sourceTree = ""; }; + 24A200F30F90D1DE003BB5A7 /* functions_vars_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x6b.html; sourceTree = ""; }; + 24A200F40F90D1DE003BB5A7 /* functions_vars_0x6c.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x6c.html; sourceTree = ""; }; + 24A200F50F90D1DE003BB5A7 /* functions_vars_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x6d.html; sourceTree = ""; }; + 24A200F60F90D1DE003BB5A7 /* functions_vars_0x6e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x6e.html; sourceTree = ""; }; + 24A200F70F90D1DE003BB5A7 /* functions_vars_0x6f.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x6f.html; sourceTree = ""; }; + 24A200F80F90D1DE003BB5A7 /* functions_vars_0x70.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x70.html; sourceTree = ""; }; + 24A200F90F90D1DE003BB5A7 /* functions_vars_0x72.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x72.html; sourceTree = ""; }; + 24A200FA0F90D1DE003BB5A7 /* functions_vars_0x73.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x73.html; sourceTree = ""; }; + 24A200FB0F90D1DE003BB5A7 /* functions_vars_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x74.html; sourceTree = ""; }; + 24A200FC0F90D1DE003BB5A7 /* functions_vars_0x75.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x75.html; sourceTree = ""; }; + 24A200FD0F90D1DE003BB5A7 /* functions_vars_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x76.html; sourceTree = ""; }; + 24A200FE0F90D1DE003BB5A7 /* functions_vars_0x77.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x77.html; sourceTree = ""; }; + 24A200FF0F90D1DE003BB5A7 /* functions_vars_0x78.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x78.html; sourceTree = ""; }; + 24A201000F90D1DE003BB5A7 /* functions_vars_0x79.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x79.html; sourceTree = ""; }; + 24A201010F90D1DE003BB5A7 /* functions_vars_0x7a.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = functions_vars_0x7a.html; sourceTree = ""; }; + 24A201020F90D1DE003BB5A7 /* globals.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals.html; sourceTree = ""; }; + 24A201030F90D1DE003BB5A7 /* globals_0x61.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x61.html; sourceTree = ""; }; + 24A201040F90D1DE003BB5A7 /* globals_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x62.html; sourceTree = ""; }; + 24A201050F90D1DE003BB5A7 /* globals_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x63.html; sourceTree = ""; }; + 24A201060F90D1DE003BB5A7 /* globals_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x65.html; sourceTree = ""; }; + 24A201070F90D1DE003BB5A7 /* globals_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x66.html; sourceTree = ""; }; + 24A201080F90D1DE003BB5A7 /* globals_0x67.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x67.html; sourceTree = ""; }; + 24A201090F90D1DE003BB5A7 /* globals_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x6b.html; sourceTree = ""; }; + 24A2010A0F90D1DE003BB5A7 /* globals_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x6d.html; sourceTree = ""; }; + 24A2010B0F90D1DE003BB5A7 /* globals_0x6e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x6e.html; sourceTree = ""; }; + 24A2010C0F90D1DE003BB5A7 /* globals_0x6f.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x6f.html; sourceTree = ""; }; + 24A2010D0F90D1DE003BB5A7 /* globals_0x71.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x71.html; sourceTree = ""; }; + 24A2010E0F90D1DE003BB5A7 /* globals_0x72.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x72.html; sourceTree = ""; }; + 24A2010F0F90D1DE003BB5A7 /* globals_0x73.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x73.html; sourceTree = ""; }; + 24A201100F90D1DE003BB5A7 /* globals_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x74.html; sourceTree = ""; }; + 24A201110F90D1DE003BB5A7 /* globals_0x75.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x75.html; sourceTree = ""; }; + 24A201120F90D1DE003BB5A7 /* globals_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x76.html; sourceTree = ""; }; + 24A201130F90D1DE003BB5A7 /* globals_0x77.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_0x77.html; sourceTree = ""; }; + 24A201140F90D1DE003BB5A7 /* globals_defs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_defs.html; sourceTree = ""; }; + 24A201150F90D1DE003BB5A7 /* globals_enum.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_enum.html; sourceTree = ""; }; + 24A201160F90D1DE003BB5A7 /* globals_eval.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_eval.html; sourceTree = ""; }; + 24A201170F90D1DE003BB5A7 /* globals_type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_type.html; sourceTree = ""; }; + 24A201180F90D1DE003BB5A7 /* globals_vars.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = globals_vars.html; sourceTree = ""; }; + 24A201190F90D1DE003BB5A7 /* hierarchy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = hierarchy.html; sourceTree = ""; }; + 24A2011A0F90D1DE003BB5A7 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = index.html; sourceTree = ""; }; + 24A2011B0F90D1DE003BB5A7 /* intro.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = intro.html; sourceTree = ""; }; + 24A2011C0F90D1DE003BB5A7 /* license.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = license.html; sourceTree = ""; }; + 24A2011D0F90D1DE003BB5A7 /* maceditor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = maceditor.html; sourceTree = ""; }; + 24A2011E0F90D1DE003BB5A7 /* main.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = main.html; sourceTree = ""; }; + 24A2011F0F90D1DE003BB5A7 /* others.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = others.html; sourceTree = ""; }; + 24A201200F90D1DE003BB5A7 /* pages.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = pages.html; sourceTree = ""; }; + 24A201210F90D1DE003BB5A7 /* plugguieditor_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = plugguieditor_8cpp.html; sourceTree = ""; }; + 24A201220F90D1DE003BB5A7 /* plugguieditor_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = plugguieditor_8h.html; sourceTree = ""; }; + 24A201230F90D1DE003BB5A7 /* sequences.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = sequences.html; sourceTree = ""; }; + 24A201240F90D1DE003BB5A7 /* struct_c_color-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_c_color-members.html"; sourceTree = ""; }; + 24A201250F90D1DE003BB5A7 /* struct_c_color.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_c_color.html; sourceTree = ""; }; + 24A201260F90D1DE003BB5A7 /* struct_c_point-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_c_point-members.html"; sourceTree = ""; }; + 24A201270F90D1DE003BB5A7 /* struct_c_point.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_c_point.html; sourceTree = ""; }; + 24A201280F90D1DE003BB5A7 /* struct_c_rect-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_c_rect-members.html"; sourceTree = ""; }; + 24A201290F90D1DE003BB5A7 /* struct_c_rect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_c_rect.html; sourceTree = ""; }; + 24A2012A0F90D1DE003BB5A7 /* struct_e_rect-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_e_rect-members.html"; sourceTree = ""; }; + 24A2012B0F90D1DE003BB5A7 /* struct_e_rect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_e_rect.html; sourceTree = ""; }; + 24A2012C0F90D1DE003BB5A7 /* struct_vst_file_select-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_vst_file_select-members.html"; sourceTree = ""; }; + 24A2012D0F90D1DE003BB5A7 /* struct_vst_file_select.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_vst_file_select.html; sourceTree = ""; }; + 24A2012E0F90D1DE003BB5A7 /* struct_vst_file_type-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_vst_file_type-members.html"; sourceTree = ""; }; + 24A2012F0F90D1DE003BB5A7 /* struct_vst_file_type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_vst_file_type.html; sourceTree = ""; }; + 24A201300F90D1DE003BB5A7 /* struct_vst_key_code-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = "struct_vst_key_code-members.html"; sourceTree = ""; }; + 24A201310F90D1DE003BB5A7 /* struct_vst_key_code.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = struct_vst_key_code.html; sourceTree = ""; }; + 24A201320F90D1DE003BB5A7 /* tab_b.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_b.gif; sourceTree = ""; }; + 24A201330F90D1DE003BB5A7 /* tab_l.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_l.gif; sourceTree = ""; }; + 24A201340F90D1DE003BB5A7 /* tab_r.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_r.gif; sourceTree = ""; }; + 24A201350F90D1DE003BB5A7 /* tabs.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = tabs.css; sourceTree = ""; }; + 24A201360F90D1DE003BB5A7 /* thanks.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = thanks.html; sourceTree = ""; }; + 24A201370F90D1DE003BB5A7 /* tree.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = tree.html; sourceTree = ""; }; + 24A201380F90D1DE003BB5A7 /* vstcontrols_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstcontrols_8cpp.html; sourceTree = ""; }; + 24A201390F90D1DE003BB5A7 /* vstcontrols_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstcontrols_8h.html; sourceTree = ""; }; + 24A2013A0F90D1DE003BB5A7 /* vstgui_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstgui_8cpp.html; sourceTree = ""; }; + 24A2013B0F90D1DE003BB5A7 /* vstgui_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstgui_8h.html; sourceTree = ""; }; + 24A2013C0F90D1DE003BB5A7 /* vstkeycode_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstkeycode_8h.html; sourceTree = ""; }; + 24A2013D0F90D1DE003BB5A7 /* vstoffline.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstoffline.html; sourceTree = ""; }; + 24A2013E0F90D1DE003BB5A7 /* vstparamstruct.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstparamstruct.html; sourceTree = ""; }; + 24A2013F0F90D1DE003BB5A7 /* vstplugscarbon_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstplugscarbon_8h.html; sourceTree = ""; }; + 24A201400F90D1DE003BB5A7 /* vstplugsmac_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstplugsmac_8h.html; sourceTree = ""; }; + 24A201410F90D1DE003BB5A7 /* vstplugsmacho_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstplugsmacho_8h.html; sourceTree = ""; }; + 24A201420F90D1DE003BB5A7 /* vstplugsquartz_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = vstplugsquartz_8h.html; sourceTree = ""; }; + 24A201430F90D1DE003BB5A7 /* whatsnew.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = whatsnew.html; sourceTree = ""; }; + 24A201440F90D1DE003BB5A7 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = index.html; sourceTree = ""; }; + 24A201450F90D1DE003BB5A7 /* Migrating from 2.3.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "Migrating from 2.3.rtf"; sourceTree = ""; }; + 24A201460F90D1DE003BB5A7 /* plugguieditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plugguieditor.cpp; sourceTree = ""; }; + 24A201470F90D1DE003BB5A7 /* plugguieditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plugguieditor.h; sourceTree = ""; }; + 24A201480F90D1DE003BB5A7 /* vstcontrols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstcontrols.cpp; sourceTree = ""; }; + 24A201490F90D1DE003BB5A7 /* vstcontrols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstcontrols.h; sourceTree = ""; }; + 24A2014A0F90D1DE003BB5A7 /* vstgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstgui.cpp; sourceTree = ""; }; + 24A2014B0F90D1DE003BB5A7 /* vstgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstgui.h; sourceTree = ""; }; + 24A2014C0F90D1DE003BB5A7 /* vstkeycode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstkeycode.h; sourceTree = ""; }; + 24A2014D0F90D1DE003BB5A7 /* vstplugscarbon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstplugscarbon.h; sourceTree = ""; }; + 24A2014E0F90D1DE003BB5A7 /* vstplugsmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstplugsmac.h; sourceTree = ""; }; + 24A2014F0F90D1DE003BB5A7 /* vstplugsmacho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstplugsmacho.h; sourceTree = ""; }; + 24A201500F90D1DE003BB5A7 /* vstplugsquartz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstplugsquartz.h; sourceTree = ""; }; + 24A2FEBD0F90D1DC003BB5A7 /* Thumbs.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = Thumbs.db; sourceTree = ""; }; + 24A2FEBE0F90D1DC003BB5A7 /* VST_Logo_Usage_Guideline.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = VST_Logo_Usage_Guideline.pdf; sourceTree = ""; }; + 24A2FEBF0F90D1DC003BB5A7 /* VSTLogoAlpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = VSTLogoAlpha.png; sourceTree = ""; }; + 24A2FEC00F90D1DC003BB5A7 /* VSTLogoBlack.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = VSTLogoBlack.jpg; sourceTree = ""; }; + 24A2FEC10F90D1DC003BB5A7 /* VSTLogoWhite.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = VSTLogoWhite.jpg; sourceTree = ""; }; + 24A2FEC60F90D1DC003BB5A7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 24A2FEC80F90D1DC003BB5A7 /* VSTMonitor */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.bundle"; path = VSTMonitor; sourceTree = ""; }; + 24A2FEC90F90D1DC003BB5A7 /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PkgInfo; sourceTree = ""; }; + 24A2FECB0F90D1DC003BB5A7 /* bmp50000.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50000.bmp; sourceTree = ""; }; + 24A2FECC0F90D1DC003BB5A7 /* bmp50001.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50001.bmp; sourceTree = ""; }; + 24A2FECD0F90D1DC003BB5A7 /* bmp50002.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50002.bmp; sourceTree = ""; }; + 24A2FECE0F90D1DC003BB5A7 /* bmp50003.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50003.bmp; sourceTree = ""; }; + 24A2FECF0F90D1DC003BB5A7 /* bmp50004.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50004.bmp; sourceTree = ""; }; + 24A2FED00F90D1DC003BB5A7 /* bmp50005.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50005.bmp; sourceTree = ""; }; + 24A2FED10F90D1DC003BB5A7 /* bmp50006.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50006.bmp; sourceTree = ""; }; + 24A2FED20F90D1DC003BB5A7 /* bmp50007.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50007.bmp; sourceTree = ""; }; + 24A2FED30F90D1DC003BB5A7 /* bmp50008.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp50008.bmp; sourceTree = ""; }; + 24A2FED40F90D1DC003BB5A7 /* VSTParamTool.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = VSTParamTool.app; sourceTree = ""; }; + 24A2FED60F90D1DC003BB5A7 /* vstmonitor.dll */ = {isa = PBXFileReference; lastKnownFileType = file; path = vstmonitor.dll; sourceTree = ""; }; + 24A2FED70F90D1DC003BB5A7 /* vstparamtool.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = vstparamtool.exe; sourceTree = ""; }; + 24A2FEDA0F90D1DC003BB5A7 /* folder.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = folder.gif; sourceTree = ""; }; + 24A2FEDB0F90D1DC003BB5A7 /* mac.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = mac.gif; sourceTree = ""; }; + 24A2FEDC0F90D1DC003BB5A7 /* vstpluglogo_small.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = vstpluglogo_small.jpg; sourceTree = ""; }; + 24A2FEDD0F90D1DC003BB5A7 /* win.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = win.gif; sourceTree = ""; }; + 24A2FEDF0F90D1DC003BB5A7 /* aeffect_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = aeffect_8h.html; sourceTree = ""; }; + 24A2FEE00F90D1DC003BB5A7 /* aeffectx_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = aeffectx_8h.html; sourceTree = ""; }; + 24A2FEE10F90D1DC003BB5A7 /* aeffeditor_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = aeffeditor_8h.html; sourceTree = ""; }; + 24A2FEE20F90D1DC003BB5A7 /* annotated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = annotated.html; sourceTree = ""; }; + 24A2FEE30F90D1DC003BB5A7 /* audioeffect_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = audioeffect_8cpp.html; sourceTree = ""; }; + 24A2FEE40F90D1DC003BB5A7 /* audioeffect_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = audioeffect_8h.html; sourceTree = ""; }; + 24A2FEE50F90D1DC003BB5A7 /* audioeffectx_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = audioeffectx_8cpp.html; sourceTree = ""; }; + 24A2FEE60F90D1DC003BB5A7 /* audioeffectx_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = audioeffectx_8h.html; sourceTree = ""; }; + 24A2FEE70F90D1DC003BB5A7 /* Blocksizechange.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Blocksizechange.gif; sourceTree = ""; }; + 24A2FEE80F90D1DC003BB5A7 /* class_a_eff_editor-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "class_a_eff_editor-members.html"; sourceTree = ""; }; + 24A2FEE90F90D1DC003BB5A7 /* class_a_eff_editor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = class_a_eff_editor.html; sourceTree = ""; }; + 24A2FEEA0F90D1DC003BB5A7 /* class_audio_effect-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "class_audio_effect-members.html"; sourceTree = ""; }; + 24A2FEEB0F90D1DC003BB5A7 /* class_audio_effect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = class_audio_effect.html; sourceTree = ""; }; + 24A2FEEC0F90D1DC003BB5A7 /* class_audio_effect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_audio_effect.png; sourceTree = ""; }; + 24A2FEED0F90D1DC003BB5A7 /* class_audio_effect_x-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "class_audio_effect_x-members.html"; sourceTree = ""; }; + 24A2FEEE0F90D1DC003BB5A7 /* class_audio_effect_x.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = class_audio_effect_x.html; sourceTree = ""; }; + 24A2FEEF0F90D1DC003BB5A7 /* class_audio_effect_x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = class_audio_effect_x.png; sourceTree = ""; }; + 24A2FEF00F90D1DC003BB5A7 /* ControlChanged.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = ControlChanged.gif; sourceTree = ""; }; + 24A2FEF10F90D1DC003BB5A7 /* deprecated.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = deprecated.html; sourceTree = ""; }; + 24A2FEF20F90D1DC003BB5A7 /* dir_2d3252dd12c84c66c1d25b26bb45a1f5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = dir_2d3252dd12c84c66c1d25b26bb45a1f5.html; sourceTree = ""; }; + 24A2FEF30F90D1DC003BB5A7 /* dir_77c628dfee72e555f82d5ef53b733f38.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = dir_77c628dfee72e555f82d5ef53b733f38.html; sourceTree = ""; }; + 24A2FEF40F90D1DC003BB5A7 /* dir_f81105d3b854bea570aaf3bae5cb64c1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = dir_f81105d3b854bea570aaf3bae5cb64c1.html; sourceTree = ""; }; + 24A2FEF50F90D1DC003BB5A7 /* dir_fa0454ab79b4262333bf837ea3d765e9.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = dir_fa0454ab79b4262333bf837ea3d765e9.html; sourceTree = ""; }; + 24A2FEF60F90D1DC003BB5A7 /* dirs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = dirs.html; sourceTree = ""; }; + 24A2FEF70F90D1DC003BB5A7 /* doc_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = doc_8h.html; sourceTree = ""; }; + 24A2FEF80F90D1DC003BB5A7 /* doxygen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = doxygen.css; sourceTree = ""; }; + 24A2FEF90F90D1DC003BB5A7 /* doxygen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = doxygen.png; sourceTree = ""; }; + 24A2FEFA0F90D1DC003BB5A7 /* files.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = files.html; sourceTree = ""; }; + 24A2FEFB0F90D1DC003BB5A7 /* ftv2blank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2blank.png; sourceTree = ""; }; + 24A2FEFC0F90D1DC003BB5A7 /* ftv2doc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2doc.png; sourceTree = ""; }; + 24A2FEFD0F90D1DC003BB5A7 /* ftv2folderclosed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2folderclosed.png; sourceTree = ""; }; + 24A2FEFE0F90D1DC003BB5A7 /* ftv2folderopen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2folderopen.png; sourceTree = ""; }; + 24A2FEFF0F90D1DC003BB5A7 /* ftv2lastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2lastnode.png; sourceTree = ""; }; + 24A2FF000F90D1DC003BB5A7 /* ftv2link.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2link.png; sourceTree = ""; }; + 24A2FF010F90D1DC003BB5A7 /* ftv2mlastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2mlastnode.png; sourceTree = ""; }; + 24A2FF020F90D1DC003BB5A7 /* ftv2mnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2mnode.png; sourceTree = ""; }; + 24A2FF030F90D1DC003BB5A7 /* ftv2node.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2node.png; sourceTree = ""; }; + 24A2FF040F90D1DC003BB5A7 /* ftv2plastnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2plastnode.png; sourceTree = ""; }; + 24A2FF050F90D1DC003BB5A7 /* ftv2pnode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2pnode.png; sourceTree = ""; }; + 24A2FF060F90D1DC003BB5A7 /* ftv2vertline.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ftv2vertline.png; sourceTree = ""; }; + 24A2FF070F90D1DC003BB5A7 /* functions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions.html; sourceTree = ""; }; + 24A2FF080F90D1DC003BB5A7 /* functions_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x62.html; sourceTree = ""; }; + 24A2FF090F90D1DC003BB5A7 /* functions_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x63.html; sourceTree = ""; }; + 24A2FF0A0F90D1DC003BB5A7 /* functions_0x64.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x64.html; sourceTree = ""; }; + 24A2FF0B0F90D1DC003BB5A7 /* functions_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x65.html; sourceTree = ""; }; + 24A2FF0C0F90D1DC003BB5A7 /* functions_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x66.html; sourceTree = ""; }; + 24A2FF0D0F90D1DC003BB5A7 /* functions_0x67.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x67.html; sourceTree = ""; }; + 24A2FF0E0F90D1DC003BB5A7 /* functions_0x68.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x68.html; sourceTree = ""; }; + 24A2FF0F0F90D1DC003BB5A7 /* functions_0x69.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x69.html; sourceTree = ""; }; + 24A2FF100F90D1DC003BB5A7 /* functions_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x6b.html; sourceTree = ""; }; + 24A2FF110F90D1DC003BB5A7 /* functions_0x6c.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x6c.html; sourceTree = ""; }; + 24A2FF120F90D1DC003BB5A7 /* functions_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x6d.html; sourceTree = ""; }; + 24A2FF130F90D1DC003BB5A7 /* functions_0x6e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x6e.html; sourceTree = ""; }; + 24A2FF140F90D1DC003BB5A7 /* functions_0x6f.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x6f.html; sourceTree = ""; }; + 24A2FF150F90D1DC003BB5A7 /* functions_0x70.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x70.html; sourceTree = ""; }; + 24A2FF160F90D1DC003BB5A7 /* functions_0x72.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x72.html; sourceTree = ""; }; + 24A2FF170F90D1DC003BB5A7 /* functions_0x73.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x73.html; sourceTree = ""; }; + 24A2FF180F90D1DC003BB5A7 /* functions_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x74.html; sourceTree = ""; }; + 24A2FF190F90D1DC003BB5A7 /* functions_0x75.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x75.html; sourceTree = ""; }; + 24A2FF1A0F90D1DC003BB5A7 /* functions_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x76.html; sourceTree = ""; }; + 24A2FF1B0F90D1DC003BB5A7 /* functions_0x77.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x77.html; sourceTree = ""; }; + 24A2FF1C0F90D1DC003BB5A7 /* functions_0x78.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x78.html; sourceTree = ""; }; + 24A2FF1D0F90D1DC003BB5A7 /* functions_0x79.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x79.html; sourceTree = ""; }; + 24A2FF1E0F90D1DC003BB5A7 /* functions_0x7e.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_0x7e.html; sourceTree = ""; }; + 24A2FF1F0F90D1DC003BB5A7 /* functions_func.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_func.html; sourceTree = ""; }; + 24A2FF200F90D1DC003BB5A7 /* functions_vars.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = functions_vars.html; sourceTree = ""; }; + 24A2FF210F90D1DC003BB5A7 /* globals.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals.html; sourceTree = ""; }; + 24A2FF220F90D1DC003BB5A7 /* globals_0x62.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x62.html; sourceTree = ""; }; + 24A2FF230F90D1DC003BB5A7 /* globals_0x63.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x63.html; sourceTree = ""; }; + 24A2FF240F90D1DC003BB5A7 /* globals_0x64.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x64.html; sourceTree = ""; }; + 24A2FF250F90D1DC003BB5A7 /* globals_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x65.html; sourceTree = ""; }; + 24A2FF260F90D1DC003BB5A7 /* globals_0x66.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x66.html; sourceTree = ""; }; + 24A2FF270F90D1DC003BB5A7 /* globals_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x6b.html; sourceTree = ""; }; + 24A2FF280F90D1DC003BB5A7 /* globals_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x6d.html; sourceTree = ""; }; + 24A2FF290F90D1DC003BB5A7 /* globals_0x74.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x74.html; sourceTree = ""; }; + 24A2FF2A0F90D1DC003BB5A7 /* globals_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_0x76.html; sourceTree = ""; }; + 24A2FF2B0F90D1DC003BB5A7 /* globals_defs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_defs.html; sourceTree = ""; }; + 24A2FF2C0F90D1DC003BB5A7 /* globals_enum.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_enum.html; sourceTree = ""; }; + 24A2FF2D0F90D1DC003BB5A7 /* globals_eval.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_eval.html; sourceTree = ""; }; + 24A2FF2E0F90D1DC003BB5A7 /* globals_eval_0x65.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_eval_0x65.html; sourceTree = ""; }; + 24A2FF2F0F90D1DC003BB5A7 /* globals_eval_0x6b.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_eval_0x6b.html; sourceTree = ""; }; + 24A2FF300F90D1DC003BB5A7 /* globals_eval_0x6d.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_eval_0x6d.html; sourceTree = ""; }; + 24A2FF310F90D1DC003BB5A7 /* globals_eval_0x76.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_eval_0x76.html; sourceTree = ""; }; + 24A2FF320F90D1DC003BB5A7 /* globals_func.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_func.html; sourceTree = ""; }; + 24A2FF330F90D1DC003BB5A7 /* globals_type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_type.html; sourceTree = ""; }; + 24A2FF340F90D1DC003BB5A7 /* globals_vars.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = globals_vars.html; sourceTree = ""; }; + 24A2FF350F90D1DC003BB5A7 /* hierarchy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = hierarchy.html; sourceTree = ""; }; + 24A2FF360F90D1DC003BB5A7 /* history.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = history.html; sourceTree = ""; }; + 24A2FF370F90D1DC003BB5A7 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + 24A2FF380F90D1DC003BB5A7 /* Initialisation.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Initialisation.gif; sourceTree = ""; }; + 24A2FF390F90D1DC003BB5A7 /* intro.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = intro.html; sourceTree = ""; }; + 24A2FF3A0F90D1DC003BB5A7 /* IOchange.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = IOchange.gif; sourceTree = ""; }; + 24A2FF3B0F90D1DC003BB5A7 /* license.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = license.html; sourceTree = ""; }; + 24A2FF3C0F90D1DC003BB5A7 /* maceditor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = maceditor.html; sourceTree = ""; }; + 24A2FF3D0F90D1DC003BB5A7 /* main.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = main.html; sourceTree = ""; }; + 24A2FF3E0F90D1DC003BB5A7 /* namespace_host_can_dos.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = namespace_host_can_dos.html; sourceTree = ""; }; + 24A2FF3F0F90D1DC003BB5A7 /* namespace_plug_can_dos.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = namespace_plug_can_dos.html; sourceTree = ""; }; + 24A2FF400F90D1DC003BB5A7 /* namespacemembers.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = namespacemembers.html; sourceTree = ""; }; + 24A2FF410F90D1DC003BB5A7 /* namespacemembers_vars.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = namespacemembers_vars.html; sourceTree = ""; }; + 24A2FF420F90D1DC003BB5A7 /* namespaces.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = namespaces.html; sourceTree = ""; }; + 24A2FF430F90D1DC003BB5A7 /* Offlineprocessing.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Offlineprocessing.gif; sourceTree = ""; }; + 24A2FF440F90D1DC003BB5A7 /* others.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = others.html; sourceTree = ""; }; + 24A2FF450F90D1DC003BB5A7 /* pages.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = pages.html; sourceTree = ""; }; + 24A2FF460F90D1DC003BB5A7 /* Sampleratechange.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Sampleratechange.gif; sourceTree = ""; }; + 24A2FF470F90D1DC003BB5A7 /* sequences.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = sequences.html; sourceTree = ""; }; + 24A2FF480F90D1DC003BB5A7 /* SpeakerarrangementnegotiationforVSTfx.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = SpeakerarrangementnegotiationforVSTfx.gif; sourceTree = ""; }; + 24A2FF490F90D1DC003BB5A7 /* struct_a_effect-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_a_effect-members.html"; sourceTree = ""; }; + 24A2FF4A0F90D1DC003BB5A7 /* struct_a_effect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_a_effect.html; sourceTree = ""; }; + 24A2FF4B0F90D1DC003BB5A7 /* struct_e_rect-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_e_rect-members.html"; sourceTree = ""; }; + 24A2FF4C0F90D1DC003BB5A7 /* struct_e_rect.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_e_rect.html; sourceTree = ""; }; + 24A2FF4D0F90D1DC003BB5A7 /* struct_midi_key_name-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_midi_key_name-members.html"; sourceTree = ""; }; + 24A2FF4E0F90D1DC003BB5A7 /* struct_midi_key_name.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_midi_key_name.html; sourceTree = ""; }; + 24A2FF4F0F90D1DC003BB5A7 /* struct_midi_program_category-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_midi_program_category-members.html"; sourceTree = ""; }; + 24A2FF500F90D1DC003BB5A7 /* struct_midi_program_category.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_midi_program_category.html; sourceTree = ""; }; + 24A2FF510F90D1DC003BB5A7 /* struct_midi_program_name-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_midi_program_name-members.html"; sourceTree = ""; }; + 24A2FF520F90D1DC003BB5A7 /* struct_midi_program_name.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_midi_program_name.html; sourceTree = ""; }; + 24A2FF530F90D1DC003BB5A7 /* struct_vst_audio_file-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_audio_file-members.html"; sourceTree = ""; }; + 24A2FF540F90D1DC003BB5A7 /* struct_vst_audio_file.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_audio_file.html; sourceTree = ""; }; + 24A2FF550F90D1DC003BB5A7 /* struct_vst_audio_file_marker-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_audio_file_marker-members.html"; sourceTree = ""; }; + 24A2FF560F90D1DC003BB5A7 /* struct_vst_audio_file_marker.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_audio_file_marker.html; sourceTree = ""; }; + 24A2FF570F90D1DC003BB5A7 /* struct_vst_event-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_event-members.html"; sourceTree = ""; }; + 24A2FF580F90D1DC003BB5A7 /* struct_vst_event.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_event.html; sourceTree = ""; }; + 24A2FF590F90D1DD003BB5A7 /* struct_vst_events-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_events-members.html"; sourceTree = ""; }; + 24A2FF5A0F90D1DD003BB5A7 /* struct_vst_events.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_events.html; sourceTree = ""; }; + 24A2FF5B0F90D1DD003BB5A7 /* struct_vst_file_select-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_file_select-members.html"; sourceTree = ""; }; + 24A2FF5C0F90D1DD003BB5A7 /* struct_vst_file_select.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_file_select.html; sourceTree = ""; }; + 24A2FF5D0F90D1DD003BB5A7 /* struct_vst_file_type-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_file_type-members.html"; sourceTree = ""; }; + 24A2FF5E0F90D1DD003BB5A7 /* struct_vst_file_type.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_file_type.html; sourceTree = ""; }; + 24A2FF5F0F90D1DD003BB5A7 /* struct_vst_key_code-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_key_code-members.html"; sourceTree = ""; }; + 24A2FF600F90D1DD003BB5A7 /* struct_vst_key_code.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_key_code.html; sourceTree = ""; }; + 24A2FF610F90D1DD003BB5A7 /* struct_vst_midi_event-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_midi_event-members.html"; sourceTree = ""; }; + 24A2FF620F90D1DD003BB5A7 /* struct_vst_midi_event.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_midi_event.html; sourceTree = ""; }; + 24A2FF630F90D1DD003BB5A7 /* struct_vst_midi_sysex_event-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_midi_sysex_event-members.html"; sourceTree = ""; }; + 24A2FF640F90D1DD003BB5A7 /* struct_vst_midi_sysex_event.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_midi_sysex_event.html; sourceTree = ""; }; + 24A2FF650F90D1DD003BB5A7 /* struct_vst_offline_task-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_offline_task-members.html"; sourceTree = ""; }; + 24A2FF660F90D1DD003BB5A7 /* struct_vst_offline_task.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_offline_task.html; sourceTree = ""; }; + 24A2FF670F90D1DD003BB5A7 /* struct_vst_parameter_properties-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_parameter_properties-members.html"; sourceTree = ""; }; + 24A2FF680F90D1DD003BB5A7 /* struct_vst_parameter_properties.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_parameter_properties.html; sourceTree = ""; }; + 24A2FF690F90D1DD003BB5A7 /* struct_vst_patch_chunk_info-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_patch_chunk_info-members.html"; sourceTree = ""; }; + 24A2FF6A0F90D1DD003BB5A7 /* struct_vst_patch_chunk_info.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_patch_chunk_info.html; sourceTree = ""; }; + 24A2FF6B0F90D1DD003BB5A7 /* struct_vst_pin_properties-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_pin_properties-members.html"; sourceTree = ""; }; + 24A2FF6C0F90D1DD003BB5A7 /* struct_vst_pin_properties.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_pin_properties.html; sourceTree = ""; }; + 24A2FF6D0F90D1DD003BB5A7 /* struct_vst_speaker_arrangement-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_speaker_arrangement-members.html"; sourceTree = ""; }; + 24A2FF6E0F90D1DD003BB5A7 /* struct_vst_speaker_arrangement.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_speaker_arrangement.html; sourceTree = ""; }; + 24A2FF6F0F90D1DD003BB5A7 /* struct_vst_speaker_properties-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_speaker_properties-members.html"; sourceTree = ""; }; + 24A2FF700F90D1DD003BB5A7 /* struct_vst_speaker_properties.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_speaker_properties.html; sourceTree = ""; }; + 24A2FF710F90D1DD003BB5A7 /* struct_vst_time_info-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_time_info-members.html"; sourceTree = ""; }; + 24A2FF720F90D1DD003BB5A7 /* struct_vst_time_info.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_time_info.html; sourceTree = ""; }; + 24A2FF730F90D1DD003BB5A7 /* struct_vst_variable_io-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_variable_io-members.html"; sourceTree = ""; }; + 24A2FF740F90D1DD003BB5A7 /* struct_vst_variable_io.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_variable_io.html; sourceTree = ""; }; + 24A2FF750F90D1DD003BB5A7 /* struct_vst_window-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "struct_vst_window-members.html"; sourceTree = ""; }; + 24A2FF760F90D1DD003BB5A7 /* struct_vst_window.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = struct_vst_window.html; sourceTree = ""; }; + 24A2FF770F90D1DD003BB5A7 /* structfx_bank-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "structfx_bank-members.html"; sourceTree = ""; }; + 24A2FF780F90D1DD003BB5A7 /* structfx_bank.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = structfx_bank.html; sourceTree = ""; }; + 24A2FF790F90D1DD003BB5A7 /* structfx_program-members.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "structfx_program-members.html"; sourceTree = ""; }; + 24A2FF7A0F90D1DD003BB5A7 /* structfx_program.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = structfx_program.html; sourceTree = ""; }; + 24A2FF7B0F90D1DD003BB5A7 /* tab_b.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_b.gif; sourceTree = ""; }; + 24A2FF7C0F90D1DD003BB5A7 /* tab_l.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_l.gif; sourceTree = ""; }; + 24A2FF7D0F90D1DD003BB5A7 /* tab_r.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tab_r.gif; sourceTree = ""; }; + 24A2FF7E0F90D1DD003BB5A7 /* tabs.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = tabs.css; sourceTree = ""; }; + 24A2FF7F0F90D1DD003BB5A7 /* Termination.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Termination.gif; sourceTree = ""; }; + 24A2FF800F90D1DD003BB5A7 /* thanks.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = thanks.html; sourceTree = ""; }; + 24A2FF810F90D1DD003BB5A7 /* tree.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = tree.html; sourceTree = ""; }; + 24A2FF820F90D1DD003BB5A7 /* TurnOff.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = TurnOff.gif; sourceTree = ""; }; + 24A2FF830F90D1DD003BB5A7 /* TurnOn.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = TurnOn.gif; sourceTree = ""; }; + 24A2FF840F90D1DD003BB5A7 /* vstfxstore_8h.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = vstfxstore_8h.html; sourceTree = ""; }; + 24A2FF850F90D1DD003BB5A7 /* vstoffline.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = vstoffline.html; sourceTree = ""; }; + 24A2FF860F90D1DD003BB5A7 /* vstparamstruct.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = vstparamstruct.html; sourceTree = ""; }; + 24A2FF870F90D1DD003BB5A7 /* vstpluglogo.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = vstpluglogo.jpg; sourceTree = ""; }; + 24A2FF880F90D1DD003BB5A7 /* vstplugmain_8cpp.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = vstplugmain_8cpp.html; sourceTree = ""; }; + 24A2FF890F90D1DD003BB5A7 /* whatsnew.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = whatsnew.html; sourceTree = ""; }; + 24A2FF8A0F90D1DD003BB5A7 /* sdk.menu.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = sdk.menu.html; sourceTree = ""; }; + 24A2FF8B0F90D1DD003BB5A7 /* sdk.overview.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = sdk.overview.html; sourceTree = ""; }; + 24A2FF8C0F90D1DD003BB5A7 /* sdkdoc.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = sdkdoc.css; sourceTree = ""; }; + 24A2FF8D0F90D1DD003BB5A7 /* VST Licensing Agreement.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "VST Licensing Agreement.rtf"; sourceTree = ""; }; + 24A2FF8E0F90D1DD003BB5A7 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + 24A2FF910F90D1DD003BB5A7 /* aeffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffect.h; sourceTree = ""; }; + 24A2FF920F90D1DD003BB5A7 /* aeffectx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffectx.h; sourceTree = ""; }; + 24A2FF930F90D1DD003BB5A7 /* vstfxstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstfxstore.h; sourceTree = ""; }; + 24A2FF980F90D1DD003BB5A7 /* adelay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = adelay.cpp; sourceTree = ""; }; + 24A2FF990F90D1DD003BB5A7 /* adelay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adelay.h; sourceTree = ""; }; + 24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = adelaymain.cpp; sourceTree = ""; }; + 24A2FF9D0F90D1DD003BB5A7 /* bmp00128.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp00128.bmp; sourceTree = ""; }; + 24A2FF9E0F90D1DD003BB5A7 /* bmp00129.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp00129.bmp; sourceTree = ""; }; + 24A2FF9F0F90D1DD003BB5A7 /* bmp00130.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp00130.bmp; sourceTree = ""; }; + 24A2FFA00F90D1DD003BB5A7 /* surrounddelay.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = surrounddelay.rc; sourceTree = ""; }; + 24A2FFA10F90D1DD003BB5A7 /* sdeditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sdeditor.cpp; sourceTree = ""; }; + 24A2FFA20F90D1DD003BB5A7 /* sdeditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sdeditor.h; sourceTree = ""; }; + 24A2FFA30F90D1DD003BB5A7 /* surrounddelay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = surrounddelay.cpp; sourceTree = ""; }; + 24A2FFA40F90D1DD003BB5A7 /* surrounddelay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surrounddelay.h; sourceTree = ""; }; + 24A2FFA60F90D1DD003BB5A7 /* adelay.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = adelay.vcproj; sourceTree = ""; }; + 24A2FFA70F90D1DD003BB5A7 /* surrounddelay.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = surrounddelay.vcproj; sourceTree = ""; }; + 24A2FFAA0F90D1DD003BB5A7 /* again.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = again.cpp; sourceTree = ""; }; + 24A2FFAB0F90D1DD003BB5A7 /* again.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = again.h; sourceTree = ""; }; + 24A2FFAD0F90D1DD003BB5A7 /* again.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = again.vcproj; sourceTree = ""; }; + 24A2FFAF0F90D1DD003BB5A7 /* minihost-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "minihost-Info.plist"; sourceTree = ""; }; + 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "vst 2.4 examples.xcodeproj"; sourceTree = ""; }; + 24A2FFB30F90D1DD003BB5A7 /* vst2.4Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = vst2.4Info.plist; sourceTree = ""; }; + 24A2FFB60F90D1DD003BB5A7 /* minieditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = minieditor.cpp; sourceTree = ""; }; + 24A2FFB70F90D1DD003BB5A7 /* minihost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = minihost.cpp; sourceTree = ""; }; + 24A2FFB90F90D1DD003BB5A7 /* minihost.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = minihost.vcproj; sourceTree = ""; }; + 24A2FFBC0F90D1DD003BB5A7 /* vstxsynth.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vstxsynth.rc; sourceTree = ""; }; + 24A2FFBD0F90D1DD003BB5A7 /* vstxsynth.vstxml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vstxsynth.vstxml; sourceTree = ""; }; + 24A2FFBF0F90D1DD003BB5A7 /* gmnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gmnames.h; sourceTree = ""; }; + 24A2FFC00F90D1DD003BB5A7 /* vstxsynth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstxsynth.cpp; sourceTree = ""; }; + 24A2FFC10F90D1DD003BB5A7 /* vstxsynth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vstxsynth.h; sourceTree = ""; }; + 24A2FFC20F90D1DD003BB5A7 /* vstxsynthproc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstxsynthproc.cpp; sourceTree = ""; }; + 24A2FFC40F90D1DD003BB5A7 /* vstxsynth.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = vstxsynth.vcproj; sourceTree = ""; }; + 24A2FFC60F90D1DD003BB5A7 /* samples.sln */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = samples.sln; sourceTree = ""; }; + 24A2FFC70F90D1DD003BB5A7 /* vstplug.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vstplug.def; sourceTree = ""; }; + 24A2FFC90F90D1DD003BB5A7 /* adelay.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = adelay.vcproj; sourceTree = ""; }; + 24A2FFCA0F90D1DD003BB5A7 /* again.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = again.vcproj; sourceTree = ""; }; + 24A2FFCB0F90D1DD003BB5A7 /* minihost.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = minihost.vcproj; sourceTree = ""; }; + 24A2FFCC0F90D1DD003BB5A7 /* samples.sln */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = samples.sln; sourceTree = ""; }; + 24A2FFCD0F90D1DD003BB5A7 /* surrounddelay.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = surrounddelay.vcproj; sourceTree = ""; }; + 24A2FFCE0F90D1DD003BB5A7 /* vstxsynth.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = vstxsynth.vcproj; sourceTree = ""; }; + 24A2FFD00F90D1DD003BB5A7 /* adelay.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = adelay.dsp; sourceTree = ""; }; + 24A2FFD10F90D1DD003BB5A7 /* again.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = again.dsp; sourceTree = ""; }; + 24A2FFD20F90D1DD003BB5A7 /* minihost.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = minihost.dsp; sourceTree = ""; }; + 24A2FFD30F90D1DD003BB5A7 /* samples.dsw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = samples.dsw; sourceTree = ""; }; + 24A2FFD40F90D1DD003BB5A7 /* surrounddelay.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = surrounddelay.dsp; sourceTree = ""; }; + 24A2FFD50F90D1DD003BB5A7 /* vstxsynth.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vstxsynth.dsp; sourceTree = ""; }; + 24A2FFD80F90D1DD003BB5A7 /* aeffeditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aeffeditor.h; sourceTree = ""; }; + 24A2FFD90F90D1DD003BB5A7 /* audioeffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audioeffect.cpp; sourceTree = ""; }; + 24A2FFDA0F90D1DD003BB5A7 /* audioeffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audioeffect.h; sourceTree = ""; }; + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audioeffectx.cpp; sourceTree = ""; }; + 24A2FFDC0F90D1DD003BB5A7 /* audioeffectx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audioeffectx.h; sourceTree = ""; }; + 24A2FFDD0F90D1DD003BB5A7 /* vstplugmain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vstplugmain.cpp; sourceTree = ""; }; + 24A2FFE10F90D1DD003BB5A7 /* audiounit.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = audiounit.exp; sourceTree = ""; }; + 24A2FFE20F90D1DD003BB5A7 /* cw_vst_prefix.pch++ */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "cw_vst_prefix.pch++"; sourceTree = ""; }; + 24A2FFE30F90D1DD003BB5A7 /* drawtest.cw9prj */ = {isa = PBXFileReference; lastKnownFileType = file; path = drawtest.cw9prj; sourceTree = ""; }; + 24A2FFE40F90D1DD003BB5A7 /* drawtest.plc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = drawtest.plc; sourceTree = ""; }; + 24A2FFE50F90D1DD003BB5A7 /* drawtest.xcode */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = drawtest.xcode; sourceTree = ""; }; + 24A2FFE80F90D1DD003BB5A7 /* drawtest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = drawtest.xcodeproj; sourceTree = ""; }; + 24A2FFEB0F90D1DD003BB5A7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 24A2FFEC0F90D1DD003BB5A7 /* xcode_au_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xcode_au_prefix.h; sourceTree = ""; }; + 24A2FFED0F90D1DD003BB5A7 /* xcode_vst_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xcode_vst_prefix.h; sourceTree = ""; }; + 24A2FFEF0F90D1DD003BB5A7 /* audiounit.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = audiounit.r; sourceTree = ""; }; + 24A2FFF00F90D1DD003BB5A7 /* bmp00001.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bmp00001.png; sourceTree = ""; }; + 24A2FFF10F90D1DD003BB5A7 /* bmp00100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bmp00100.png; sourceTree = ""; }; + 24A2FFF20F90D1DD003BB5A7 /* bmp01000.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bmp01000.png; sourceTree = ""; }; + 24A2FFF30F90D1DD003BB5A7 /* bmp10001.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10001.bmp; sourceTree = ""; }; + 24A2FFF40F90D1DD003BB5A7 /* bmp10002.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10002.bmp; sourceTree = ""; }; + 24A2FFF50F90D1DD003BB5A7 /* bmp10003.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10003.bmp; sourceTree = ""; }; + 24A2FFF60F90D1DD003BB5A7 /* bmp10004.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10004.bmp; sourceTree = ""; }; + 24A2FFF70F90D1DD003BB5A7 /* bmp10005.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10005.bmp; sourceTree = ""; }; + 24A2FFF80F90D1DD003BB5A7 /* bmp10006.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10006.bmp; sourceTree = ""; }; + 24A2FFF90F90D1DD003BB5A7 /* bmp10007.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10007.bmp; sourceTree = ""; }; + 24A2FFFA0F90D1DD003BB5A7 /* bmp10008.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10008.bmp; sourceTree = ""; }; + 24A2FFFB0F90D1DD003BB5A7 /* bmp10009.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10009.bmp; sourceTree = ""; }; + 24A2FFFC0F90D1DD003BB5A7 /* bmp10010.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10010.bmp; sourceTree = ""; }; + 24A2FFFD0F90D1DD003BB5A7 /* bmp10011.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10011.bmp; sourceTree = ""; }; + 24A2FFFE0F90D1DD003BB5A7 /* bmp10012.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10012.bmp; sourceTree = ""; }; + 24A2FFFF0F90D1DD003BB5A7 /* bmp10013.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = bmp10013.bmp; sourceTree = ""; }; + 24CFB70307E7A0220081BD57 /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PkgInfo; path = mac/PkgInfo; sourceTree = ""; }; + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Dynamics3Proc.cpp; path = source/Dynamics3Proc.cpp; sourceTree = ""; }; + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = xcode_vst_prefix.h; path = mac/xcode_vst_prefix.h; sourceTree = SOURCE_ROOT; }; + 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = mac/Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* FM-Chopper */ = { + isa = PBXGroup; + children = ( + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB4FE9D528D11CA2CBB /* Products */, + 089C167CFE841241C02AAC07 /* Resources */, + 08FB77ADFE841716C02AAC07 /* Source */, + 24A2FEBB0F90D1DB003BB5A7 /* vstsdk2.4 */, + ); + name = "FM-Chopper"; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 2434720A098313350063BBF1 /* QuickTime.framework */, + 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */, + 24CFB70307E7A0220081BD57 /* PkgInfo */, + 8D01CCD10486CAD60068D4B7 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ADFE841716C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 2407DEB6089929BA00EB68BF /* Dynamics3.cpp */, + 24D8286F09A914000093AEF8 /* Dynamics3Proc.cpp */, + 245463B80991757100464AD3 /* Dynamics3.h */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB4FE9D528D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2407DE920899296600EB68BF /* Dynamics3.vst */, + ); + name = Products; + sourceTree = ""; + }; + 24A200030F90D1DD003BB5A7 /* source */ = { + isa = PBXGroup; + children = ( + 24A200040F90D1DD003BB5A7 /* controlsgui.cpp */, + 24A200050F90D1DD003BB5A7 /* controlsgui.h */, + 24A200060F90D1DD003BB5A7 /* pdrawtesteditor.cpp */, + 24A200070F90D1DD003BB5A7 /* pdrawtesteditor.h */, + 24A200080F90D1DD003BB5A7 /* pdrawtesteffect.cpp */, + 24A200090F90D1DD003BB5A7 /* pdrawtesteffect.h */, + 24A2000A0F90D1DD003BB5A7 /* pdrawtestmain.cpp */, + 24A2000B0F90D1DD003BB5A7 /* pdrawtestview.cpp */, + 24A2000C0F90D1DD003BB5A7 /* pdrawtestview.h */, + 24A2000D0F90D1DD003BB5A7 /* pprimitivesviews.cpp */, + 24A2000E0F90D1DD003BB5A7 /* pprimitivesviews.h */, + ); + name = source; + path = /vstsdk2.4/vstgui.sf/drawtest/source; + sourceTree = ""; + }; + 24A2000F0F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A200100F90D1DD003BB5A7 /* drawtest.def */, + 24A200110F90D1DD003BB5A7 /* drawtest.rc */, + 24A200120F90D1DD003BB5A7 /* drawtest.vcproj */, + ); + name = win; + path = /vstsdk2.4/vstgui.sf/drawtest/win; + sourceTree = ""; + }; + 24A200130F90D1DD003BB5A7 /* win.vc6 */ = { + isa = PBXGroup; + children = ( + 24A200140F90D1DD003BB5A7 /* drawtest.dsp */, + 24A200150F90D1DD003BB5A7 /* drawtest.dsw */, + ); + name = win.vc6; + path = /vstsdk2.4/vstgui.sf/drawtest/win.vc6; + sourceTree = ""; + }; + 24A200160F90D1DD003BB5A7 /* vstgui */ = { + isa = PBXGroup; + children = ( + 24A200170F90D1DD003BB5A7 /* aeffguieditor.cpp */, + 24A200180F90D1DD003BB5A7 /* aeffguieditor.h */, + 24A200190F90D1DD003BB5A7 /* cfileselector.cpp */, + 24A2001A0F90D1DD003BB5A7 /* cfileselector.h */, + 24A2001B0F90D1DD003BB5A7 /* Changelog */, + 24A2001C0F90D1DD003BB5A7 /* cscrollview.cpp */, + 24A2001D0F90D1DD003BB5A7 /* cscrollview.h */, + 24A2001E0F90D1DD003BB5A7 /* ctabview.cpp */, + 24A2001F0F90D1DD003BB5A7 /* ctabview.h */, + 24A200200F90D1DD003BB5A7 /* Documentation */, + 24A201460F90D1DE003BB5A7 /* plugguieditor.cpp */, + 24A201470F90D1DE003BB5A7 /* plugguieditor.h */, + 24A201480F90D1DE003BB5A7 /* vstcontrols.cpp */, + 24A201490F90D1DE003BB5A7 /* vstcontrols.h */, + 24A2014A0F90D1DE003BB5A7 /* vstgui.cpp */, + 24A2014B0F90D1DE003BB5A7 /* vstgui.h */, + 24A2014C0F90D1DE003BB5A7 /* vstkeycode.h */, + 24A2014D0F90D1DE003BB5A7 /* vstplugscarbon.h */, + 24A2014E0F90D1DE003BB5A7 /* vstplugsmac.h */, + 24A2014F0F90D1DE003BB5A7 /* vstplugsmacho.h */, + 24A201500F90D1DE003BB5A7 /* vstplugsquartz.h */, + ); + name = vstgui; + path = /vstsdk2.4/vstgui.sf/vstgui; + sourceTree = ""; + }; + 24A200200F90D1DD003BB5A7 /* Documentation */ = { + isa = PBXGroup; + children = ( + 24A200210F90D1DD003BB5A7 /* html */, + 24A201440F90D1DE003BB5A7 /* index.html */, + 24A201450F90D1DE003BB5A7 /* Migrating from 2.3.rtf */, + ); + name = Documentation; + path = /vstsdk2.4/vstgui.sf/vstgui/Documentation; + sourceTree = ""; + }; + 24A200210F90D1DD003BB5A7 /* html */ = { + isa = PBXGroup; + children = ( + 24A200220F90D1DD003BB5A7 /* aeffguieditor_8cpp.html */, + 24A200230F90D1DD003BB5A7 /* aeffguieditor_8h.html */, + 24A200240F90D1DD003BB5A7 /* annotated.html */, + 24A200250F90D1DD003BB5A7 /* cfileselector_8cpp.html */, + 24A200260F90D1DD003BB5A7 /* cfileselector_8h.html */, + 24A200270F90D1DD003BB5A7 /* class_a_eff_g_u_i_editor-members.html */, + 24A200280F90D1DD003BB5A7 /* class_a_eff_g_u_i_editor.html */, + 24A200290F90D1DD003BB5A7 /* class_c_anim_knob-members.html */, + 24A2002A0F90D1DD003BB5A7 /* class_c_anim_knob.html */, + 24A2002B0F90D1DD003BB5A7 /* class_c_anim_knob.png */, + 24A2002C0F90D1DD003BB5A7 /* class_c_attribute_list_entry-members.html */, + 24A2002D0F90D1DD003BB5A7 /* class_c_attribute_list_entry.html */, + 24A2002E0F90D1DD003BB5A7 /* class_c_auto_animation-members.html */, + 24A2002F0F90D1DD003BB5A7 /* class_c_auto_animation.html */, + 24A200300F90D1DD003BB5A7 /* class_c_auto_animation.png */, + 24A200310F90D1DD003BB5A7 /* class_c_bitmap-members.html */, + 24A200320F90D1DD003BB5A7 /* class_c_bitmap.html */, + 24A200330F90D1DD003BB5A7 /* class_c_bitmap.png */, + 24A200340F90D1DD003BB5A7 /* class_c_c_view-members.html */, + 24A200350F90D1DD003BB5A7 /* class_c_c_view.html */, + 24A200360F90D1DD003BB5A7 /* class_c_control-members.html */, + 24A200370F90D1DD003BB5A7 /* class_c_control.html */, + 24A200380F90D1DD003BB5A7 /* class_c_control.png */, + 24A200390F90D1DD003BB5A7 /* class_c_control_listener-members.html */, + 24A2003A0F90D1DD003BB5A7 /* class_c_control_listener.html */, + 24A2003B0F90D1DD003BB5A7 /* class_c_control_listener.png */, + 24A2003C0F90D1DD003BB5A7 /* class_c_drag_container-members.html */, + 24A2003D0F90D1DD003BB5A7 /* class_c_drag_container.html */, + 24A2003E0F90D1DD003BB5A7 /* class_c_drag_container.png */, + 24A2003F0F90D1DD003BB5A7 /* class_c_draw_context-members.html */, + 24A200400F90D1DD003BB5A7 /* class_c_draw_context.html */, + 24A200410F90D1DD003BB5A7 /* class_c_draw_context.png */, + 24A200420F90D1DD003BB5A7 /* class_c_file_selector-members.html */, + 24A200430F90D1DD003BB5A7 /* class_c_file_selector.html */, + 24A200440F90D1DD003BB5A7 /* class_c_frame-members.html */, + 24A200450F90D1DD003BB5A7 /* class_c_frame.html */, + 24A200460F90D1DD003BB5A7 /* class_c_frame.png */, + 24A200470F90D1DD003BB5A7 /* class_c_horizontal_slider-members.html */, + 24A200480F90D1DD003BB5A7 /* class_c_horizontal_slider.html */, + 24A200490F90D1DD003BB5A7 /* class_c_horizontal_slider.png */, + 24A2004A0F90D1DD003BB5A7 /* class_c_horizontal_switch-members.html */, + 24A2004B0F90D1DD003BB5A7 /* class_c_horizontal_switch.html */, + 24A2004C0F90D1DD003BB5A7 /* class_c_horizontal_switch.png */, + 24A2004D0F90D1DD003BB5A7 /* class_c_kick_button-members.html */, + 24A2004E0F90D1DD003BB5A7 /* class_c_kick_button.html */, + 24A2004F0F90D1DD003BB5A7 /* class_c_kick_button.png */, + 24A200500F90D1DD003BB5A7 /* class_c_knob-members.html */, + 24A200510F90D1DD003BB5A7 /* class_c_knob.html */, + 24A200520F90D1DD003BB5A7 /* class_c_knob.png */, + 24A200530F90D1DD003BB5A7 /* class_c_movie_bitmap-members.html */, + 24A200540F90D1DD003BB5A7 /* class_c_movie_bitmap.html */, + 24A200550F90D1DD003BB5A7 /* class_c_movie_bitmap.png */, + 24A200560F90D1DD003BB5A7 /* class_c_movie_button-members.html */, + 24A200570F90D1DD003BB5A7 /* class_c_movie_button.html */, + 24A200580F90D1DD003BB5A7 /* class_c_movie_button.png */, + 24A200590F90D1DD003BB5A7 /* class_c_offscreen_context-members.html */, + 24A2005A0F90D1DD003BB5A7 /* class_c_offscreen_context.html */, + 24A2005B0F90D1DD003BB5A7 /* class_c_offscreen_context.png */, + 24A2005C0F90D1DD003BB5A7 /* class_c_on_off_button-members.html */, + 24A2005D0F90D1DD003BB5A7 /* class_c_on_off_button.html */, + 24A2005E0F90D1DD003BB5A7 /* class_c_on_off_button.png */, + 24A2005F0F90D1DD003BB5A7 /* class_c_option_menu-members.html */, + 24A200600F90D1DD003BB5A7 /* class_c_option_menu.html */, + 24A200610F90D1DD003BB5A7 /* class_c_option_menu.png */, + 24A200620F90D1DD003BB5A7 /* class_c_option_menu_scheme-members.html */, + 24A200630F90D1DD003BB5A7 /* class_c_option_menu_scheme.html */, + 24A200640F90D1DD003BB5A7 /* class_c_option_menu_scheme.png */, + 24A200650F90D1DD003BB5A7 /* class_c_param_display-members.html */, + 24A200660F90D1DD003BB5A7 /* class_c_param_display.html */, + 24A200670F90D1DD003BB5A7 /* class_c_param_display.png */, + 24A200680F90D1DD003BB5A7 /* class_c_reference_counter-members.html */, + 24A200690F90D1DD003BB5A7 /* class_c_reference_counter.html */, + 24A2006A0F90D1DD003BB5A7 /* class_c_reference_counter.png */, + 24A2006B0F90D1DD003BB5A7 /* class_c_rocker_switch-members.html */, + 24A2006C0F90D1DD003BB5A7 /* class_c_rocker_switch.html */, + 24A2006D0F90D1DD003BB5A7 /* class_c_rocker_switch.png */, + 24A2006E0F90D1DD003BB5A7 /* class_c_scroll_container-members.html */, + 24A2006F0F90D1DD003BB5A7 /* class_c_scroll_container.html */, + 24A200700F90D1DD003BB5A7 /* class_c_scroll_container.png */, + 24A200710F90D1DD003BB5A7 /* class_c_scroll_view-members.html */, + 24A200720F90D1DD003BB5A7 /* class_c_scroll_view.html */, + 24A200730F90D1DD003BB5A7 /* class_c_scroll_view.png */, + 24A200740F90D1DD003BB5A7 /* class_c_scrollbar-members.html */, + 24A200750F90D1DD003BB5A7 /* class_c_scrollbar.html */, + 24A200760F90D1DD003BB5A7 /* class_c_scrollbar.png */, + 24A200770F90D1DD003BB5A7 /* class_c_slider-members.html */, + 24A200780F90D1DD003BB5A7 /* class_c_slider.html */, + 24A200790F90D1DD003BB5A7 /* class_c_slider.png */, + 24A2007A0F90D1DD003BB5A7 /* class_c_special_digit-members.html */, + 24A2007B0F90D1DD003BB5A7 /* class_c_special_digit.html */, + 24A2007C0F90D1DD003BB5A7 /* class_c_special_digit.png */, + 24A2007D0F90D1DD003BB5A7 /* class_c_splash_screen-members.html */, + 24A2007E0F90D1DD003BB5A7 /* class_c_splash_screen.html */, + 24A2007F0F90D1DD003BB5A7 /* class_c_splash_screen.png */, + 24A200800F90D1DD003BB5A7 /* class_c_splash_screen_view-members.html */, + 24A200810F90D1DD003BB5A7 /* class_c_splash_screen_view.html */, + 24A200820F90D1DD003BB5A7 /* class_c_splash_screen_view.png */, + 24A200830F90D1DD003BB5A7 /* class_c_tab_button-members.html */, + 24A200840F90D1DD003BB5A7 /* class_c_tab_button.html */, + 24A200850F90D1DD003BB5A7 /* class_c_tab_button.png */, + 24A200860F90D1DD003BB5A7 /* class_c_tab_child_view-members.html */, + 24A200870F90D1DD003BB5A7 /* class_c_tab_child_view.html */, + 24A200880F90D1DD003BB5A7 /* class_c_tab_child_view.png */, + 24A200890F90D1DD003BB5A7 /* class_c_tab_view-members.html */, + 24A2008A0F90D1DD003BB5A7 /* class_c_tab_view.html */, + 24A2008B0F90D1DD003BB5A7 /* class_c_tab_view.png */, + 24A2008C0F90D1DD003BB5A7 /* class_c_text_edit-members.html */, + 24A2008D0F90D1DD003BB5A7 /* class_c_text_edit.html */, + 24A2008E0F90D1DD003BB5A7 /* class_c_text_edit.png */, + 24A2008F0F90D1DD003BB5A7 /* class_c_text_label-members.html */, + 24A200900F90D1DD003BB5A7 /* class_c_text_label.html */, + 24A200910F90D1DD003BB5A7 /* class_c_text_label.png */, + 24A200920F90D1DD003BB5A7 /* class_c_vertical_slider-members.html */, + 24A200930F90D1DD003BB5A7 /* class_c_vertical_slider.html */, + 24A200940F90D1DD003BB5A7 /* class_c_vertical_slider.png */, + 24A200950F90D1DD003BB5A7 /* class_c_vertical_switch-members.html */, + 24A200960F90D1DD003BB5A7 /* class_c_vertical_switch.html */, + 24A200970F90D1DD003BB5A7 /* class_c_vertical_switch.png */, + 24A200980F90D1DD003BB5A7 /* class_c_view-members.html */, + 24A200990F90D1DD003BB5A7 /* class_c_view.html */, + 24A2009A0F90D1DD003BB5A7 /* class_c_view.png */, + 24A2009B0F90D1DD003BB5A7 /* class_c_view_container-members.html */, + 24A2009C0F90D1DD003BB5A7 /* class_c_view_container.html */, + 24A2009D0F90D1DD003BB5A7 /* class_c_view_container.png */, + 24A2009E0F90D1DD003BB5A7 /* class_c_vu_meter-members.html */, + 24A2009F0F90D1DD003BB5A7 /* class_c_vu_meter.html */, + 24A200A00F90D1DD003BB5A7 /* class_c_vu_meter.png */, + 24A200A10F90D1DD003BB5A7 /* class_i_scrollbar_drawer-members.html */, + 24A200A20F90D1DD003BB5A7 /* class_i_scrollbar_drawer.html */, + 24A200A30F90D1DD003BB5A7 /* class_plugin_g_u_i_editor-members.html */, + 24A200A40F90D1DD003BB5A7 /* class_plugin_g_u_i_editor.html */, + 24A200A50F90D1DD003BB5A7 /* cscrollview_8cpp.html */, + 24A200A60F90D1DD003BB5A7 /* cscrollview_8h.html */, + 24A200A70F90D1DD003BB5A7 /* ctabview_8cpp.html */, + 24A200A80F90D1DD003BB5A7 /* ctabview_8h.html */, + 24A200A90F90D1DD003BB5A7 /* deprecated.html */, + 24A200AA0F90D1DD003BB5A7 /* doc_8h.html */, + 24A200AB0F90D1DD003BB5A7 /* doxygen.css */, + 24A200AC0F90D1DD003BB5A7 /* doxygen.png */, + 24A200AD0F90D1DD003BB5A7 /* files.html */, + 24A200AE0F90D1DD003BB5A7 /* ftv2blank.png */, + 24A200AF0F90D1DD003BB5A7 /* ftv2doc.png */, + 24A200B00F90D1DD003BB5A7 /* ftv2folderclosed.png */, + 24A200B10F90D1DE003BB5A7 /* ftv2folderopen.png */, + 24A200B20F90D1DE003BB5A7 /* ftv2lastnode.png */, + 24A200B30F90D1DE003BB5A7 /* ftv2link.png */, + 24A200B40F90D1DE003BB5A7 /* ftv2mlastnode.png */, + 24A200B50F90D1DE003BB5A7 /* ftv2mnode.png */, + 24A200B60F90D1DE003BB5A7 /* ftv2node.png */, + 24A200B70F90D1DE003BB5A7 /* ftv2plastnode.png */, + 24A200B80F90D1DE003BB5A7 /* ftv2pnode.png */, + 24A200B90F90D1DE003BB5A7 /* ftv2vertline.png */, + 24A200BA0F90D1DE003BB5A7 /* functions.html */, + 24A200BB0F90D1DE003BB5A7 /* functions_0x62.html */, + 24A200BC0F90D1DE003BB5A7 /* functions_0x63.html */, + 24A200BD0F90D1DE003BB5A7 /* functions_0x64.html */, + 24A200BE0F90D1DE003BB5A7 /* functions_0x65.html */, + 24A200BF0F90D1DE003BB5A7 /* functions_0x66.html */, + 24A200C00F90D1DE003BB5A7 /* functions_0x67.html */, + 24A200C10F90D1DE003BB5A7 /* functions_0x68.html */, + 24A200C20F90D1DE003BB5A7 /* functions_0x69.html */, + 24A200C30F90D1DE003BB5A7 /* functions_0x6b.html */, + 24A200C40F90D1DE003BB5A7 /* functions_0x6c.html */, + 24A200C50F90D1DE003BB5A7 /* functions_0x6d.html */, + 24A200C60F90D1DE003BB5A7 /* functions_0x6e.html */, + 24A200C70F90D1DE003BB5A7 /* functions_0x6f.html */, + 24A200C80F90D1DE003BB5A7 /* functions_0x70.html */, + 24A200C90F90D1DE003BB5A7 /* functions_0x72.html */, + 24A200CA0F90D1DE003BB5A7 /* functions_0x73.html */, + 24A200CB0F90D1DE003BB5A7 /* functions_0x74.html */, + 24A200CC0F90D1DE003BB5A7 /* functions_0x75.html */, + 24A200CD0F90D1DE003BB5A7 /* functions_0x76.html */, + 24A200CE0F90D1DE003BB5A7 /* functions_0x77.html */, + 24A200CF0F90D1DE003BB5A7 /* functions_0x78.html */, + 24A200D00F90D1DE003BB5A7 /* functions_0x79.html */, + 24A200D10F90D1DE003BB5A7 /* functions_0x7a.html */, + 24A200D20F90D1DE003BB5A7 /* functions_0x7e.html */, + 24A200D30F90D1DE003BB5A7 /* functions_eval.html */, + 24A200D40F90D1DE003BB5A7 /* functions_func.html */, + 24A200D50F90D1DE003BB5A7 /* functions_func_0x62.html */, + 24A200D60F90D1DE003BB5A7 /* functions_func_0x63.html */, + 24A200D70F90D1DE003BB5A7 /* functions_func_0x64.html */, + 24A200D80F90D1DE003BB5A7 /* functions_func_0x65.html */, + 24A200D90F90D1DE003BB5A7 /* functions_func_0x66.html */, + 24A200DA0F90D1DE003BB5A7 /* functions_func_0x67.html */, + 24A200DB0F90D1DE003BB5A7 /* functions_func_0x68.html */, + 24A200DC0F90D1DE003BB5A7 /* functions_func_0x69.html */, + 24A200DD0F90D1DE003BB5A7 /* functions_func_0x6c.html */, + 24A200DE0F90D1DE003BB5A7 /* functions_func_0x6d.html */, + 24A200DF0F90D1DE003BB5A7 /* functions_func_0x6e.html */, + 24A200E00F90D1DE003BB5A7 /* functions_func_0x6f.html */, + 24A200E10F90D1DE003BB5A7 /* functions_func_0x70.html */, + 24A200E20F90D1DE003BB5A7 /* functions_func_0x72.html */, + 24A200E30F90D1DE003BB5A7 /* functions_func_0x73.html */, + 24A200E40F90D1DE003BB5A7 /* functions_func_0x74.html */, + 24A200E50F90D1DE003BB5A7 /* functions_func_0x75.html */, + 24A200E60F90D1DE003BB5A7 /* functions_func_0x76.html */, + 24A200E70F90D1DE003BB5A7 /* functions_func_0x77.html */, + 24A200E80F90D1DE003BB5A7 /* functions_func_0x7e.html */, + 24A200E90F90D1DE003BB5A7 /* functions_rela.html */, + 24A200EA0F90D1DE003BB5A7 /* functions_vars.html */, + 24A200EB0F90D1DE003BB5A7 /* functions_vars_0x62.html */, + 24A200EC0F90D1DE003BB5A7 /* functions_vars_0x63.html */, + 24A200ED0F90D1DE003BB5A7 /* functions_vars_0x64.html */, + 24A200EE0F90D1DE003BB5A7 /* functions_vars_0x65.html */, + 24A200EF0F90D1DE003BB5A7 /* functions_vars_0x66.html */, + 24A200F00F90D1DE003BB5A7 /* functions_vars_0x67.html */, + 24A200F10F90D1DE003BB5A7 /* functions_vars_0x68.html */, + 24A200F20F90D1DE003BB5A7 /* functions_vars_0x69.html */, + 24A200F30F90D1DE003BB5A7 /* functions_vars_0x6b.html */, + 24A200F40F90D1DE003BB5A7 /* functions_vars_0x6c.html */, + 24A200F50F90D1DE003BB5A7 /* functions_vars_0x6d.html */, + 24A200F60F90D1DE003BB5A7 /* functions_vars_0x6e.html */, + 24A200F70F90D1DE003BB5A7 /* functions_vars_0x6f.html */, + 24A200F80F90D1DE003BB5A7 /* functions_vars_0x70.html */, + 24A200F90F90D1DE003BB5A7 /* functions_vars_0x72.html */, + 24A200FA0F90D1DE003BB5A7 /* functions_vars_0x73.html */, + 24A200FB0F90D1DE003BB5A7 /* functions_vars_0x74.html */, + 24A200FC0F90D1DE003BB5A7 /* functions_vars_0x75.html */, + 24A200FD0F90D1DE003BB5A7 /* functions_vars_0x76.html */, + 24A200FE0F90D1DE003BB5A7 /* functions_vars_0x77.html */, + 24A200FF0F90D1DE003BB5A7 /* functions_vars_0x78.html */, + 24A201000F90D1DE003BB5A7 /* functions_vars_0x79.html */, + 24A201010F90D1DE003BB5A7 /* functions_vars_0x7a.html */, + 24A201020F90D1DE003BB5A7 /* globals.html */, + 24A201030F90D1DE003BB5A7 /* globals_0x61.html */, + 24A201040F90D1DE003BB5A7 /* globals_0x62.html */, + 24A201050F90D1DE003BB5A7 /* globals_0x63.html */, + 24A201060F90D1DE003BB5A7 /* globals_0x65.html */, + 24A201070F90D1DE003BB5A7 /* globals_0x66.html */, + 24A201080F90D1DE003BB5A7 /* globals_0x67.html */, + 24A201090F90D1DE003BB5A7 /* globals_0x6b.html */, + 24A2010A0F90D1DE003BB5A7 /* globals_0x6d.html */, + 24A2010B0F90D1DE003BB5A7 /* globals_0x6e.html */, + 24A2010C0F90D1DE003BB5A7 /* globals_0x6f.html */, + 24A2010D0F90D1DE003BB5A7 /* globals_0x71.html */, + 24A2010E0F90D1DE003BB5A7 /* globals_0x72.html */, + 24A2010F0F90D1DE003BB5A7 /* globals_0x73.html */, + 24A201100F90D1DE003BB5A7 /* globals_0x74.html */, + 24A201110F90D1DE003BB5A7 /* globals_0x75.html */, + 24A201120F90D1DE003BB5A7 /* globals_0x76.html */, + 24A201130F90D1DE003BB5A7 /* globals_0x77.html */, + 24A201140F90D1DE003BB5A7 /* globals_defs.html */, + 24A201150F90D1DE003BB5A7 /* globals_enum.html */, + 24A201160F90D1DE003BB5A7 /* globals_eval.html */, + 24A201170F90D1DE003BB5A7 /* globals_type.html */, + 24A201180F90D1DE003BB5A7 /* globals_vars.html */, + 24A201190F90D1DE003BB5A7 /* hierarchy.html */, + 24A2011A0F90D1DE003BB5A7 /* index.html */, + 24A2011B0F90D1DE003BB5A7 /* intro.html */, + 24A2011C0F90D1DE003BB5A7 /* license.html */, + 24A2011D0F90D1DE003BB5A7 /* maceditor.html */, + 24A2011E0F90D1DE003BB5A7 /* main.html */, + 24A2011F0F90D1DE003BB5A7 /* others.html */, + 24A201200F90D1DE003BB5A7 /* pages.html */, + 24A201210F90D1DE003BB5A7 /* plugguieditor_8cpp.html */, + 24A201220F90D1DE003BB5A7 /* plugguieditor_8h.html */, + 24A201230F90D1DE003BB5A7 /* sequences.html */, + 24A201240F90D1DE003BB5A7 /* struct_c_color-members.html */, + 24A201250F90D1DE003BB5A7 /* struct_c_color.html */, + 24A201260F90D1DE003BB5A7 /* struct_c_point-members.html */, + 24A201270F90D1DE003BB5A7 /* struct_c_point.html */, + 24A201280F90D1DE003BB5A7 /* struct_c_rect-members.html */, + 24A201290F90D1DE003BB5A7 /* struct_c_rect.html */, + 24A2012A0F90D1DE003BB5A7 /* struct_e_rect-members.html */, + 24A2012B0F90D1DE003BB5A7 /* struct_e_rect.html */, + 24A2012C0F90D1DE003BB5A7 /* struct_vst_file_select-members.html */, + 24A2012D0F90D1DE003BB5A7 /* struct_vst_file_select.html */, + 24A2012E0F90D1DE003BB5A7 /* struct_vst_file_type-members.html */, + 24A2012F0F90D1DE003BB5A7 /* struct_vst_file_type.html */, + 24A201300F90D1DE003BB5A7 /* struct_vst_key_code-members.html */, + 24A201310F90D1DE003BB5A7 /* struct_vst_key_code.html */, + 24A201320F90D1DE003BB5A7 /* tab_b.gif */, + 24A201330F90D1DE003BB5A7 /* tab_l.gif */, + 24A201340F90D1DE003BB5A7 /* tab_r.gif */, + 24A201350F90D1DE003BB5A7 /* tabs.css */, + 24A201360F90D1DE003BB5A7 /* thanks.html */, + 24A201370F90D1DE003BB5A7 /* tree.html */, + 24A201380F90D1DE003BB5A7 /* vstcontrols_8cpp.html */, + 24A201390F90D1DE003BB5A7 /* vstcontrols_8h.html */, + 24A2013A0F90D1DE003BB5A7 /* vstgui_8cpp.html */, + 24A2013B0F90D1DE003BB5A7 /* vstgui_8h.html */, + 24A2013C0F90D1DE003BB5A7 /* vstkeycode_8h.html */, + 24A2013D0F90D1DE003BB5A7 /* vstoffline.html */, + 24A2013E0F90D1DE003BB5A7 /* vstparamstruct.html */, + 24A2013F0F90D1DE003BB5A7 /* vstplugscarbon_8h.html */, + 24A201400F90D1DE003BB5A7 /* vstplugsmac_8h.html */, + 24A201410F90D1DE003BB5A7 /* vstplugsmacho_8h.html */, + 24A201420F90D1DE003BB5A7 /* vstplugsquartz_8h.html */, + 24A201430F90D1DE003BB5A7 /* whatsnew.html */, + ); + name = html; + path = /vstsdk2.4/vstgui.sf/vstgui/Documentation/html; + sourceTree = ""; + }; + 24A203CE0F90D272003BB5A7 /* Products */ = { + isa = PBXGroup; + children = ( + 24A203D70F90D272003BB5A7 /* again.vst */, + 24A203D90F90D272003BB5A7 /* adelay.vst */, + 24A203DB0F90D272003BB5A7 /* vstxsynth.vst */, + 24A203DD0F90D272003BB5A7 /* surrounddelay.vst */, + 24A203DF0F90D272003BB5A7 /* minihost.app */, + ); + name = Products; + sourceTree = ""; + }; + 24A203E00F90D272003BB5A7 /* Products */ = { + isa = PBXGroup; + children = ( + 24A203E50F90D272003BB5A7 /* drawtest.component */, + 24A203E70F90D272003BB5A7 /* drawtest.vst */, + ); + name = Products; + sourceTree = ""; + }; + 24A203E80F90D272003BB5A7 /* Products */ = { + isa = PBXGroup; + children = ( + 24A203ED0F90D272003BB5A7 /* drawtest.component */, + 24A203EF0F90D272003BB5A7 /* drawtest.vst */, + ); + name = Products; + sourceTree = ""; + }; + 24A2FEBB0F90D1DB003BB5A7 /* vstsdk2.4 */ = { + isa = PBXGroup; + children = ( + 24A2FEBC0F90D1DC003BB5A7 /* artwork */, + 24A2FEC20F90D1DC003BB5A7 /* bin */, + 24A2FED80F90D1DC003BB5A7 /* doc */, + 24A2FF8E0F90D1DD003BB5A7 /* index.html */, + 24A2FF8F0F90D1DD003BB5A7 /* pluginterfaces */, + 24A2FF940F90D1DD003BB5A7 /* public.sdk */, + 24A2FFDE0F90D1DD003BB5A7 /* vstgui.sf */, + ); + name = vstsdk2.4; + path = /vstsdk2.4; + sourceTree = ""; + }; + 24A2FEBC0F90D1DC003BB5A7 /* artwork */ = { + isa = PBXGroup; + children = ( + 24A2FEBD0F90D1DC003BB5A7 /* Thumbs.db */, + 24A2FEBE0F90D1DC003BB5A7 /* VST_Logo_Usage_Guideline.pdf */, + 24A2FEBF0F90D1DC003BB5A7 /* VSTLogoAlpha.png */, + 24A2FEC00F90D1DC003BB5A7 /* VSTLogoBlack.jpg */, + 24A2FEC10F90D1DC003BB5A7 /* VSTLogoWhite.jpg */, + ); + name = artwork; + path = /vstsdk2.4/artwork; + sourceTree = ""; + }; + 24A2FEC20F90D1DC003BB5A7 /* bin */ = { + isa = PBXGroup; + children = ( + 24A2FEC30F90D1DC003BB5A7 /* mac */, + 24A2FED50F90D1DC003BB5A7 /* win */, + ); + name = bin; + path = /vstsdk2.4/bin; + sourceTree = ""; + }; + 24A2FEC30F90D1DC003BB5A7 /* mac */ = { + isa = PBXGroup; + children = ( + 24A2FEC40F90D1DC003BB5A7 /* VSTMonitor.vst */, + 24A2FED40F90D1DC003BB5A7 /* VSTParamTool.app */, + ); + name = mac; + path = /vstsdk2.4/bin/mac; + sourceTree = ""; + }; + 24A2FEC40F90D1DC003BB5A7 /* VSTMonitor.vst */ = { + isa = PBXGroup; + children = ( + 24A2FEC50F90D1DC003BB5A7 /* Contents */, + ); + name = VSTMonitor.vst; + path = /vstsdk2.4/bin/mac/VSTMonitor.vst; + sourceTree = ""; + }; + 24A2FEC50F90D1DC003BB5A7 /* Contents */ = { + isa = PBXGroup; + children = ( + 24A2FEC60F90D1DC003BB5A7 /* Info.plist */, + 24A2FEC70F90D1DC003BB5A7 /* MacOS */, + 24A2FEC90F90D1DC003BB5A7 /* PkgInfo */, + 24A2FECA0F90D1DC003BB5A7 /* Resources */, + ); + name = Contents; + path = /vstsdk2.4/bin/mac/VSTMonitor.vst/Contents; + sourceTree = ""; + }; + 24A2FEC70F90D1DC003BB5A7 /* MacOS */ = { + isa = PBXGroup; + children = ( + 24A2FEC80F90D1DC003BB5A7 /* VSTMonitor */, + ); + name = MacOS; + path = /vstsdk2.4/bin/mac/VSTMonitor.vst/Contents/MacOS; + sourceTree = ""; + }; + 24A2FECA0F90D1DC003BB5A7 /* Resources */ = { + isa = PBXGroup; + children = ( + 24A2FECB0F90D1DC003BB5A7 /* bmp50000.bmp */, + 24A2FECC0F90D1DC003BB5A7 /* bmp50001.bmp */, + 24A2FECD0F90D1DC003BB5A7 /* bmp50002.bmp */, + 24A2FECE0F90D1DC003BB5A7 /* bmp50003.bmp */, + 24A2FECF0F90D1DC003BB5A7 /* bmp50004.bmp */, + 24A2FED00F90D1DC003BB5A7 /* bmp50005.bmp */, + 24A2FED10F90D1DC003BB5A7 /* bmp50006.bmp */, + 24A2FED20F90D1DC003BB5A7 /* bmp50007.bmp */, + 24A2FED30F90D1DC003BB5A7 /* bmp50008.bmp */, + ); + name = Resources; + path = /vstsdk2.4/bin/mac/VSTMonitor.vst/Contents/Resources; + sourceTree = ""; + }; + 24A2FED50F90D1DC003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FED60F90D1DC003BB5A7 /* vstmonitor.dll */, + 24A2FED70F90D1DC003BB5A7 /* vstparamtool.exe */, + ); + name = win; + path = /vstsdk2.4/bin/win; + sourceTree = ""; + }; + 24A2FED80F90D1DC003BB5A7 /* doc */ = { + isa = PBXGroup; + children = ( + 24A2FED90F90D1DC003BB5A7 /* gfx */, + 24A2FEDE0F90D1DC003BB5A7 /* html */, + 24A2FF8A0F90D1DD003BB5A7 /* sdk.menu.html */, + 24A2FF8B0F90D1DD003BB5A7 /* sdk.overview.html */, + 24A2FF8C0F90D1DD003BB5A7 /* sdkdoc.css */, + 24A2FF8D0F90D1DD003BB5A7 /* VST Licensing Agreement.rtf */, + ); + name = doc; + path = /vstsdk2.4/doc; + sourceTree = ""; + }; + 24A2FED90F90D1DC003BB5A7 /* gfx */ = { + isa = PBXGroup; + children = ( + 24A2FEDA0F90D1DC003BB5A7 /* folder.gif */, + 24A2FEDB0F90D1DC003BB5A7 /* mac.gif */, + 24A2FEDC0F90D1DC003BB5A7 /* vstpluglogo_small.jpg */, + 24A2FEDD0F90D1DC003BB5A7 /* win.gif */, + ); + name = gfx; + path = /vstsdk2.4/doc/gfx; + sourceTree = ""; + }; + 24A2FEDE0F90D1DC003BB5A7 /* html */ = { + isa = PBXGroup; + children = ( + 24A2FEDF0F90D1DC003BB5A7 /* aeffect_8h.html */, + 24A2FEE00F90D1DC003BB5A7 /* aeffectx_8h.html */, + 24A2FEE10F90D1DC003BB5A7 /* aeffeditor_8h.html */, + 24A2FEE20F90D1DC003BB5A7 /* annotated.html */, + 24A2FEE30F90D1DC003BB5A7 /* audioeffect_8cpp.html */, + 24A2FEE40F90D1DC003BB5A7 /* audioeffect_8h.html */, + 24A2FEE50F90D1DC003BB5A7 /* audioeffectx_8cpp.html */, + 24A2FEE60F90D1DC003BB5A7 /* audioeffectx_8h.html */, + 24A2FEE70F90D1DC003BB5A7 /* Blocksizechange.gif */, + 24A2FEE80F90D1DC003BB5A7 /* class_a_eff_editor-members.html */, + 24A2FEE90F90D1DC003BB5A7 /* class_a_eff_editor.html */, + 24A2FEEA0F90D1DC003BB5A7 /* class_audio_effect-members.html */, + 24A2FEEB0F90D1DC003BB5A7 /* class_audio_effect.html */, + 24A2FEEC0F90D1DC003BB5A7 /* class_audio_effect.png */, + 24A2FEED0F90D1DC003BB5A7 /* class_audio_effect_x-members.html */, + 24A2FEEE0F90D1DC003BB5A7 /* class_audio_effect_x.html */, + 24A2FEEF0F90D1DC003BB5A7 /* class_audio_effect_x.png */, + 24A2FEF00F90D1DC003BB5A7 /* ControlChanged.gif */, + 24A2FEF10F90D1DC003BB5A7 /* deprecated.html */, + 24A2FEF20F90D1DC003BB5A7 /* dir_2d3252dd12c84c66c1d25b26bb45a1f5.html */, + 24A2FEF30F90D1DC003BB5A7 /* dir_77c628dfee72e555f82d5ef53b733f38.html */, + 24A2FEF40F90D1DC003BB5A7 /* dir_f81105d3b854bea570aaf3bae5cb64c1.html */, + 24A2FEF50F90D1DC003BB5A7 /* dir_fa0454ab79b4262333bf837ea3d765e9.html */, + 24A2FEF60F90D1DC003BB5A7 /* dirs.html */, + 24A2FEF70F90D1DC003BB5A7 /* doc_8h.html */, + 24A2FEF80F90D1DC003BB5A7 /* doxygen.css */, + 24A2FEF90F90D1DC003BB5A7 /* doxygen.png */, + 24A2FEFA0F90D1DC003BB5A7 /* files.html */, + 24A2FEFB0F90D1DC003BB5A7 /* ftv2blank.png */, + 24A2FEFC0F90D1DC003BB5A7 /* ftv2doc.png */, + 24A2FEFD0F90D1DC003BB5A7 /* ftv2folderclosed.png */, + 24A2FEFE0F90D1DC003BB5A7 /* ftv2folderopen.png */, + 24A2FEFF0F90D1DC003BB5A7 /* ftv2lastnode.png */, + 24A2FF000F90D1DC003BB5A7 /* ftv2link.png */, + 24A2FF010F90D1DC003BB5A7 /* ftv2mlastnode.png */, + 24A2FF020F90D1DC003BB5A7 /* ftv2mnode.png */, + 24A2FF030F90D1DC003BB5A7 /* ftv2node.png */, + 24A2FF040F90D1DC003BB5A7 /* ftv2plastnode.png */, + 24A2FF050F90D1DC003BB5A7 /* ftv2pnode.png */, + 24A2FF060F90D1DC003BB5A7 /* ftv2vertline.png */, + 24A2FF070F90D1DC003BB5A7 /* functions.html */, + 24A2FF080F90D1DC003BB5A7 /* functions_0x62.html */, + 24A2FF090F90D1DC003BB5A7 /* functions_0x63.html */, + 24A2FF0A0F90D1DC003BB5A7 /* functions_0x64.html */, + 24A2FF0B0F90D1DC003BB5A7 /* functions_0x65.html */, + 24A2FF0C0F90D1DC003BB5A7 /* functions_0x66.html */, + 24A2FF0D0F90D1DC003BB5A7 /* functions_0x67.html */, + 24A2FF0E0F90D1DC003BB5A7 /* functions_0x68.html */, + 24A2FF0F0F90D1DC003BB5A7 /* functions_0x69.html */, + 24A2FF100F90D1DC003BB5A7 /* functions_0x6b.html */, + 24A2FF110F90D1DC003BB5A7 /* functions_0x6c.html */, + 24A2FF120F90D1DC003BB5A7 /* functions_0x6d.html */, + 24A2FF130F90D1DC003BB5A7 /* functions_0x6e.html */, + 24A2FF140F90D1DC003BB5A7 /* functions_0x6f.html */, + 24A2FF150F90D1DC003BB5A7 /* functions_0x70.html */, + 24A2FF160F90D1DC003BB5A7 /* functions_0x72.html */, + 24A2FF170F90D1DC003BB5A7 /* functions_0x73.html */, + 24A2FF180F90D1DC003BB5A7 /* functions_0x74.html */, + 24A2FF190F90D1DC003BB5A7 /* functions_0x75.html */, + 24A2FF1A0F90D1DC003BB5A7 /* functions_0x76.html */, + 24A2FF1B0F90D1DC003BB5A7 /* functions_0x77.html */, + 24A2FF1C0F90D1DC003BB5A7 /* functions_0x78.html */, + 24A2FF1D0F90D1DC003BB5A7 /* functions_0x79.html */, + 24A2FF1E0F90D1DC003BB5A7 /* functions_0x7e.html */, + 24A2FF1F0F90D1DC003BB5A7 /* functions_func.html */, + 24A2FF200F90D1DC003BB5A7 /* functions_vars.html */, + 24A2FF210F90D1DC003BB5A7 /* globals.html */, + 24A2FF220F90D1DC003BB5A7 /* globals_0x62.html */, + 24A2FF230F90D1DC003BB5A7 /* globals_0x63.html */, + 24A2FF240F90D1DC003BB5A7 /* globals_0x64.html */, + 24A2FF250F90D1DC003BB5A7 /* globals_0x65.html */, + 24A2FF260F90D1DC003BB5A7 /* globals_0x66.html */, + 24A2FF270F90D1DC003BB5A7 /* globals_0x6b.html */, + 24A2FF280F90D1DC003BB5A7 /* globals_0x6d.html */, + 24A2FF290F90D1DC003BB5A7 /* globals_0x74.html */, + 24A2FF2A0F90D1DC003BB5A7 /* globals_0x76.html */, + 24A2FF2B0F90D1DC003BB5A7 /* globals_defs.html */, + 24A2FF2C0F90D1DC003BB5A7 /* globals_enum.html */, + 24A2FF2D0F90D1DC003BB5A7 /* globals_eval.html */, + 24A2FF2E0F90D1DC003BB5A7 /* globals_eval_0x65.html */, + 24A2FF2F0F90D1DC003BB5A7 /* globals_eval_0x6b.html */, + 24A2FF300F90D1DC003BB5A7 /* globals_eval_0x6d.html */, + 24A2FF310F90D1DC003BB5A7 /* globals_eval_0x76.html */, + 24A2FF320F90D1DC003BB5A7 /* globals_func.html */, + 24A2FF330F90D1DC003BB5A7 /* globals_type.html */, + 24A2FF340F90D1DC003BB5A7 /* globals_vars.html */, + 24A2FF350F90D1DC003BB5A7 /* hierarchy.html */, + 24A2FF360F90D1DC003BB5A7 /* history.html */, + 24A2FF370F90D1DC003BB5A7 /* index.html */, + 24A2FF380F90D1DC003BB5A7 /* Initialisation.gif */, + 24A2FF390F90D1DC003BB5A7 /* intro.html */, + 24A2FF3A0F90D1DC003BB5A7 /* IOchange.gif */, + 24A2FF3B0F90D1DC003BB5A7 /* license.html */, + 24A2FF3C0F90D1DC003BB5A7 /* maceditor.html */, + 24A2FF3D0F90D1DC003BB5A7 /* main.html */, + 24A2FF3E0F90D1DC003BB5A7 /* namespace_host_can_dos.html */, + 24A2FF3F0F90D1DC003BB5A7 /* namespace_plug_can_dos.html */, + 24A2FF400F90D1DC003BB5A7 /* namespacemembers.html */, + 24A2FF410F90D1DC003BB5A7 /* namespacemembers_vars.html */, + 24A2FF420F90D1DC003BB5A7 /* namespaces.html */, + 24A2FF430F90D1DC003BB5A7 /* Offlineprocessing.gif */, + 24A2FF440F90D1DC003BB5A7 /* others.html */, + 24A2FF450F90D1DC003BB5A7 /* pages.html */, + 24A2FF460F90D1DC003BB5A7 /* Sampleratechange.gif */, + 24A2FF470F90D1DC003BB5A7 /* sequences.html */, + 24A2FF480F90D1DC003BB5A7 /* SpeakerarrangementnegotiationforVSTfx.gif */, + 24A2FF490F90D1DC003BB5A7 /* struct_a_effect-members.html */, + 24A2FF4A0F90D1DC003BB5A7 /* struct_a_effect.html */, + 24A2FF4B0F90D1DC003BB5A7 /* struct_e_rect-members.html */, + 24A2FF4C0F90D1DC003BB5A7 /* struct_e_rect.html */, + 24A2FF4D0F90D1DC003BB5A7 /* struct_midi_key_name-members.html */, + 24A2FF4E0F90D1DC003BB5A7 /* struct_midi_key_name.html */, + 24A2FF4F0F90D1DC003BB5A7 /* struct_midi_program_category-members.html */, + 24A2FF500F90D1DC003BB5A7 /* struct_midi_program_category.html */, + 24A2FF510F90D1DC003BB5A7 /* struct_midi_program_name-members.html */, + 24A2FF520F90D1DC003BB5A7 /* struct_midi_program_name.html */, + 24A2FF530F90D1DC003BB5A7 /* struct_vst_audio_file-members.html */, + 24A2FF540F90D1DC003BB5A7 /* struct_vst_audio_file.html */, + 24A2FF550F90D1DC003BB5A7 /* struct_vst_audio_file_marker-members.html */, + 24A2FF560F90D1DC003BB5A7 /* struct_vst_audio_file_marker.html */, + 24A2FF570F90D1DC003BB5A7 /* struct_vst_event-members.html */, + 24A2FF580F90D1DC003BB5A7 /* struct_vst_event.html */, + 24A2FF590F90D1DD003BB5A7 /* struct_vst_events-members.html */, + 24A2FF5A0F90D1DD003BB5A7 /* struct_vst_events.html */, + 24A2FF5B0F90D1DD003BB5A7 /* struct_vst_file_select-members.html */, + 24A2FF5C0F90D1DD003BB5A7 /* struct_vst_file_select.html */, + 24A2FF5D0F90D1DD003BB5A7 /* struct_vst_file_type-members.html */, + 24A2FF5E0F90D1DD003BB5A7 /* struct_vst_file_type.html */, + 24A2FF5F0F90D1DD003BB5A7 /* struct_vst_key_code-members.html */, + 24A2FF600F90D1DD003BB5A7 /* struct_vst_key_code.html */, + 24A2FF610F90D1DD003BB5A7 /* struct_vst_midi_event-members.html */, + 24A2FF620F90D1DD003BB5A7 /* struct_vst_midi_event.html */, + 24A2FF630F90D1DD003BB5A7 /* struct_vst_midi_sysex_event-members.html */, + 24A2FF640F90D1DD003BB5A7 /* struct_vst_midi_sysex_event.html */, + 24A2FF650F90D1DD003BB5A7 /* struct_vst_offline_task-members.html */, + 24A2FF660F90D1DD003BB5A7 /* struct_vst_offline_task.html */, + 24A2FF670F90D1DD003BB5A7 /* struct_vst_parameter_properties-members.html */, + 24A2FF680F90D1DD003BB5A7 /* struct_vst_parameter_properties.html */, + 24A2FF690F90D1DD003BB5A7 /* struct_vst_patch_chunk_info-members.html */, + 24A2FF6A0F90D1DD003BB5A7 /* struct_vst_patch_chunk_info.html */, + 24A2FF6B0F90D1DD003BB5A7 /* struct_vst_pin_properties-members.html */, + 24A2FF6C0F90D1DD003BB5A7 /* struct_vst_pin_properties.html */, + 24A2FF6D0F90D1DD003BB5A7 /* struct_vst_speaker_arrangement-members.html */, + 24A2FF6E0F90D1DD003BB5A7 /* struct_vst_speaker_arrangement.html */, + 24A2FF6F0F90D1DD003BB5A7 /* struct_vst_speaker_properties-members.html */, + 24A2FF700F90D1DD003BB5A7 /* struct_vst_speaker_properties.html */, + 24A2FF710F90D1DD003BB5A7 /* struct_vst_time_info-members.html */, + 24A2FF720F90D1DD003BB5A7 /* struct_vst_time_info.html */, + 24A2FF730F90D1DD003BB5A7 /* struct_vst_variable_io-members.html */, + 24A2FF740F90D1DD003BB5A7 /* struct_vst_variable_io.html */, + 24A2FF750F90D1DD003BB5A7 /* struct_vst_window-members.html */, + 24A2FF760F90D1DD003BB5A7 /* struct_vst_window.html */, + 24A2FF770F90D1DD003BB5A7 /* structfx_bank-members.html */, + 24A2FF780F90D1DD003BB5A7 /* structfx_bank.html */, + 24A2FF790F90D1DD003BB5A7 /* structfx_program-members.html */, + 24A2FF7A0F90D1DD003BB5A7 /* structfx_program.html */, + 24A2FF7B0F90D1DD003BB5A7 /* tab_b.gif */, + 24A2FF7C0F90D1DD003BB5A7 /* tab_l.gif */, + 24A2FF7D0F90D1DD003BB5A7 /* tab_r.gif */, + 24A2FF7E0F90D1DD003BB5A7 /* tabs.css */, + 24A2FF7F0F90D1DD003BB5A7 /* Termination.gif */, + 24A2FF800F90D1DD003BB5A7 /* thanks.html */, + 24A2FF810F90D1DD003BB5A7 /* tree.html */, + 24A2FF820F90D1DD003BB5A7 /* TurnOff.gif */, + 24A2FF830F90D1DD003BB5A7 /* TurnOn.gif */, + 24A2FF840F90D1DD003BB5A7 /* vstfxstore_8h.html */, + 24A2FF850F90D1DD003BB5A7 /* vstoffline.html */, + 24A2FF860F90D1DD003BB5A7 /* vstparamstruct.html */, + 24A2FF870F90D1DD003BB5A7 /* vstpluglogo.jpg */, + 24A2FF880F90D1DD003BB5A7 /* vstplugmain_8cpp.html */, + 24A2FF890F90D1DD003BB5A7 /* whatsnew.html */, + ); + name = html; + path = /vstsdk2.4/doc/html; + sourceTree = ""; + }; + 24A2FF8F0F90D1DD003BB5A7 /* pluginterfaces */ = { + isa = PBXGroup; + children = ( + 24A2FF900F90D1DD003BB5A7 /* vst2.x */, + ); + name = pluginterfaces; + path = /vstsdk2.4/pluginterfaces; + sourceTree = ""; + }; + 24A2FF900F90D1DD003BB5A7 /* vst2.x */ = { + isa = PBXGroup; + children = ( + 24A2FF910F90D1DD003BB5A7 /* aeffect.h */, + 24A2FF920F90D1DD003BB5A7 /* aeffectx.h */, + 24A2FF930F90D1DD003BB5A7 /* vstfxstore.h */, + ); + name = vst2.x; + path = /vstsdk2.4/pluginterfaces/vst2.x; + sourceTree = ""; + }; + 24A2FF940F90D1DD003BB5A7 /* public.sdk */ = { + isa = PBXGroup; + children = ( + 24A2FF950F90D1DD003BB5A7 /* samples */, + 24A2FFD60F90D1DD003BB5A7 /* source */, + ); + name = public.sdk; + path = /vstsdk2.4/public.sdk; + sourceTree = ""; + }; + 24A2FF950F90D1DD003BB5A7 /* samples */ = { + isa = PBXGroup; + children = ( + 24A2FF960F90D1DD003BB5A7 /* vst2.x */, + ); + name = samples; + path = /vstsdk2.4/public.sdk/samples; + sourceTree = ""; + }; + 24A2FF960F90D1DD003BB5A7 /* vst2.x */ = { + isa = PBXGroup; + children = ( + 24A2FF970F90D1DD003BB5A7 /* adelay */, + 24A2FFA80F90D1DD003BB5A7 /* again */, + 24A2FFAE0F90D1DD003BB5A7 /* mac */, + 24A2FFB40F90D1DD003BB5A7 /* minihost */, + 24A2FFBA0F90D1DD003BB5A7 /* vstxsynth */, + 24A2FFC50F90D1DD003BB5A7 /* win */, + 24A2FFC80F90D1DD003BB5A7 /* win.vc2003 */, + 24A2FFCF0F90D1DD003BB5A7 /* win.vc6 */, + ); + name = vst2.x; + path = /vstsdk2.4/public.sdk/samples/vst2.x; + sourceTree = ""; + }; + 24A2FF970F90D1DD003BB5A7 /* adelay */ = { + isa = PBXGroup; + children = ( + 24A2FF980F90D1DD003BB5A7 /* adelay.cpp */, + 24A2FF990F90D1DD003BB5A7 /* adelay.h */, + 24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */, + 24A2FF9B0F90D1DD003BB5A7 /* editor */, + 24A2FFA30F90D1DD003BB5A7 /* surrounddelay.cpp */, + 24A2FFA40F90D1DD003BB5A7 /* surrounddelay.h */, + 24A2FFA50F90D1DD003BB5A7 /* win */, + ); + name = adelay; + path = /vstsdk2.4/public.sdk/samples/vst2.x/adelay; + sourceTree = ""; + }; + 24A2FF9B0F90D1DD003BB5A7 /* editor */ = { + isa = PBXGroup; + children = ( + 24A2FF9C0F90D1DD003BB5A7 /* resources */, + 24A2FFA10F90D1DD003BB5A7 /* sdeditor.cpp */, + 24A2FFA20F90D1DD003BB5A7 /* sdeditor.h */, + ); + name = editor; + path = /vstsdk2.4/public.sdk/samples/vst2.x/adelay/editor; + sourceTree = ""; + }; + 24A2FF9C0F90D1DD003BB5A7 /* resources */ = { + isa = PBXGroup; + children = ( + 24A2FF9D0F90D1DD003BB5A7 /* bmp00128.bmp */, + 24A2FF9E0F90D1DD003BB5A7 /* bmp00129.bmp */, + 24A2FF9F0F90D1DD003BB5A7 /* bmp00130.bmp */, + 24A2FFA00F90D1DD003BB5A7 /* surrounddelay.rc */, + ); + name = resources; + path = /vstsdk2.4/public.sdk/samples/vst2.x/adelay/editor/resources; + sourceTree = ""; + }; + 24A2FFA50F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FFA60F90D1DD003BB5A7 /* adelay.vcproj */, + 24A2FFA70F90D1DD003BB5A7 /* surrounddelay.vcproj */, + ); + name = win; + path = /vstsdk2.4/public.sdk/samples/vst2.x/adelay/win; + sourceTree = ""; + }; + 24A2FFA80F90D1DD003BB5A7 /* again */ = { + isa = PBXGroup; + children = ( + 24A2FFA90F90D1DD003BB5A7 /* source */, + 24A2FFAC0F90D1DD003BB5A7 /* win */, + ); + name = again; + path = /vstsdk2.4/public.sdk/samples/vst2.x/again; + sourceTree = ""; + }; + 24A2FFA90F90D1DD003BB5A7 /* source */ = { + isa = PBXGroup; + children = ( + 24A2FFAA0F90D1DD003BB5A7 /* again.cpp */, + 24A2FFAB0F90D1DD003BB5A7 /* again.h */, + ); + name = source; + path = /vstsdk2.4/public.sdk/samples/vst2.x/again/source; + sourceTree = ""; + }; + 24A2FFAC0F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FFAD0F90D1DD003BB5A7 /* again.vcproj */, + ); + name = win; + path = /vstsdk2.4/public.sdk/samples/vst2.x/again/win; + sourceTree = ""; + }; + 24A2FFAE0F90D1DD003BB5A7 /* mac */ = { + isa = PBXGroup; + children = ( + 24A2FFAF0F90D1DD003BB5A7 /* minihost-Info.plist */, + 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */, + 24A2FFB30F90D1DD003BB5A7 /* vst2.4Info.plist */, + ); + name = mac; + path = /vstsdk2.4/public.sdk/samples/vst2.x/mac; + sourceTree = ""; + }; + 24A2FFB40F90D1DD003BB5A7 /* minihost */ = { + isa = PBXGroup; + children = ( + 24A2FFB50F90D1DD003BB5A7 /* source */, + 24A2FFB80F90D1DD003BB5A7 /* win */, + ); + name = minihost; + path = /vstsdk2.4/public.sdk/samples/vst2.x/minihost; + sourceTree = ""; + }; + 24A2FFB50F90D1DD003BB5A7 /* source */ = { + isa = PBXGroup; + children = ( + 24A2FFB60F90D1DD003BB5A7 /* minieditor.cpp */, + 24A2FFB70F90D1DD003BB5A7 /* minihost.cpp */, + ); + name = source; + path = /vstsdk2.4/public.sdk/samples/vst2.x/minihost/source; + sourceTree = ""; + }; + 24A2FFB80F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FFB90F90D1DD003BB5A7 /* minihost.vcproj */, + ); + name = win; + path = /vstsdk2.4/public.sdk/samples/vst2.x/minihost/win; + sourceTree = ""; + }; + 24A2FFBA0F90D1DD003BB5A7 /* vstxsynth */ = { + isa = PBXGroup; + children = ( + 24A2FFBB0F90D1DD003BB5A7 /* resource */, + 24A2FFBE0F90D1DD003BB5A7 /* source */, + 24A2FFC30F90D1DD003BB5A7 /* win */, + ); + name = vstxsynth; + path = /vstsdk2.4/public.sdk/samples/vst2.x/vstxsynth; + sourceTree = ""; + }; + 24A2FFBB0F90D1DD003BB5A7 /* resource */ = { + isa = PBXGroup; + children = ( + 24A2FFBC0F90D1DD003BB5A7 /* vstxsynth.rc */, + 24A2FFBD0F90D1DD003BB5A7 /* vstxsynth.vstxml */, + ); + name = resource; + path = /vstsdk2.4/public.sdk/samples/vst2.x/vstxsynth/resource; + sourceTree = ""; + }; + 24A2FFBE0F90D1DD003BB5A7 /* source */ = { + isa = PBXGroup; + children = ( + 24A2FFBF0F90D1DD003BB5A7 /* gmnames.h */, + 24A2FFC00F90D1DD003BB5A7 /* vstxsynth.cpp */, + 24A2FFC10F90D1DD003BB5A7 /* vstxsynth.h */, + 24A2FFC20F90D1DD003BB5A7 /* vstxsynthproc.cpp */, + ); + name = source; + path = /vstsdk2.4/public.sdk/samples/vst2.x/vstxsynth/source; + sourceTree = ""; + }; + 24A2FFC30F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FFC40F90D1DD003BB5A7 /* vstxsynth.vcproj */, + ); + name = win; + path = /vstsdk2.4/public.sdk/samples/vst2.x/vstxsynth/win; + sourceTree = ""; + }; + 24A2FFC50F90D1DD003BB5A7 /* win */ = { + isa = PBXGroup; + children = ( + 24A2FFC60F90D1DD003BB5A7 /* samples.sln */, + 24A2FFC70F90D1DD003BB5A7 /* vstplug.def */, + ); + name = win; + path = /vstsdk2.4/public.sdk/samples/vst2.x/win; + sourceTree = ""; + }; + 24A2FFC80F90D1DD003BB5A7 /* win.vc2003 */ = { + isa = PBXGroup; + children = ( + 24A2FFC90F90D1DD003BB5A7 /* adelay.vcproj */, + 24A2FFCA0F90D1DD003BB5A7 /* again.vcproj */, + 24A2FFCB0F90D1DD003BB5A7 /* minihost.vcproj */, + 24A2FFCC0F90D1DD003BB5A7 /* samples.sln */, + 24A2FFCD0F90D1DD003BB5A7 /* surrounddelay.vcproj */, + 24A2FFCE0F90D1DD003BB5A7 /* vstxsynth.vcproj */, + ); + name = win.vc2003; + path = /vstsdk2.4/public.sdk/samples/vst2.x/win.vc2003; + sourceTree = ""; + }; + 24A2FFCF0F90D1DD003BB5A7 /* win.vc6 */ = { + isa = PBXGroup; + children = ( + 24A2FFD00F90D1DD003BB5A7 /* adelay.dsp */, + 24A2FFD10F90D1DD003BB5A7 /* again.dsp */, + 24A2FFD20F90D1DD003BB5A7 /* minihost.dsp */, + 24A2FFD30F90D1DD003BB5A7 /* samples.dsw */, + 24A2FFD40F90D1DD003BB5A7 /* surrounddelay.dsp */, + 24A2FFD50F90D1DD003BB5A7 /* vstxsynth.dsp */, + ); + name = win.vc6; + path = /vstsdk2.4/public.sdk/samples/vst2.x/win.vc6; + sourceTree = ""; + }; + 24A2FFD60F90D1DD003BB5A7 /* source */ = { + isa = PBXGroup; + children = ( + 24A2FFD70F90D1DD003BB5A7 /* vst2.x */, + ); + name = source; + path = /vstsdk2.4/public.sdk/source; + sourceTree = ""; + }; + 24A2FFD70F90D1DD003BB5A7 /* vst2.x */ = { + isa = PBXGroup; + children = ( + 24A2FFD80F90D1DD003BB5A7 /* aeffeditor.h */, + 24A2FFD90F90D1DD003BB5A7 /* audioeffect.cpp */, + 24A2FFDA0F90D1DD003BB5A7 /* audioeffect.h */, + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */, + 24A2FFDC0F90D1DD003BB5A7 /* audioeffectx.h */, + 24A2FFDD0F90D1DD003BB5A7 /* vstplugmain.cpp */, + ); + name = vst2.x; + path = /vstsdk2.4/public.sdk/source/vst2.x; + sourceTree = ""; + }; + 24A2FFDE0F90D1DD003BB5A7 /* vstgui.sf */ = { + isa = PBXGroup; + children = ( + 24A2FFDF0F90D1DD003BB5A7 /* drawtest */, + 24A200160F90D1DD003BB5A7 /* vstgui */, + ); + name = vstgui.sf; + path = /vstsdk2.4/vstgui.sf; + sourceTree = ""; + }; + 24A2FFDF0F90D1DD003BB5A7 /* drawtest */ = { + isa = PBXGroup; + children = ( + 24A2FFE00F90D1DD003BB5A7 /* mac */, + 24A2FFEE0F90D1DD003BB5A7 /* resources */, + 24A200030F90D1DD003BB5A7 /* source */, + 24A2000F0F90D1DD003BB5A7 /* win */, + 24A200130F90D1DD003BB5A7 /* win.vc6 */, + ); + name = drawtest; + path = /vstsdk2.4/vstgui.sf/drawtest; + sourceTree = ""; + }; + 24A2FFE00F90D1DD003BB5A7 /* mac */ = { + isa = PBXGroup; + children = ( + 24A2FFE10F90D1DD003BB5A7 /* audiounit.exp */, + 24A2FFE20F90D1DD003BB5A7 /* cw_vst_prefix.pch++ */, + 24A2FFE30F90D1DD003BB5A7 /* drawtest.cw9prj */, + 24A2FFE40F90D1DD003BB5A7 /* drawtest.plc */, + 24A2FFE50F90D1DD003BB5A7 /* drawtest.xcode */, + 24A2FFE80F90D1DD003BB5A7 /* drawtest.xcodeproj */, + 24A2FFEB0F90D1DD003BB5A7 /* Info.plist */, + 24A2FFEC0F90D1DD003BB5A7 /* xcode_au_prefix.h */, + 24A2FFED0F90D1DD003BB5A7 /* xcode_vst_prefix.h */, + ); + name = mac; + path = /vstsdk2.4/vstgui.sf/drawtest/mac; + sourceTree = ""; + }; + 24A2FFEE0F90D1DD003BB5A7 /* resources */ = { + isa = PBXGroup; + children = ( + 24A2FFEF0F90D1DD003BB5A7 /* audiounit.r */, + 24A2FFF00F90D1DD003BB5A7 /* bmp00001.png */, + 24A2FFF10F90D1DD003BB5A7 /* bmp00100.png */, + 24A2FFF20F90D1DD003BB5A7 /* bmp01000.png */, + 24A2FFF30F90D1DD003BB5A7 /* bmp10001.bmp */, + 24A2FFF40F90D1DD003BB5A7 /* bmp10002.bmp */, + 24A2FFF50F90D1DD003BB5A7 /* bmp10003.bmp */, + 24A2FFF60F90D1DD003BB5A7 /* bmp10004.bmp */, + 24A2FFF70F90D1DD003BB5A7 /* bmp10005.bmp */, + 24A2FFF80F90D1DD003BB5A7 /* bmp10006.bmp */, + 24A2FFF90F90D1DD003BB5A7 /* bmp10007.bmp */, + 24A2FFFA0F90D1DD003BB5A7 /* bmp10008.bmp */, + 24A2FFFB0F90D1DD003BB5A7 /* bmp10009.bmp */, + 24A2FFFC0F90D1DD003BB5A7 /* bmp10010.bmp */, + 24A2FFFD0F90D1DD003BB5A7 /* bmp10011.bmp */, + 24A2FFFE0F90D1DD003BB5A7 /* bmp10012.bmp */, + 24A2FFFF0F90D1DD003BB5A7 /* bmp10013.bmp */, + 24A200000F90D1DD003BB5A7 /* bmp10014.bmp */, + 24A200010F90D1DD003BB5A7 /* bmp10015.bmp */, + 24A200020F90D1DD003BB5A7 /* bmp10016.bmp */, + ); + name = resources; + path = /vstsdk2.4/vstgui.sf/drawtest/resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D01CCC70486CAD60068D4B7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 245463B90991757100464AD3 /* Dynamics3.h in Headers */, + 24D8287F09A9164A0093AEF8 /* xcode_vst_prefix.h in Headers */, + 24A202190F90D1DE003BB5A7 /* aeffect.h in Headers */, + 24A2021A0F90D1DE003BB5A7 /* aeffectx.h in Headers */, + 24A2021B0F90D1DE003BB5A7 /* vstfxstore.h in Headers */, + 24A2021D0F90D1DE003BB5A7 /* adelay.h in Headers */, + 24A202240F90D1DE003BB5A7 /* sdeditor.h in Headers */, + 24A202260F90D1DE003BB5A7 /* surrounddelay.h in Headers */, + 24A2022A0F90D1DE003BB5A7 /* again.h in Headers */, + 24A202330F90D1DE003BB5A7 /* gmnames.h in Headers */, + 24A202350F90D1DE003BB5A7 /* vstxsynth.h in Headers */, + 24A202460F90D1DE003BB5A7 /* aeffeditor.h in Headers */, + 24A202480F90D1DE003BB5A7 /* audioeffect.h in Headers */, + 24A2024A0F90D1DE003BB5A7 /* audioeffectx.h in Headers */, + 24A2024D0F90D1DE003BB5A7 /* cw_vst_prefix.pch++ in Headers */, + 24A202510F90D1DE003BB5A7 /* xcode_au_prefix.h in Headers */, + 24A202520F90D1DE003BB5A7 /* xcode_vst_prefix.h in Headers */, + 24A202680F90D1DE003BB5A7 /* controlsgui.h in Headers */, + 24A2026A0F90D1DE003BB5A7 /* pdrawtesteditor.h in Headers */, + 24A2026C0F90D1DE003BB5A7 /* pdrawtesteffect.h in Headers */, + 24A2026F0F90D1DE003BB5A7 /* pdrawtestview.h in Headers */, + 24A202710F90D1DE003BB5A7 /* pprimitivesviews.h in Headers */, + 24A202780F90D1DE003BB5A7 /* aeffguieditor.h in Headers */, + 24A2027A0F90D1DE003BB5A7 /* cfileselector.h in Headers */, + 24A2027D0F90D1DE003BB5A7 /* cscrollview.h in Headers */, + 24A2027F0F90D1DE003BB5A7 /* ctabview.h in Headers */, + 24A203A50F90D1DE003BB5A7 /* plugguieditor.h in Headers */, + 24A203A70F90D1DE003BB5A7 /* vstcontrols.h in Headers */, + 24A203A90F90D1DE003BB5A7 /* vstgui.h in Headers */, + 24A203AA0F90D1DE003BB5A7 /* vstkeycode.h in Headers */, + 24A203AB0F90D1DE003BB5A7 /* vstplugscarbon.h in Headers */, + 24A203AC0F90D1DE003BB5A7 /* vstplugsmac.h in Headers */, + 24A203AD0F90D1DE003BB5A7 /* vstplugsmacho.h in Headers */, + 24A203AE0F90D1DE003BB5A7 /* vstplugsquartz.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24BEAAED08919AE700E695F9 /* Build configuration list for PBXNativeTarget "Dynamics3" */; + buildPhases = ( + 8D01CCC70486CAD60068D4B7 /* Headers */, + 8D01CCC90486CAD60068D4B7 /* Resources */, + 8D01CCCB0486CAD60068D4B7 /* Sources */, + 8D01CCCF0486CAD60068D4B7 /* Rez */, + 24CFB70807E7A07C0081BD57 /* Copy PkgInfo */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Dynamics3; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = "FM-Chopper"; + productReference = 2407DE920899296600EB68BF /* Dynamics3.vst */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 24BEAAF108919AE700E695F9 /* Build configuration list for PBXProject "Dynamics3" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* FM-Chopper */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 24A203E00F90D272003BB5A7 /* Products */; + ProjectRef = 24A2FFE50F90D1DD003BB5A7 /* drawtest.xcode */; + }, + { + ProductGroup = 24A203E80F90D272003BB5A7 /* Products */; + ProjectRef = 24A2FFE80F90D1DD003BB5A7 /* drawtest.xcodeproj */; + }, + { + ProductGroup = 24A203CE0F90D272003BB5A7 /* Products */; + ProjectRef = 24A2FFB00F90D1DD003BB5A7 /* vst 2.4 examples.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D01CCC60486CAD60068D4B7 /* Dynamics3 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 24A203D70F90D272003BB5A7 /* again.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = again.vst; + remoteRef = 24A203D60F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203D90F90D272003BB5A7 /* adelay.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = adelay.vst; + remoteRef = 24A203D80F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203DB0F90D272003BB5A7 /* vstxsynth.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = vstxsynth.vst; + remoteRef = 24A203DA0F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203DD0F90D272003BB5A7 /* surrounddelay.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = surrounddelay.vst; + remoteRef = 24A203DC0F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203DF0F90D272003BB5A7 /* minihost.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = minihost.app; + remoteRef = 24A203DE0F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203E50F90D272003BB5A7 /* drawtest.component */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = drawtest.component; + remoteRef = 24A203E40F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203E70F90D272003BB5A7 /* drawtest.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = drawtest.vst; + remoteRef = 24A203E60F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203ED0F90D272003BB5A7 /* drawtest.component */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = drawtest.component; + remoteRef = 24A203EC0F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 24A203EF0F90D272003BB5A7 /* drawtest.vst */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = drawtest.vst; + remoteRef = 24A203EE0F90D272003BB5A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D01CCC90486CAD60068D4B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24CFB70407E7A0220081BD57 /* PkgInfo in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D01CCCF0486CAD60068D4B7 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 24CFB70807E7A07C0081BD57 /* Copy PkgInfo */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy PkgInfo"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "cp mac/PkgInfo \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.vst/Contents/\""; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D01CCCB0486CAD60068D4B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2407DEB9089929BA00EB68BF /* Dynamics3.cpp in Sources */, + 24D8287009A914000093AEF8 /* Dynamics3Proc.cpp in Sources */, + 24A203CB0F90D251003BB5A7 /* audioeffect.cpp in Sources */, + 24A203CC0F90D251003BB5A7 /* audioeffectx.cpp in Sources */, + 24A203CD0F90D251003BB5A7 /* vstplugmain.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 24BEAAEE08919AE700E695F9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = "/vstsdk2.4/**"; + INFOPLIST_FILE = ./mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Gain; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = vst; + }; + name = Debug; + }; + 24BEAAEF08919AE700E695F9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + x86_64, + ); + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = "/vstsdk2.4/**"; + INFOPLIST_FILE = ./mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.4; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Dynamics3; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + SECTORDER_FLAGS = ""; + SKIP_INSTALL = NO; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = all; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = vst; + }; + name = Release; + }; + 24BEAAF208919AE700E695F9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + INFOPLIST_FILE = ""; + INFOPLIST_PREPROCESS = NO; + }; + name = Debug; + }; + 24BEAAF308919AE700E695F9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = s; + INFOPLIST_FILE = ""; + INFOPLIST_PREPROCESS = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 24BEAAED08919AE700E695F9 /* Build configuration list for PBXNativeTarget "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24BEAAEE08919AE700E695F9 /* Debug */, + 24BEAAEF08919AE700E695F9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 24BEAAF108919AE700E695F9 /* Build configuration list for PBXProject "Dynamics3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24BEAAF208919AE700E695F9 /* Debug */, + 24BEAAF308919AE700E695F9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 000000000..a80c03824 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100755 index 0000000000000000000000000000000000000000..5c38f9460675438b0fec50998b84b4a658168d63 GIT binary patch literal 12075 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 literal 0 HcmV?d00001 diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/project.xcworkspace/xcuserdata/spiadmin.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100755 index 0000000000000000000000000000000000000000..314de0ff8716f1de186bd9e12b891393458717e5 GIT binary patch literal 10373 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 Ee-@_#ZU6uP literal 0 HcmV?d00001 diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 new file mode 100755 index 000000000..c5723261d --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.mode1v3 @@ -0,0 +1,1372 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Xcode3/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 91857D9F148EF61800AAA11B + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 089C1671FE841209C02AAC07 + 19C28FB4FE9D528D11CA2CBB + 089C167CFE841241C02AAC07 + 08FB77ADFE841716C02AAC07 + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 11 + 10 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 693}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 711}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + Gain.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + Gain.cpp + _historyCapacity + 0 + bookmark + 911C2A9D1491A5F600A430AF + history + + 915DCCBB1491A5B8008574E6 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {1053, 508}} + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + PBXNavigatorGroup + Proportion + 508pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 513}, {1053, 198}} + RubberWindowFrame + 286 197 1261 752 0 0 1680 1028 + + Module + XCDetailModule + Proportion + 198pt + + + Proportion + 1053pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 911C2A901491A5F600A430AF + 1CE0B1FE06471DED0097A5F4 + 911C2A911491A5F600A430AF + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Xcode3/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 91857DA0148EF61800AAA11B + /Users/spiadmin/Documents/Gain/Gain.xcodeproj + + WindowString + 286 197 1261 752 0 0 1680 1028 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {743, 413}} + RubberWindowFrame + 112 208 743 695 0 0 1680 1028 + + Module + PBXNavigatorGroup + Proportion + 413pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 418}, {743, 236}} + RubberWindowFrame + 112 208 743 695 0 0 1680 1028 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 654pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 91857DA0148EF61800AAA11B + 911C2A921491A5F600A430AF + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 112 208 743 695 0 0 1680 1028 + WindowToolGUID + 91857DA0148EF61800AAA11B + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser new file mode 100755 index 000000000..df947808e --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/spiadmin.pbxuser @@ -0,0 +1,143 @@ +// !$*UTF8*$! +{ + 089C1669FE841209C02AAC07 /* Project object */ = { + activeBuildConfigurationName = Release; + activeTarget = 8D01CCC60486CAD60068D4B7 /* Gain */; + codeSenseManager = 91857D95148EF55400AAA11B /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 829, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 789, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 345089498; + PBXWorkspaceStateSaveDate = 345089498; + }; + perUserProjectItems = { + 911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = 911C2A9D1491A5F600A430AF /* PBXTextBookmark */; + 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */; + }; + sourceControlManager = 91857D94148EF55400AAA11B /* Source Control */; + userBuildSettings = { + }; + }; + 2407DEB6089929BA00EB68BF /* Gain.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 1768}}"; + sepNavSelRange = "{247, 0}"; + sepNavVisRange = "{0, 1657}"; + }; + }; + 245463B80991757100464AD3 /* Gain.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 975}}"; + sepNavSelRange = "{1552, 0}"; + sepNavVisRange = "{796, 1857}"; + sepNavWindowFrame = "{{15, 465}, {750, 558}}"; + }; + }; + 24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 488}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 798}"; + }; + }; + 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {859, 19825}}"; + sepNavSelRange = "{10641, 0}"; + sepNavVisRange = "{10076, 1095}"; + }; + }; + 24D8286F09A914000093AEF8 /* GainProc.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 482}}"; + sepNavSelRange = "{239, 0}"; + sepNavVisRange = "{0, 950}"; + }; + }; + 24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {992, 493}}"; + sepNavSelRange = "{249, 0}"; + sepNavVisRange = "{0, 249}"; + }; + }; + 8D01CCC60486CAD60068D4B7 /* Gain */ = { + activeExec = 0; + }; + 911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */; + name = "Gain.cpp: 10"; + rLen = 0; + rLoc = 247; + rType = 0; + vrLen = 1657; + vrLoc = 0; + }; + 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */; + name = "Gain.cpp: 10"; + rLen = 0; + rLoc = 247; + rType = 0; + vrLen = 1625; + vrLoc = 0; + }; + 91857D94148EF55400AAA11B /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 91857D95148EF55400AAA11B /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; +} diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/Gain.xcscheme b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/Gain.xcscheme new file mode 100755 index 000000000..8ee693f95 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/Gain.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 000000000..5bccbcb4f --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/christopherjohnson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Gain.xcscheme + + orderHint + 8 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 000000000..a7bdd62d4 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + «PROJECTNAME».xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8D01CCC60486CAD60068D4B7 + + primary + + + + + diff --git a/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme new file mode 100755 index 000000000..0df2de4a3 --- /dev/null +++ b/plugins/MacVST/Dynamics3/Dynamics3.xcodeproj/xcuserdata/spiadmin.xcuserdatad/xcschemes/«PROJECTNAME».xcscheme @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/MacVST/Dynamics3/mac/Info.plist b/plugins/MacVST/Dynamics3/mac/Info.plist new file mode 100755 index 000000000..e1fd5e2db --- /dev/null +++ b/plugins/MacVST/Dynamics3/mac/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Dynamics3 + CFBundleIconFile + + CFBundleIdentifier + com.airwindows.Dynamics3 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + Dthr + CFBundleVersion + 1.0 + CSResourcesFileMapped + + + diff --git a/plugins/MacVST/Dynamics3/mac/PkgInfo b/plugins/MacVST/Dynamics3/mac/PkgInfo new file mode 100755 index 000000000..19a9cf67e --- /dev/null +++ b/plugins/MacVST/Dynamics3/mac/PkgInfo @@ -0,0 +1 @@ +BNDL???? \ No newline at end of file diff --git a/plugins/MacVST/Dynamics3/mac/xcode_vst_prefix.h b/plugins/MacVST/Dynamics3/mac/xcode_vst_prefix.h new file mode 100755 index 000000000..eaf4c0b4b --- /dev/null +++ b/plugins/MacVST/Dynamics3/mac/xcode_vst_prefix.h @@ -0,0 +1,17 @@ +#define MAC 1 +#define MACX 1 + +#define USE_NAMESPACE 0 + +#define TARGET_API_MAC_CARBON 1 +#define USENAVSERVICES 1 + +#define __CF_USE_FRAMEWORK_INCLUDES__ + +#if __MWERKS__ +#define __NOEXTENSIONS__ +#endif + +#define QUARTZ 1 + +#include \ No newline at end of file diff --git a/plugins/MacVST/Dynamics3/source/Dynamics3.cpp b/plugins/MacVST/Dynamics3/source/Dynamics3.cpp new file mode 100755 index 000000000..47424b601 --- /dev/null +++ b/plugins/MacVST/Dynamics3/source/Dynamics3.cpp @@ -0,0 +1,148 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Dynamics3(audioMaster);} + +Dynamics3::Dynamics3(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 1.0; + B = 0.5; + C = 0.5; + D = 0.0; + + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + setUniqueID(kUniqueId); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +Dynamics3::~Dynamics3() {} +VstInt32 Dynamics3::getVendorVersion () {return 1000;} +void Dynamics3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void Dynamics3::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 Dynamics3::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 Dynamics3::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void Dynamics3::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float Dynamics3::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Dynamics3::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Dynamics3::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Dynamics3::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Dynamics3::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Dynamics3::getEffectName(char* name) { + vst_strncpy(name, "Dynamics3", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Dynamics3::getPlugCategory() {return kPlugCategEffect;} + +bool Dynamics3::getProductString(char* text) { + vst_strncpy (text, "airwindows Dynamics3", kVstMaxProductStrLen); return true; +} + +bool Dynamics3::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugins/MacVST/Dynamics3/source/Dynamics3.h b/plugins/MacVST/Dynamics3/source/Dynamics3.h new file mode 100755 index 000000000..9e23dffc8 --- /dev/null +++ b/plugins/MacVST/Dynamics3/source/Dynamics3.h @@ -0,0 +1,81 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#define __Dynamics3_H + +#ifndef __audioeffect__ +#include "audioeffectx.h" +#endif + +#include +#include +#include + +enum { + kParamA =0, + kParamB =1, + kParamC =2, + kParamD =3, + kNumParameters = 4 +}; // + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'dyn3'; //Change this to what the AU identity is! + +class Dynamics3 : + public AudioEffectX +{ +public: + Dynamics3(audioMasterCallback audioMaster); + ~Dynamics3(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual VstInt32 getChunk (void** data, bool isPreset); + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + float C; + float D; + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif diff --git a/plugins/MacVST/Dynamics3/source/Dynamics3Proc.cpp b/plugins/MacVST/Dynamics3/source/Dynamics3Proc.cpp new file mode 100755 index 000000000..86a8fb63e --- /dev/null +++ b/plugins/MacVST/Dynamics3/source/Dynamics3Proc.cpp @@ -0,0 +1,160 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +void Dynamics3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Dynamics3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser index bb696444f..06a8207ec 100755 --- a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.pbxuser @@ -49,8 +49,14 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 772137108; - PBXWorkspaceStateSaveDate = 772137108; + PBXPerProjectTemplateStateSaveDate = 786872835; + PBXWorkspaceStateSaveDate = 786872835; + }; + perUserProjectItems = { + 8BE3CB092EE6BA06004F72BD /* PBXBookmark */ = 8BE3CB092EE6BA06004F72BD /* PBXBookmark */; + 8BE3CB1C2EE6BA67004F72BD /* PBXBookmark */ = 8BE3CB1C2EE6BA67004F72BD /* PBXBookmark */; + 8BE3CB1D2EE6BA67004F72BD /* PBXTextBookmark */ = 8BE3CB1D2EE6BA67004F72BD /* PBXTextBookmark */; + 8BE3CB232EE6BA67004F72BD /* PBXTextBookmark */ = 8BE3CB232EE6BA67004F72BD /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -82,9 +88,9 @@ }; 24D8286F09A914000093AEF8 /* PunchyDeluxeProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1224, 4230}}"; - sepNavSelRange = "{7042, 0}"; - sepNavVisRange = "{0, 1140}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 5382}}"; + sepNavSelRange = "{8990, 0}"; + sepNavVisRange = "{944, 196}"; sepNavWindowFrame = "{{31, 68}, {1271, 805}}"; }; }; @@ -102,6 +108,34 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8BE3CB092EE6BA06004F72BD /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyDeluxeProc.cpp */; + }; + 8BE3CB1C2EE6BA67004F72BD /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyDeluxeProc.cpp */; + }; + 8BE3CB1D2EE6BA67004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyDeluxeProc.cpp */; + name = "PunchyDeluxeProc.cpp: 253"; + rLen = 0; + rLoc = 8990; + rType = 0; + vrLen = 196; + vrLoc = 944; + }; + 8BE3CB232EE6BA67004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyDeluxeProc.cpp */; + name = "PunchyDeluxeProc.cpp: 112"; + rLen = 0; + rLoc = 4124; + rType = 0; + vrLen = 1755; + vrLoc = 2369; + }; 8D01CCC60486CAD60068D4B7 /* PunchyDeluxe */ = { activeExec = 0; }; diff --git a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 index 9ca3bb704..e30ff347e 100755 --- a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/christopherjohnson.perspectivev3 @@ -222,7 +222,48 @@ OpenEditors - + + + Content + + PBXProjectModuleGUID + 8BE3CB212EE6BA67004F72BD + PBXProjectModuleLabel + PunchyDeluxeProc.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 8BE3CB222EE6BA67004F72BD + PBXProjectModuleLabel + PunchyDeluxeProc.cpp + _historyCapacity + 0 + bookmark + 8BE3CB232EE6BA67004F72BD + history + + 8BE3CB092EE6BA06004F72BD + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1271, 708}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 31 124 1271 749 0 0 1440 878 + + + PerspectiveWidths 810 @@ -300,7 +341,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 5 + 6 4 0 @@ -339,7 +380,7 @@ PBXProjectModuleGUID 8B0237581D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + PunchyDeluxeProc.cpp PBXSplitModuleInNavigatorKey Split0 @@ -347,7 +388,15 @@ PBXProjectModuleGUID 8B0237591D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + PunchyDeluxeProc.cpp + _historyCapacity + 0 + bookmark + 8BE3CB1D2EE6BA67004F72BD + history + + 8BE3CB1C2EE6BA67004F72BD + SplitCount 1 @@ -360,18 +409,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 0}} + {{0, 0}, {603, 132}} RubberWindowFrame 34 365 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 0pt + 132pt Proportion - 441pt + 309pt Tabs @@ -385,7 +434,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 282}} RubberWindowFrame 34 365 810 487 0 0 1440 878 @@ -469,11 +518,11 @@ TableOfContents - 8B670B1C2E05E09600AB1898 + 8BE3CB1E2EE6BA67004F72BD 1CA23ED40692098700951B8B - 8B670B1D2E05E09600AB1898 + 8BE3CB1F2EE6BA67004F72BD 8B0237581D42B1C400E1E8C8 - 8B670B1E2E05E09600AB1898 + 8BE3CB202EE6BA67004F72BD 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -626,7 +675,7 @@ StatusbarIsVisible TimeStamp - 772137955.75413096 + 786872935.10393405 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -643,8 +692,8 @@ 5 WindowOrderList - 8B670B882E05E3E300AB1898 /Users/christopherjohnson/Desktop/PunchyDeluxe/PunchyDeluxe.xcodeproj + 8BE3CB212EE6BA67004F72BD WindowString 34 365 810 487 0 0 1440 878 diff --git a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.pbxproj b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.pbxproj index 31c8fc4b1..6c863bcd2 100755 --- a/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.pbxproj +++ b/plugins/MacVST/PunchyDeluxe/PunchyDeluxe.xcodeproj/project.pbxproj @@ -1894,7 +1894,7 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 8D01CCC60486CAD60068D4B7 /* AudioUnit */ = { + 8D01CCC60486CAD60068D4B7 /* PunchyDeluxe */ = { isa = PBXNativeTarget; buildConfigurationList = 24BEAAED08919AE700E695F9 /* Build configuration list for PBXNativeTarget "PunchyDeluxe" */; buildPhases = ( @@ -1947,7 +1947,7 @@ ); projectRoot = ""; targets = ( - 8D01CCC60486CAD60068D4B7 /* AudioUnit */, + 8D01CCC60486CAD60068D4B7 /* PunchyDeluxe */, ); }; /* End PBXProject section */ diff --git a/plugins/MacVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp b/plugins/MacVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp index 140e739fc..0eef3c796 100755 --- a/plugins/MacVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp +++ b/plugins/MacVST/PunchyDeluxe/source/PunchyDeluxeProc.cpp @@ -77,7 +77,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -90,7 +99,16 @@ void PunchyDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { @@ -190,7 +208,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += band; inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function fr = (0.92/overallscale)+(overallscale*0.01); band = inputSampleR; inputSampleR = 0.0; @@ -203,7 +230,16 @@ void PunchyDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += band; inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (pad < 1.0) { diff --git a/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser index b7b582531..922268379 100755 --- a/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.pbxuser @@ -49,8 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 769341306; - PBXWorkspaceStateSaveDate = 769341306; + PBXPerProjectTemplateStateSaveDate = 786872345; + PBXWorkspaceStateSaveDate = 786872345; + }; + perUserProjectItems = { + 8B670B652E05E25600AB1898 /* PBXTextBookmark */ = 8B670B652E05E25600AB1898 /* PBXTextBookmark */; + 8BE3CAFB2EE6B956004F72BD /* PBXTextBookmark */ = 8BE3CAFB2EE6B956004F72BD /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -82,10 +86,10 @@ }; 24D8286F09A914000093AEF8 /* PunchyGuitarProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1147, 7542}}"; - sepNavSelRange = "{12801, 0}"; - sepNavVisRange = "{0, 1138}"; - sepNavWindowFrame = "{{12, 61}, {1194, 813}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 8406}}"; + sepNavSelRange = "{14813, 0}"; + sepNavVisRange = "{976, 162}"; + sepNavWindowFrame = "{{-3, 65}, {1194, 813}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -102,6 +106,26 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B670B652E05E25600AB1898 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyGuitarProc.cpp */; + name = "PunchyGuitarProc.cpp: 365"; + rLen = 0; + rLoc = 14272; + rType = 0; + vrLen = 203; + vrLoc = 935; + }; + 8BE3CAFB2EE6B956004F72BD /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* PunchyGuitarProc.cpp */; + name = "PunchyGuitarProc.cpp: 402"; + rLen = 0; + rLoc = 14813; + rType = 0; + vrLen = 162; + vrLoc = 976; + }; 8D01CCC60486CAD60068D4B7 /* PunchyGuitar */ = { activeExec = 0; }; diff --git a/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 index 8c3932c9a..09bcc911a 100755 --- a/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/PunchyGuitar/PunchyGuitar.xcodeproj/christopherjohnson.perspectivev3 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 15 360 810 487 0 0 1440 878 + 40 330 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -339,7 +339,7 @@ PBXProjectModuleGUID 8B0237581D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + PunchyGuitarProc.cpp PBXSplitModuleInNavigatorKey Split0 @@ -347,7 +347,15 @@ PBXProjectModuleGUID 8B0237591D42B1C400E1E8C8 PBXProjectModuleLabel - Gain.h + PunchyGuitarProc.cpp + _historyCapacity + 0 + bookmark + 8BE3CAFB2EE6B956004F72BD + history + + 8B670B652E05E25600AB1898 + SplitCount 1 @@ -360,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 0}} + {{0, 0}, {603, 117}} RubberWindowFrame - 15 360 810 487 0 0 1440 878 + 40 330 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 0pt + 117pt Proportion - 441pt + 324pt Tabs @@ -385,9 +393,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 297}} RubberWindowFrame - 15 360 810 487 0 0 1440 878 + 40 330 810 487 0 0 1440 878 Module XCDetailModule @@ -469,11 +477,11 @@ TableOfContents - 8B84487D2DDB406A001CED69 + 8BE3CAFC2EE6B956004F72BD 1CA23ED40692098700951B8B - 8B84487E2DDB406A001CED69 + 8BE3CAFD2EE6B956004F72BD 8B0237581D42B1C400E1E8C8 - 8B84487F2DDB406A001CED69 + 8BE3CAFE2EE6B956004F72BD 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -626,7 +634,7 @@ StatusbarIsVisible TimeStamp - 769343594.18093204 + 786872662.45649195 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -643,11 +651,10 @@ 5 WindowOrderList - 8B8448802DDB406A001CED69 /Users/christopherjohnson/Desktop/PunchyGuitar/PunchyGuitar.xcodeproj WindowString - 15 360 810 487 0 0 1440 878 + 40 330 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/PunchyGuitar/source/PunchyGuitarProc.cpp b/plugins/MacVST/PunchyGuitar/source/PunchyGuitarProc.cpp index 02396a754..1cffc39b1 100755 --- a/plugins/MacVST/PunchyGuitar/source/PunchyGuitarProc.cpp +++ b/plugins/MacVST/PunchyGuitar/source/PunchyGuitarProc.cpp @@ -90,7 +90,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -161,7 +170,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) @@ -291,7 +309,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -362,7 +389,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) diff --git a/plugins/WinVST/ConsoleHBuss/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleHBuss/.vs/VSTProject/v14/.suo index bc75e577e8f73cf312d1eaa24d40169e293d1229..7dabb6a3349bd7a5e83cac335c10ae89551a3247 100755 GIT binary patch delta 32 kcmZqJz}T>XaYGIhTSIt!X?*tPBBtNWtP2ytOt!v20LXaYGIhTfw22y|?@~7cu>2W`#1@`T_ywMGi9n diff --git a/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.cpp b/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.cpp index c72d32c91..a43c7d260 100755 --- a/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.cpp +++ b/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.cpp @@ -34,7 +34,7 @@ AudioEffectX(audioMaster, kNumPrograms, kNumParameters) //SmoothEQ3 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 diff --git a/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.h b/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.h index b2dd09fca..9c239ca3a 100755 --- a/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.h +++ b/plugins/WinVST/ConsoleHBuss/ConsoleHBuss.h @@ -95,25 +95,16 @@ private: //SmoothEQ3 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 + //Dynamics2 custom for buss enum { hilp_freq, hilp_temp, diff --git a/plugins/WinVST/ConsoleHBuss/ConsoleHBussProc.cpp b/plugins/WinVST/ConsoleHBuss/ConsoleHBussProc.cpp index ace7e9f96..91a6ee2fc 100755 --- a/plugins/WinVST/ConsoleHBuss/ConsoleHBussProc.cpp +++ b/plugins/WinVST/ConsoleHBuss/ConsoleHBussProc.cpp @@ -28,37 +28,47 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; double sloRez = pow(1.0-THR,10.0) / overallscale; @@ -248,101 +258,79 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - + if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -405,47 +393,39 @@ void ConsoleHBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -487,35 +467,45 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 double bezCThresh = pow(1.0-THR, 6.0) * 8.0; @@ -707,101 +697,79 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst } else lowpass[hilp_cR1] = lowpass[hilp_cR2] = lowpass[hilp_cL1] = lowpass[hilp_cL2] = 0.0; //another stage of Highpass/Lowpass before bringing in the parametric bands - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply - - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + inputSampleL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + inputSampleR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss if (highpassEngage) { //distributed Highpass highpass[hilp_temp] = (inputSampleL*highpass[hilp_e0])+highpass[hilp_eL1]; @@ -864,47 +832,39 @@ void ConsoleHBuss::processDoubleReplacing(double **inputs, double **outputs, Vst darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/WinVST/ConsoleHChannel/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleHChannel/.vs/VSTProject/v14/.suo index 7e1df65aca3f5c32dd2d0a11df4578a0132c37a2..62204d8220546c1441c63671943e2bb9c51bce7e 100755 GIT binary patch delta 344 zcmZqJ!q~8ZaYHT>kLu@)gzP(v3JeSk4U;RGsu@!^e`R83WYnJglX*3#Hc(gxh_yDa zWjVlzrkD*`F}pLP)?{0bY({~}i7dh!6I>WKaal0({QLj^KL`f`4Vmo1Z6XR2fYHf7 ziIm9`x$`F`uuS49VN9A_%2UsnIQc7(OxRq?dzd^k1mI>&E*1RG=)bvCsGfr{e)3nT z|BL~fze?9LfyCsx85ij>PEvH3d`VGevW)(c%??Tj7$+x)J8V+baYHT>&$0mBoBnqg6&M&84ot3Os%A{v{FRBBkuiSqPv+H}T0miKAlBKu zmgN8=nqoF&#q7?E+LLWLvRVHFfxzTM7U9hYI4YQU{DHdv0fj(#vJ1C~WIU1pOdS31jl)Ql5Ioq{&}_Wa8#h-ouRK86p5TWOAwCf5w2#r9$-_j0uy!O8sXH z-27F#o(Uu-*UiYtFxgSbev;mSNs11W59l43++f(S*+Hp+ag)jyK7x31 z=X`vs8C)4G8H^bWfV3%t3xhL*E|7L&FkvtUvP^)`k--qivIL4+0>yQKYK(v^L!h_; r5IX@$3!q*@hT6%|x|Nfil 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -159,393 +173,359 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -572,7 +552,7 @@ void ConsoleHChannel::processReplacing(float **inputs, float **outputs, VstInt32 iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { @@ -654,6 +634,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -671,110 +652,123 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -791,393 +785,359 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } + + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -1204,7 +1164,7 @@ void ConsoleHChannel::processDoubleReplacing(double **inputs, double **outputs, iirHPositionR[count] = 0.0; iirHAngleR[count] = 0.0; } - } //blank out highpass if jut switched off + } //blank out highpass if just switched off } const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp)); if (lFreq < 1.0) { diff --git a/plugins/WinVST/ConsoleHPre/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleHPre/.vs/VSTProject/v14/.suo index 5aeef89a7a962d9571471ee2d7abe7746d5303cf..5ccddf5fd7ec22d721dee9911175804274d0a45c 100755 GIT binary patch delta 425 zcmZqJz}T>baYGIhZ^JKkx5Vr_j0y}43}}3m-y*afSkuEaT+( zkaIph)eM$EXu#meV8LL{U delta 346 zcmZqJ!q~8ZaYGIhuYmOfj$8hB7!?>87#b#5GF3CCZvM)|%*ZG``6u&gPHmvD4iIZ? zUdytd5nVMKvTAl`My<)V9NCNllM`8lHzv3+ZsM|F&%&Aepeal=m=sW(dH|m|QCOpV5DFsZc!!WBlZ= zQvVqPHh-0_X99`Ibu%u~W1OVuF!_?A%w!q;C7T_T4lqtm5O>(5@`Vqf+&DvFaFlVfyi7`Y}lirG$1QnZ@ 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -39,110 +40,123 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -158,398 +172,373 @@ void ConsoleHPre::processReplacing(float **inputs, float **outputs, VstInt32 sam if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -644,6 +633,7 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); switch ((int)(TRM*4.0)){ case 0: moreTapeHack *= 0.5; break; case 1: break; @@ -661,110 +651,123 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI double bassGain = (LOW-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); //separate from filtering stage, this is amplitude, centered on 1.0 unity gain + double highCoef = 0.0; + double lowCoef = 0.0; + double omega = 0.0; + double biqK = 0.0; + double norm = 0.0; - //SmoothEQ3 is how to get 3rd order steepness at very low CPU. - //because sample rate varies, you could also vary the crossovers - //you can't vary Q because math is simplified to take advantage of - //how the accurate Q value for this filter is always exactly 1.0. - highFast[biq_freq] = (4000.0/getSampleRate()); - double omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq - double biqK = 2.0 - cos(omega); - double highCoef = -sqrt(biqK*biqK - 1.0) + biqK; - lowFast[biq_freq] = (200.0/getSampleRate()); - omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq - biqK = 2.0 - cos(omega); - double lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; - //exponential IIR filter as part of an accurate 3rd order Butterworth filter - biqK = tan(M_PI * highFast[biq_freq]); - double norm = 1.0 / (1.0 + biqK + biqK*biqK); - highFast[biq_a0] = biqK * biqK * norm; - highFast[biq_a1] = 2.0 * highFast[biq_a0]; - highFast[biq_a2] = highFast[biq_a0]; - highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - biqK = tan(M_PI * lowFast[biq_freq]); - norm = 1.0 / (1.0 + biqK + biqK*biqK); - lowFast[biq_a0] = biqK * biqK * norm; - lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; - lowFast[biq_a2] = lowFast[biq_a0]; - lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; - lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; - //custom biquad setup with Q = 1.0 gets to omit some divides + bool eqOff = (trebleGain == 1.0 && midGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + //SmoothEQ3 is how to get 3rd order steepness at very low CPU. + //because sample rate varies, you could also vary the crossovers + //you can't vary Q because math is simplified to take advantage of + //how the accurate Q value for this filter is always exactly 1.0. + highFast[biq_freq] = (4000.0/getSampleRate()); + omega = 2.0*M_PI*(4000.0/getSampleRate()); //mid-high crossover freq + biqK = 2.0 - cos(omega); + highCoef = -sqrt(biqK*biqK - 1.0) + biqK; + lowFast[biq_freq] = (200.0/getSampleRate()); + omega = 2.0*M_PI*(200.0/getSampleRate()); //low-mid crossover freq + biqK = 2.0 - cos(omega); + lowCoef = -sqrt(biqK*biqK - 1.0) + biqK; + //exponential IIR filter as part of an accurate 3rd order Butterworth filter + biqK = tan(M_PI * highFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + highFast[biq_a0] = biqK * biqK * norm; + highFast[biq_a1] = 2.0 * highFast[biq_a0]; + highFast[biq_a2] = highFast[biq_a0]; + highFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + highFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + biqK = tan(M_PI * lowFast[biq_freq]); + norm = 1.0 / (1.0 + biqK + biqK*biqK); + lowFast[biq_a0] = biqK * biqK * norm; + lowFast[biq_a1] = 2.0 * lowFast[biq_a0]; + lowFast[biq_a2] = lowFast[biq_a0]; + lowFast[biq_b1] = 2.0 * (biqK*biqK - 1.0) * norm; + lowFast[biq_b2] = (1.0 - biqK + biqK*biqK) * norm; + //custom biquad setup with Q = 1.0 gets to omit some divides + } //SmoothEQ3 - high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); - if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; - high[biqs_bit] = (TRB*2.0)-1.0; - high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; - high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * high[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; - high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; - high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //high - - hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); - if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; - hmid[biqs_bit] = (HMB*2.0)-1.0; - hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; - hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * hmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; - hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; - hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //hmid - - lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); - if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; - lmid[biqs_bit] = (LMB*2.0)-1.0; - lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; - lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * lmid[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; - lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; - lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //lmid - - bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); - if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; - bass[biqs_bit] = (BSB*2.0)-1.0; - bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; - bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); - biqK = tan(M_PI * bass[biqs_freq]); - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); - bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; - bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; - norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); - bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; - bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; - bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; - //bass double crossFade = CRS; + bool hipcrushOff = (crossFade == 0.0); + if (!hipcrushOff) { + high[biqs_freq] = (((pow(TRF,2.0)*16000.0)+1000.0)/getSampleRate()); + if (high[biqs_freq] < 0.0001) high[biqs_freq] = 0.0001; + high[biqs_bit] = (TRB*2.0)-1.0; + high[biqs_level] = (1.0-pow(1.0-TRG,2.0))*1.618033988749894848204586; + high[biqs_reso] = pow(TRG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * high[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + high[biqs_a0] = biqK / (high[biqs_reso]*0.618033988749894848204586) * norm; + high[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_b2] = (1.0 - biqK / (high[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + high[biqs_c0] = biqK / (high[biqs_reso]*1.618033988749894848204586) * norm; + high[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + high[biqs_d2] = (1.0 - biqK / (high[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //high + + hmid[biqs_freq] = (((pow(HMF,3.0)*7000.0)+300.0)/getSampleRate()); + if (hmid[biqs_freq] < 0.0001) hmid[biqs_freq] = 0.0001; + hmid[biqs_bit] = (HMB*2.0)-1.0; + hmid[biqs_level] = (1.0-pow(1.0-HMG,2.0))*1.618033988749894848204586; + hmid[biqs_reso] = pow(HMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * hmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + hmid[biqs_a0] = biqK / (hmid[biqs_reso]*0.618033988749894848204586) * norm; + hmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_b2] = (1.0 - biqK / (hmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + hmid[biqs_c0] = biqK / (hmid[biqs_reso]*1.618033988749894848204586) * norm; + hmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + hmid[biqs_d2] = (1.0 - biqK / (hmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //hmid + + lmid[biqs_freq] = (((pow(LMF,3.0)*3000.0)+40.0)/getSampleRate()); + if (lmid[biqs_freq] < 0.00001) lmid[biqs_freq] = 0.00001; + lmid[biqs_bit] = (LMB*2.0)-1.0; + lmid[biqs_level] = (1.0-pow(1.0-LMG,2.0))*1.618033988749894848204586; + lmid[biqs_reso] = pow(LMG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * lmid[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + lmid[biqs_a0] = biqK / (lmid[biqs_reso]*0.618033988749894848204586) * norm; + lmid[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_b2] = (1.0 - biqK / (lmid[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + lmid[biqs_c0] = biqK / (lmid[biqs_reso]*1.618033988749894848204586) * norm; + lmid[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + lmid[biqs_d2] = (1.0 - biqK / (lmid[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //lmid + + bass[biqs_freq] = (((pow(BSF,4.0)*1000.0)+20.0)/getSampleRate()); + if (bass[biqs_freq] < 0.00001) bass[biqs_freq] = 0.00001; + bass[biqs_bit] = (BSB*2.0)-1.0; + bass[biqs_level] = (1.0-pow(1.0-BSG,2.0))*1.618033988749894848204586; + bass[biqs_reso] = pow(BSG+0.618033988749894848204586,2.0); + biqK = tan(M_PI * bass[biqs_freq]); + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK); + bass[biqs_a0] = biqK / (bass[biqs_reso]*0.618033988749894848204586) * norm; + bass[biqs_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_b2] = (1.0 - biqK / (bass[biqs_reso]*0.618033988749894848204586) + biqK * biqK) * norm; + norm = 1.0 / (1.0 + biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK); + bass[biqs_c0] = biqK / (bass[biqs_reso]*1.618033988749894848204586) * norm; + bass[biqs_d1] = 2.0 * (biqK * biqK - 1.0) * norm; + bass[biqs_d2] = (1.0 - biqK / (bass[biqs_reso]*1.618033988749894848204586) + biqK * biqK) * norm; + //bass + } //HipCrush with four bands - double bezCThresh = pow(1.0-THR, 6.0) * 8.0; - double bezRez = pow(1.0-ATK, 8.0) / overallscale; - double sloRez = pow(1.0-RLS,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(GAT,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass @@ -780,398 +783,373 @@ void ConsoleHPre::processDoubleReplacing(double **inputs, double **outputs, VstI if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleFastL = inputSampleL; - double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; - highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; - highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastL = outSample; trebleFastL -= midFastL; - outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; - lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; - lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastL = outSample; midFastL -= bassFastL; - trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); - midFastL = highFastLIIR; trebleFastL -= midFastL; - lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); - bassFastL = lowFastLIIR; midFastL -= bassFastL; - double smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - double trebleFastR = inputSampleR; - outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; - highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; - highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); - double midFastR = outSample; trebleFastR -= midFastR; - outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; - lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; - lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); - double bassFastR = outSample; midFastR -= bassFastR; - trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //first stage of two crossovers is biquad of exactly 1.0 Q - highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); - midFastR = highFastRIIR; trebleFastR -= midFastR; - lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); - bassFastR = lowFastRIIR; midFastR -= bassFastR; - double smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); - //second stage of two crossovers is the exponential filters - //this produces a slightly steeper Butterworth filter very cheaply + double smoothEQL = inputSampleL; + double smoothEQR = inputSampleR; + + if (!eqOff) { + double trebleFastL = inputSampleL; + double outSample = (trebleFastL * highFast[biq_a0]) + highFast[biq_sL1]; + highFast[biq_sL1] = (trebleFastL * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sL2]; + highFast[biq_sL2] = (trebleFastL * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastL = outSample; trebleFastL -= midFastL; + outSample = (midFastL * lowFast[biq_a0]) + lowFast[biq_sL1]; + lowFast[biq_sL1] = (midFastL * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sL2]; + lowFast[biq_sL2] = (midFastL * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastL = outSample; midFastL -= bassFastL; + trebleFastL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastLIIR = (highFastLIIR*highCoef) + (trebleFastL*(1.0-highCoef)); + midFastL = highFastLIIR; trebleFastL -= midFastL; + lowFastLIIR = (lowFastLIIR*lowCoef) + (midFastL*(1.0-lowCoef)); + bassFastL = lowFastLIIR; midFastL -= bassFastL; + smoothEQL = (bassFastL*bassGain) + (midFastL*midGain) + (trebleFastL*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + double trebleFastR = inputSampleR; + outSample = (trebleFastR * highFast[biq_a0]) + highFast[biq_sR1]; + highFast[biq_sR1] = (trebleFastR * highFast[biq_a1]) - (outSample * highFast[biq_b1]) + highFast[biq_sR2]; + highFast[biq_sR2] = (trebleFastR * highFast[biq_a2]) - (outSample * highFast[biq_b2]); + double midFastR = outSample; trebleFastR -= midFastR; + outSample = (midFastR * lowFast[biq_a0]) + lowFast[biq_sR1]; + lowFast[biq_sR1] = (midFastR * lowFast[biq_a1]) - (outSample * lowFast[biq_b1]) + lowFast[biq_sR2]; + lowFast[biq_sR2] = (midFastR * lowFast[biq_a2]) - (outSample * lowFast[biq_b2]); + double bassFastR = outSample; midFastR -= bassFastR; + trebleFastR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //first stage of two crossovers is biquad of exactly 1.0 Q + highFastRIIR = (highFastRIIR*highCoef) + (trebleFastR*(1.0-highCoef)); + midFastR = highFastRIIR; trebleFastR -= midFastR; + lowFastRIIR = (lowFastRIIR*lowCoef) + (midFastR*(1.0-lowCoef)); + bassFastR = lowFastRIIR; midFastR -= bassFastR; + smoothEQR = (bassFastR*bassGain) + (midFastR*midGain) + (trebleFastR*trebleGain); + //second stage of two crossovers is the exponential filters + //this produces a slightly steeper Butterworth filter very cheaply + } //SmoothEQ3 - //begin Stacked Biquad With Reversed Neutron Flow L - high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; - high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outL] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outL] *= bitFactor; - high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outL] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; - high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outL] = high[biqs_temp]; - high[biqs_outL] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L + double parametricL = 0.0; + double parametricR = 0.0; - //begin Stacked Biquad With Reversed Neutron Flow L - hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; - hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outL] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outL] *= bitFactor; - hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outL] /= bitFactor; + if (!hipcrushOff) { + //begin Stacked Biquad With Reversed Neutron Flow L + high[biqs_outL] = inputSampleL * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outL] * high[biqs_a0]) + high[biqs_aL1]; + high[biqs_aL1] = high[biqs_aL2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aL2] = (high[biqs_outL] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outL] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outL] *= bitFactor; + high[biqs_outL] = floor(high[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outL] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outL] * high[biqs_c0]) + high[biqs_cL1]; + high[biqs_cL1] = high[biqs_cL2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cL2] = (high[biqs_outL] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outL] = high[biqs_temp]; + high[biqs_outL] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + hmid[biqs_outL] = inputSampleL * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_a0]) + hmid[biqs_aL1]; + hmid[biqs_aL1] = hmid[biqs_aL2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aL2] = (hmid[biqs_outL] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outL] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outL] *= bitFactor; + hmid[biqs_outL] = floor(hmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outL] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; + hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outL] = hmid[biqs_temp]; + hmid[biqs_outL] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; + lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outL] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outL] *= bitFactor; + lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outL] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; + lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outL] = lmid[biqs_temp]; + lmid[biqs_outL] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow L + bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; + bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outL] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outL] *= bitFactor; + bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outL] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; + bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outL] = bass[biqs_temp]; + bass[biqs_outL] *= bass[biqs_level]; + parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; + //end Stacked Biquad With Reversed Neutron Flow L + + //begin Stacked Biquad With Reversed Neutron Flow R + high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); + high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; + high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); + high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); + high[biqs_outR] = high[biqs_temp]; + if (high[biqs_bit] != 0.0) { + double bitFactor = high[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + high[biqs_outR] *= bitFactor; + high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + high[biqs_outR] /= bitFactor; + } + high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; + high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); + high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); + high[biqs_outR] = high[biqs_temp]; + high[biqs_outR] *= high[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; + hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); + hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); + hmid[biqs_outR] = hmid[biqs_temp]; + if (hmid[biqs_bit] != 0.0) { + double bitFactor = hmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + hmid[biqs_outR] *= bitFactor; + hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + hmid[biqs_outR] /= bitFactor; + } + hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; + hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); + hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); + hmid[biqs_outR] = hmid[biqs_temp]; + hmid[biqs_outR] *= hmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; + lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); + lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); + lmid[biqs_outR] = lmid[biqs_temp]; + if (lmid[biqs_bit] != 0.0) { + double bitFactor = lmid[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + lmid[biqs_outR] *= bitFactor; + lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + lmid[biqs_outR] /= bitFactor; + } + lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; + lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); + lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); + lmid[biqs_outR] = lmid[biqs_temp]; + lmid[biqs_outR] *= lmid[biqs_level]; + //end Stacked Biquad With Reversed Neutron Flow R + + //begin Stacked Biquad With Reversed Neutron Flow R + bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; + bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); + bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); + bass[biqs_outR] = bass[biqs_temp]; + if (bass[biqs_bit] != 0.0) { + double bitFactor = bass[biqs_bit]; + bool crushGate = (bitFactor < 0.0); + bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); + bass[biqs_outR] *= bitFactor; + bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); + bass[biqs_outR] /= bitFactor; + } + bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; + bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); + bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); + bass[biqs_outR] = bass[biqs_temp]; + bass[biqs_outR] *= bass[biqs_level]; + parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; + //end Stacked Biquad With Reversed Neutron Flow R } - hmid[biqs_temp] = (hmid[biqs_outL] * hmid[biqs_c0]) + hmid[biqs_cL1]; - hmid[biqs_cL1] = hmid[biqs_cL2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cL2] = (hmid[biqs_outL] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outL] = hmid[biqs_temp]; - hmid[biqs_outL] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - lmid[biqs_outL] = inputSampleL * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_a0]) + lmid[biqs_aL1]; - lmid[biqs_aL1] = lmid[biqs_aL2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aL2] = (lmid[biqs_outL] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outL] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outL] *= bitFactor; - lmid[biqs_outL] = floor(lmid[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outL] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outL] * lmid[biqs_c0]) + lmid[biqs_cL1]; - lmid[biqs_cL1] = lmid[biqs_cL2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cL2] = (lmid[biqs_outL] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outL] = lmid[biqs_temp]; - lmid[biqs_outL] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow L - bass[biqs_outL] = inputSampleL * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_a0]) + bass[biqs_aL1]; - bass[biqs_aL1] = bass[biqs_aL2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aL2] = (bass[biqs_outL] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outL] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outL] *= bitFactor; - bass[biqs_outL] = floor(bass[biqs_outL]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outL] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outL] * bass[biqs_c0]) + bass[biqs_cL1]; - bass[biqs_cL1] = bass[biqs_cL2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cL2] = (bass[biqs_outL] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outL] = bass[biqs_temp]; - bass[biqs_outL] *= bass[biqs_level]; - double parametricL = high[biqs_outL] + hmid[biqs_outL] + lmid[biqs_outL] + bass[biqs_outL]; - //end Stacked Biquad With Reversed Neutron Flow L - - //begin Stacked Biquad With Reversed Neutron Flow R - high[biqs_outR] = inputSampleR * fabs(high[biqs_level]); - high[biqs_temp] = (high[biqs_outR] * high[biqs_a0]) + high[biqs_aR1]; - high[biqs_aR1] = high[biqs_aR2] - (high[biqs_temp]*high[biqs_b1]); - high[biqs_aR2] = (high[biqs_outR] * -high[biqs_a0]) - (high[biqs_temp]*high[biqs_b2]); - high[biqs_outR] = high[biqs_temp]; - if (high[biqs_bit] != 0.0) { - double bitFactor = high[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - high[biqs_outR] *= bitFactor; - high[biqs_outR] = floor(high[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - high[biqs_outR] /= bitFactor; - } - high[biqs_temp] = (high[biqs_outR] * high[biqs_c0]) + high[biqs_cR1]; - high[biqs_cR1] = high[biqs_cR2] - (high[biqs_temp]*high[biqs_d1]); - high[biqs_cR2] = (high[biqs_outR] * -high[biqs_c0]) - (high[biqs_temp]*high[biqs_d2]); - high[biqs_outR] = high[biqs_temp]; - high[biqs_outR] *= high[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - hmid[biqs_outR] = inputSampleR * fabs(hmid[biqs_level]); - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_a0]) + hmid[biqs_aR1]; - hmid[biqs_aR1] = hmid[biqs_aR2] - (hmid[biqs_temp]*hmid[biqs_b1]); - hmid[biqs_aR2] = (hmid[biqs_outR] * -hmid[biqs_a0]) - (hmid[biqs_temp]*hmid[biqs_b2]); - hmid[biqs_outR] = hmid[biqs_temp]; - if (hmid[biqs_bit] != 0.0) { - double bitFactor = hmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - hmid[biqs_outR] *= bitFactor; - hmid[biqs_outR] = floor(hmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - hmid[biqs_outR] /= bitFactor; - } - hmid[biqs_temp] = (hmid[biqs_outR] * hmid[biqs_c0]) + hmid[biqs_cR1]; - hmid[biqs_cR1] = hmid[biqs_cR2] - (hmid[biqs_temp]*hmid[biqs_d1]); - hmid[biqs_cR2] = (hmid[biqs_outR] * -hmid[biqs_c0]) - (hmid[biqs_temp]*hmid[biqs_d2]); - hmid[biqs_outR] = hmid[biqs_temp]; - hmid[biqs_outR] *= hmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - lmid[biqs_outR] = inputSampleR * fabs(lmid[biqs_level]); - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_a0]) + lmid[biqs_aR1]; - lmid[biqs_aR1] = lmid[biqs_aR2] - (lmid[biqs_temp]*lmid[biqs_b1]); - lmid[biqs_aR2] = (lmid[biqs_outR] * -lmid[biqs_a0]) - (lmid[biqs_temp]*lmid[biqs_b2]); - lmid[biqs_outR] = lmid[biqs_temp]; - if (lmid[biqs_bit] != 0.0) { - double bitFactor = lmid[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - lmid[biqs_outR] *= bitFactor; - lmid[biqs_outR] = floor(lmid[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - lmid[biqs_outR] /= bitFactor; - } - lmid[biqs_temp] = (lmid[biqs_outR] * lmid[biqs_c0]) + lmid[biqs_cR1]; - lmid[biqs_cR1] = lmid[biqs_cR2] - (lmid[biqs_temp]*lmid[biqs_d1]); - lmid[biqs_cR2] = (lmid[biqs_outR] * -lmid[biqs_c0]) - (lmid[biqs_temp]*lmid[biqs_d2]); - lmid[biqs_outR] = lmid[biqs_temp]; - lmid[biqs_outR] *= lmid[biqs_level]; - //end Stacked Biquad With Reversed Neutron Flow R - - //begin Stacked Biquad With Reversed Neutron Flow R - bass[biqs_outR] = inputSampleR * fabs(bass[biqs_level]); - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_a0]) + bass[biqs_aR1]; - bass[biqs_aR1] = bass[biqs_aR2] - (bass[biqs_temp]*bass[biqs_b1]); - bass[biqs_aR2] = (bass[biqs_outR] * -bass[biqs_a0]) - (bass[biqs_temp]*bass[biqs_b2]); - bass[biqs_outR] = bass[biqs_temp]; - if (bass[biqs_bit] != 0.0) { - double bitFactor = bass[biqs_bit]; - bool crushGate = (bitFactor < 0.0); - bitFactor = pow(2.0,fmin(fmax((1.0-fabs(bitFactor))*16.0,0.5),16.0)); - bass[biqs_outR] *= bitFactor; - bass[biqs_outR] = floor(bass[biqs_outR]+(crushGate?0.5/bitFactor:0.0)); - bass[biqs_outR] /= bitFactor; - } - bass[biqs_temp] = (bass[biqs_outR] * bass[biqs_c0]) + bass[biqs_cR1]; - bass[biqs_cR1] = bass[biqs_cR2] - (bass[biqs_temp]*bass[biqs_d1]); - bass[biqs_cR2] = (bass[biqs_outR] * -bass[biqs_c0]) - (bass[biqs_temp]*bass[biqs_d2]); - bass[biqs_outR] = bass[biqs_temp]; - bass[biqs_outR] *= bass[biqs_level]; - double parametricR = high[biqs_outR] + hmid[biqs_outR] + lmid[biqs_outR] + bass[biqs_outR]; - //end Stacked Biquad With Reversed Neutron Flow R //end HipCrush as four band - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - smoothEQL *= ((bezCThresh*0.5)+1.0); - smoothEQR *= ((bezCThresh*0.5)+1.0); - parametricL *= ((bezCThresh*0.5)+1.0); - parametricR *= ((bezCThresh*0.5)+1.0); - } //makeup gain + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (fabs(inputSampleL) > gate+(sloRez*bezGateL)) bezGateL = ((bezGateL*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateL = fmax(0.0, bezGateL-(sloRez*sloRez)); - if (fabs(inputSampleR) > gate+(sloRez*bezGateR)) bezGateR = ((bezGateR*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGateR = fmax(0.0, bezGateR-(sloRez*sloRez)); - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxFL = fmax(bezMaxFL,fabs(inputSampleL)); - bezMaxFR = fmax(bezMaxFR,fabs(inputSampleR)); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxFL < gate) bezCompF[bez_SampL] = bezMaxFL/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + smoothEQL *= (bezThresh+1.0); + smoothEQR *= (bezThresh+1.0); + parametricL *= (bezThresh+1.0); + parametricR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; //switch over to the EQed or HipCrushed sound and compress inputSampleL = (smoothEQL * (1.0-crossFade)) + (parametricL * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - //switch over to the EQed or HipCrushed sound and compress inputSampleR = (smoothEQR * (1.0-crossFade)) + (parametricR * crossFade); - //apply filtration to what was just the unfiltered sound - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //apply compression worked out using unfiltered sound - if (bezGateL < 1.0 && gate > 0.0) {inputSampleL *= bezGateL;} - if (bezGateR < 1.0 && gate > 0.0) {inputSampleR *= bezGateR;} - //and gate the lot, if necessary - //Dynamics2 + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); + } + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/WinVST/ConsoleX2Buss/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleX2Buss/.vs/VSTProject/v14/.suo index 896ecb712ea92227c93616a86ab8836c8b342350..dd0cca9b48cf9c0cb72e54f7041e1d7689c53827 100755 GIT binary patch delta 93 zcmZqJz}T>XaYGIho4~o!o}}!}MNDmsjGCK&G8Y4d>?^=RY!D]RH_lhZ=Z%gH%2 mXaYGIh+XKgU4*#t-7csRlGAeKW$y|&OVuJ{==lD!6*10&@Nk?LGjBd&1 IL!ov|08a}UiU0rr diff --git a/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.cpp b/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.cpp index d27cd2cec..a5f742744 100755 --- a/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.cpp +++ b/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.cpp @@ -12,17 +12,17 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.5; - B = 0.5; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 1.0; - J = 0.5; - K = 0.5; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -44,7 +44,7 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) : //SmoothEQ2 for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; + bezCompF[bez_cycle] = 1.0; bezCompS[bez_cycle] = 1.0; //Dynamics2 @@ -94,17 +94,17 @@ static float pinParameter(float data) VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; + chunkData[0] = HIG; + chunkData[1] = HMG; + chunkData[2] = LMG; + chunkData[3] = BSG; + chunkData[4] = HIF; + chunkData[5] = HMF; + chunkData[6] = LMF; + chunkData[7] = BSF; + chunkData[8] = THR; + chunkData[9] = PAN; + chunkData[10] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -116,17 +116,17 @@ VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); + HIG = pinParameter(chunkData[0]); + HMG = pinParameter(chunkData[1]); + LMG = pinParameter(chunkData[2]); + BSG = pinParameter(chunkData[3]); + HIF = pinParameter(chunkData[4]); + HMF = pinParameter(chunkData[5]); + LMF = pinParameter(chunkData[6]); + BSF = pinParameter(chunkData[7]); + THR = pinParameter(chunkData[8]); + PAN = pinParameter(chunkData[9]); + FAD = pinParameter(chunkData[10]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -136,85 +136,85 @@ VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset) void ConsoleX2Buss::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Buss::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Buss::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Buss::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: float2string (A, text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Buss::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.h b/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.h index f13fa39c5..1fa28c929 100755 --- a/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.h +++ b/plugins/WinVST/ConsoleX2Buss/ConsoleX2Buss.h @@ -16,17 +16,17 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, + kParamHIG =0, + kParamHMG =1, + kParamLMG =2, + kParamBSG =3, + kParamHIF =4, + kParamHMF =5, + kParamLMF =6, + kParamBSF =7, + kParamTHR =8, + kParamPAN =9, + kParamFAD =10, kNumParameters = 11 }; // @@ -62,17 +62,17 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float PAN; + float FAD; enum { biq_freq, @@ -108,26 +108,17 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction double bezCompF[bez_total]; - double bezMaxF; double bezCompS[bez_total]; - //Dynamics2 - + //Dynamics2 custom for buss + double avg32L[33]; double avg32R[33]; double avg16L[17]; diff --git a/plugins/WinVST/ConsoleX2Buss/ConsoleX2BussProc.cpp b/plugins/WinVST/ConsoleX2Buss/ConsoleX2BussProc.cpp index ccc0d1399..55c705365 100755 --- a/plugins/WinVST/ConsoleX2Buss/ConsoleX2BussProc.cpp +++ b/plugins/WinVST/ConsoleX2Buss/ConsoleX2BussProc.cpp @@ -21,133 +21,142 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -167,198 +176,177 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -403,47 +391,39 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); @@ -478,133 +458,142 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double trebleGain = (A-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (B-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (C-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (D-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); - double trebleRef = E-0.5; - double highmidRef = F-0.5; - double lowmidRef = G-0.5; - double bassRef = H-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-I, 6.0) * 8.0; - double bezRez = pow(1.0-I, 12.360679774997898) / overallscale; - double sloRez = pow(1.0-I,10.0) / overallscale; + double bezCThresh = pow(1.0-THR, 6.0) * 8.0; + double bezRez = pow(1.0-THR, 12.360679774997898) / overallscale; + double sloRez = pow(1.0-THR,10.0) / overallscale; sloRez = fmin(fmax(sloRez,0.00001),1.0); bezRez = fmin(fmax(bezRez,0.00001),1.0); //Dynamics2 - panA = panB; panB = J*1.57079633; - inTrimA = inTrimB; inTrimB = K*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -624,198 +613,177 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs if (inputSampleR < -1.0) inputSampleR = -1.0; else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949)); - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 if (bezCThresh > 0.0) { inputSampleL *= ((bezCThresh*0.5)+1.0); inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - bezCompF[bez_CL] = bezCompF[bez_BL]; - bezCompF[bez_BL] = bezCompF[bez_AL]; - bezCompF[bez_AL] = bezCompF[bez_SampL]; - bezCompF[bez_SampL] = 0.0; - bezCompF[bez_CR] = bezCompF[bez_BR]; - bezCompF[bez_BR] = bezCompF[bez_AR]; - bezCompF[bez_AR] = bezCompF[bez_SampR]; - bezCompF[bez_SampR] = 0.0; - bezMaxF = 0.0; - } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - bezCompS[bez_CL] = bezCompS[bez_BL]; - bezCompS[bez_BL] = bezCompS[bez_AL]; - bezCompS[bez_AL] = bezCompS[bez_SampL]; - bezCompS[bez_SampL] = 0.0; - bezCompS[bez_CR] = bezCompS[bez_BR]; - bezCompS[bez_BR] = bezCompS[bez_AR]; - bezCompS[bez_AR] = bezCompS[bez_SampR]; - bezCompS[bez_SampR] = 0.0; - } - double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]); - double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]); - double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5; - double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]); - double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]); - double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5; - double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - //Dynamics2 + bezCompF[bez_cycle] += bezRez; + bezCompF[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * bezRez); + if (bezCompF[bez_cycle] > 1.0) { + bezCompF[bez_cycle] -= 1.0; + bezCompF[bez_C] = bezCompF[bez_B]; + bezCompF[bez_B] = bezCompF[bez_A]; + bezCompF[bez_A] = bezCompF[bez_Ctrl]; + bezCompF[bez_Ctrl] = 0.0; + } + bezCompS[bez_cycle] += sloRez; + bezCompS[bez_Ctrl] += (fmax(fabs(inputSampleL),fabs(inputSampleR)) * sloRez); + if (bezCompS[bez_cycle] > 1.0) { + bezCompS[bez_cycle] -= 1.0; + bezCompS[bez_C] = bezCompS[bez_B]; + bezCompS[bez_B] = bezCompS[bez_A]; + bezCompS[bez_A] = bezCompS[bez_Ctrl]; + bezCompS[bez_Ctrl] = 0.0; + } + double CBF = (bezCompF[bez_C]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_B]*bezCompF[bez_cycle]); + double BAF = (bezCompF[bez_B]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_A]*bezCompF[bez_cycle]); + double CBAF = (bezCompF[bez_B]+(CBF*(1.0-bezCompF[bez_cycle]))+(BAF*bezCompF[bez_cycle]))*0.5; + double CBS = (bezCompS[bez_C]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_B]*bezCompS[bez_cycle]); + double BAS = (bezCompS[bez_B]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_A]*bezCompS[bez_cycle]); + double CBAS = (bezCompS[bez_B]+(CBS*(1.0-bezCompS[bez_cycle]))+(BAS*bezCompS[bez_cycle]))*0.5; + double CBAMax = fmax(CBAS,CBAF); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; + double CBAFade = ((CBAS*-CBAMax)+(CBAF*CBAMax)+1.0)*0.5; + inputSampleL *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + inputSampleR *= 1.0-(fmin(((CBAS*(1.0-CBAFade))+(CBAF*CBAFade))*bezCThresh,1.0)); + } else {bezCompF[bez_Ctrl] = 0.0; bezCompS[bez_Ctrl] = 0.0;} + //Dynamics2 custom version for buss const double temp = (double)sampleFrames/inFramesToProcess; double gainR = (panA*temp)+(panB*(1.0-temp)); @@ -860,48 +828,39 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs darkSampleL /= 2.0; darkSampleR /= 2.0; } avgPos++; lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - //begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.92; - //end TapeHack section + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double sat = inputSampleL * X; + inputSampleL -= (sat*0.125); sat *= X; + inputSampleL += (sat*0.0078125); sat *= X; + inputSampleL -= (sat*0.000244140625); sat *= X; + inputSampleL += (sat*0.000003814697265625); sat *= X; + inputSampleL -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function - //begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.92; - //end TapeHack section - //Discontapeity + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + X = inputSampleR * inputSampleR; + sat = inputSampleR * X; + inputSampleR -= (sat*0.125); sat *= X; + inputSampleR += (sat*0.0078125); sat *= X; + inputSampleR -= (sat*0.000244140625); sat *= X; + inputSampleR += (sat*0.000003814697265625); sat *= X; + inputSampleR -= (sat*0.0000000298023223876953125); sat *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function + + //we are leaving it as a clip that will go over 0dB. + //it is a softclip so it will give you a more forgiving experience, + //but you are meant to not drive the softclip for just level. //begin 64 bit stereo floating point dither //int expon; frexp((double)inputSampleL, &expon); diff --git a/plugins/WinVST/ConsoleX2Channel/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleX2Channel/.vs/VSTProject/v14/.suo index 1c0479a7da70a3ffea6ba8b22a8d59a97498319b..9ebf862f4834d0086c267e88943a321915322260 100755 GIT binary patch delta 110 zcmZqJ!q~8daYGIhTSJ75b#nIRBBo!=a5mc|KX)?*7Y0iPLk1@XBOq|N*IR# diff --git a/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.cpp b/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.cpp index 1d253c15a..2129cd918 100755 --- a/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.cpp +++ b/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.cpp @@ -12,24 +12,24 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - A = 0.25; - B = 0.0; - C = 0.5; - D = 0.5; - E = 0.5; - F = 0.5; - G = 0.5; - H = 0.5; - I = 0.5; - J = 0.5; - K = 1.0; - L = 0.5; - M = 0.5; - N = 0.0; - O = 1.0; - P = 0.0; - Q = 0.5; - R = 0.5; + TRM = 0.25; + MOR = 0.0; + HIG = 0.5; + HMG = 0.5; + LMG = 0.5; + BSG = 0.5; + HIF = 0.5; + HMF = 0.5; + LMF = 0.5; + BSF = 0.5; + THR = 1.0; + ATK = 0.5; + RLS = 0.5; + GAT = 0.0; + LOP = 1.0; + HIP = 0.0; + PAN = 0.5; + FAD = 0.5; for (int x = 0; x < biq_total; x++) { highA[x] = 0.0; @@ -50,10 +50,10 @@ ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) : lowRIIR = 0.0; //SmoothEQ2 - for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;} - bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0; - bezCompS[bez_cycle] = 1.0; bezGate = 2.0; - //Dynamics2 + for (int x = 0; x < bez_total; x++) bezComp[x] = 0.0; + bezComp[bez_cycle] = 1.0; bezMax = 0.0; bezMin = 0.0; + bezGate = 2.0; + //Dynamics3 for(int count = 0; count < 22; count++) { iirHPositionL[count] = 0.0; @@ -130,24 +130,24 @@ static float pinParameter(float data) VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) { float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); - chunkData[0] = A; - chunkData[1] = B; - chunkData[2] = C; - chunkData[3] = D; - chunkData[4] = E; - chunkData[5] = F; - chunkData[6] = G; - chunkData[7] = H; - chunkData[8] = I; - chunkData[9] = J; - chunkData[10] = K; - chunkData[11] = L; - chunkData[12] = M; - chunkData[13] = N; - chunkData[14] = O; - chunkData[15] = P; - chunkData[16] = Q; - chunkData[17] = R; + chunkData[0] = TRM; + chunkData[1] = MOR; + chunkData[2] = HIG; + chunkData[3] = HMG; + chunkData[4] = LMG; + chunkData[5] = BSG; + chunkData[6] = HIF; + chunkData[7] = HMF; + chunkData[8] = LMF; + chunkData[9] = BSF; + chunkData[10] = THR; + chunkData[11] = ATK; + chunkData[12] = RLS; + chunkData[13] = GAT; + chunkData[14] = LOP; + chunkData[15] = HIP; + chunkData[16] = PAN; + chunkData[17] = FAD; /* Note: The way this is set up, it will break if you manage to save settings on an Intel machine and load them on a PPC Mac. However, it's fine if you stick to the machine you started with. */ @@ -159,24 +159,24 @@ VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset) VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPreset) { float *chunkData = (float *)data; - A = pinParameter(chunkData[0]); - B = pinParameter(chunkData[1]); - C = pinParameter(chunkData[2]); - D = pinParameter(chunkData[3]); - E = pinParameter(chunkData[4]); - F = pinParameter(chunkData[5]); - G = pinParameter(chunkData[6]); - H = pinParameter(chunkData[7]); - I = pinParameter(chunkData[8]); - J = pinParameter(chunkData[9]); - K = pinParameter(chunkData[10]); - L = pinParameter(chunkData[11]); - M = pinParameter(chunkData[12]); - N = pinParameter(chunkData[13]); - O = pinParameter(chunkData[14]); - P = pinParameter(chunkData[15]); - Q = pinParameter(chunkData[16]); - R = pinParameter(chunkData[17]); + TRM = pinParameter(chunkData[0]); + MOR = pinParameter(chunkData[1]); + HIG = pinParameter(chunkData[2]); + HMG = pinParameter(chunkData[3]); + LMG = pinParameter(chunkData[4]); + BSG = pinParameter(chunkData[5]); + HIF = pinParameter(chunkData[6]); + HMF = pinParameter(chunkData[7]); + LMF = pinParameter(chunkData[8]); + BSF = pinParameter(chunkData[9]); + THR = pinParameter(chunkData[10]); + ATK = pinParameter(chunkData[11]); + RLS = pinParameter(chunkData[12]); + GAT = pinParameter(chunkData[13]); + LOP = pinParameter(chunkData[14]); + HIP = pinParameter(chunkData[15]); + PAN = pinParameter(chunkData[16]); + FAD = pinParameter(chunkData[17]); /* We're ignoring byteSize as we found it to be a filthy liar */ /* calculate any other fields you need here - you could copy in @@ -186,120 +186,120 @@ VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPrese void ConsoleX2Channel::setParameter(VstInt32 index, float value) { switch (index) { - case kParamA: A = value; break; - case kParamB: B = value; break; - case kParamC: C = value; break; - case kParamD: D = value; break; - case kParamE: E = value; break; - case kParamF: F = value; break; - case kParamG: G = value; break; - case kParamH: H = value; break; - case kParamI: I = value; break; - case kParamJ: J = value; break; - case kParamK: K = value; break; - case kParamL: L = value; break; - case kParamM: M = value; break; - case kParamN: N = value; break; - case kParamO: O = value; break; - case kParamP: P = value; break; - case kParamQ: Q = value; break; - case kParamR: R = value; break; + case kParamTRM: TRM = value; break; + case kParamMOR: MOR = value; break; + case kParamHIG: HIG = value; break; + case kParamHMG: HMG = value; break; + case kParamLMG: LMG = value; break; + case kParamBSG: BSG = value; break; + case kParamHIF: HIF = value; break; + case kParamHMF: HMF = value; break; + case kParamLMF: LMF = value; break; + case kParamBSF: BSF = value; break; + case kParamTHR: THR = value; break; + case kParamATK: ATK = value; break; + case kParamRLS: RLS = value; break; + case kParamGAT: GAT = value; break; + case kParamLOP: LOP = value; break; + case kParamHIP: HIP = value; break; + case kParamPAN: PAN = value; break; + case kParamFAD: FAD = value; break; default: throw; // unknown parameter, shouldn't happen! } } float ConsoleX2Channel::getParameter(VstInt32 index) { switch (index) { - case kParamA: return A; break; - case kParamB: return B; break; - case kParamC: return C; break; - case kParamD: return D; break; - case kParamE: return E; break; - case kParamF: return F; break; - case kParamG: return G; break; - case kParamH: return H; break; - case kParamI: return I; break; - case kParamJ: return J; break; - case kParamK: return K; break; - case kParamL: return L; break; - case kParamM: return M; break; - case kParamN: return N; break; - case kParamO: return O; break; - case kParamP: return P; break; - case kParamQ: return Q; break; - case kParamR: return R; break; + case kParamTRM: return TRM; break; + case kParamMOR: return MOR; break; + case kParamHIG: return HIG; break; + case kParamHMG: return HMG; break; + case kParamLMG: return LMG; break; + case kParamBSG: return BSG; break; + case kParamHIF: return HIF; break; + case kParamHMF: return HMF; break; + case kParamLMF: return LMF; break; + case kParamBSF: return BSF; break; + case kParamTHR: return THR; break; + case kParamATK: return ATK; break; + case kParamRLS: return RLS; break; + case kParamGAT: return GAT; break; + case kParamLOP: return LOP; break; + case kParamHIP: return HIP; break; + case kParamPAN: return PAN; break; + case kParamFAD: return FAD; break; default: break; // unknown parameter, shouldn't happen! } return 0.0; //we only need to update the relevant name, this is simple to manage } void ConsoleX2Channel::getParameterName(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "More", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "High", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this is our labels for displaying in the VST host } void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break; - case kParamB: float2string (B, text, kVstMaxParamStrLen); break; - case kParamC: float2string (C, text, kVstMaxParamStrLen); break; - case kParamD: float2string (D, text, kVstMaxParamStrLen); break; - case kParamE: float2string (E, text, kVstMaxParamStrLen); break; - case kParamF: float2string (F, text, kVstMaxParamStrLen); break; - case kParamG: float2string (G, text, kVstMaxParamStrLen); break; - case kParamH: float2string (H, text, kVstMaxParamStrLen); break; - case kParamI: float2string (I, text, kVstMaxParamStrLen); break; - case kParamJ: float2string (J, text, kVstMaxParamStrLen); break; - case kParamK: float2string (K, text, kVstMaxParamStrLen); break; - case kParamL: float2string (L, text, kVstMaxParamStrLen); break; - case kParamM: float2string (M, text, kVstMaxParamStrLen); break; - case kParamN: float2string (N, text, kVstMaxParamStrLen); break; - case kParamO: float2string (O, text, kVstMaxParamStrLen); break; - case kParamP: float2string (P, text, kVstMaxParamStrLen); break; - case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break; - case kParamR: float2string (R, text, kVstMaxParamStrLen); break; + case kParamTRM: int2string ((int)(TRM*4.0), text, kVstMaxParamStrLen); break; + case kParamMOR: float2string (MOR, text, kVstMaxParamStrLen); break; + case kParamHIG: float2string (HIG, text, kVstMaxParamStrLen); break; + case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break; + case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break; + case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break; + case kParamHIF: float2string (HIF, text, kVstMaxParamStrLen); break; + case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break; + case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break; + case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break; + case kParamTHR: float2string (THR, text, kVstMaxParamStrLen); break; + case kParamATK: float2string (ATK, text, kVstMaxParamStrLen); break; + case kParamRLS: float2string (RLS, text, kVstMaxParamStrLen); break; + case kParamGAT: float2string (GAT, text, kVstMaxParamStrLen); break; + case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break; + case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break; + case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break; + case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } //this displays the values and handles 'popups' where it's discrete choices } void ConsoleX2Channel::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; - case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; - case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; - case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; - case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break; - case kParamR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTRM: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamMOR: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIG: vst_strncpy (text, "eq", kVstMaxParamStrLen); break; + case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamHIF: vst_strncpy (text, "freq", kVstMaxParamStrLen); break; + case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamTHR: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break; + case kParamATK: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamRLS: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamGAT: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamLOP: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break; + case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.h b/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.h index 7862eafbc..2b57ebb85 100755 --- a/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.h +++ b/plugins/WinVST/ConsoleX2Channel/ConsoleX2Channel.h @@ -16,24 +16,24 @@ #include enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, - kParamR =17, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamPAN =16, + kParamFAD =17, kNumParameters = 18 }; // const int dscBuf = 256; @@ -70,24 +70,24 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; - float R; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float PAN; + float FAD; enum { biq_freq, @@ -123,26 +123,18 @@ private: //SmoothEQ2 enum { - bez_AL, - bez_BL, - bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, - bez_AR, - bez_BR, - bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_A, + bez_B, + bez_C, + bez_Ctrl, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; + double bezComp[bez_total]; + double bezMax; + double bezMin; double bezGate; - //Dynamics2 + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/WinVST/ConsoleX2Channel/ConsoleX2ChannelProc.cpp b/plugins/WinVST/ConsoleX2Channel/ConsoleX2ChannelProc.cpp index 906bc23a4..127bf13bc 100755 --- a/plugins/WinVST/ConsoleX2Channel/ConsoleX2ChannelProc.cpp +++ b/plugins/WinVST/ConsoleX2Channel/ConsoleX2ChannelProc.cpp @@ -21,149 +21,158 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -173,307 +182,265 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -525,7 +492,7 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3 } //blank out lowpass if just switched off } //Cabs2 - + double gainR = (panA*temp)+(panB*(1.0-temp)); double gainL = 1.57079633-gainR; gainR = sin(gainR); gainL = sin(gainL); @@ -581,149 +548,158 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - panA = panB; panB = Q*1.57079633; - inTrimA = inTrimB; inTrimB = R*2.0; + panA = panB; panB = PAN*1.57079633; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -733,307 +709,265 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs, if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); - - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); - } - - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + if (bezThresh > 0.0) { + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } else bezComp[bez_Ctrl] = 0.0; + //Dynamics3 const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/WinVST/ConsoleX2Pre/.vs/VSTProject/v14/.suo b/plugins/WinVST/ConsoleX2Pre/.vs/VSTProject/v14/.suo index b669ee9cce30a545512152648d6d4998dec16ba2..51f09da941de3d1524d6cfe30e570902409e000c 100755 GIT binary patch delta 346 zcmZqJ!q~8ZaYGIhZ@`1w50kU+Fe)%GFf>fAWU6LN-Tak_nUPU`@=xZ~oZ3KP9U#`) zyq0A@Bf4rfWYz4>j9QazIkFiACMU88Z%lAu+{9(U$n)?2|NkHy2sCA~3%7|VOaMkF z10_->Pvp*@n7}fLr-U(Saw$(eW8&nmKr&%-DeqzO%n*Q^F}YOmKcoNVQlWYd#`wu! zrT#MpZ2l@;&jb>a>tcadzHCq?8jPEv9J0Cf?PDF6Tf delta 440 zcmZqJz}T>baYGIh?}7}O%S_gH7!?>87!FLXWU6LN+x(S@nUOJg@=xZ~oLWF(Z6Ma! zyq0A@Bf4rfWYz4>jM|fJIkH**1A)NgL>A%A2RJI2c>ICd{{e+Sc(Mz(iDW#I08AnU zD3&_8mpgwFPYGl4aAh!HaA9y}Fb1+*7|a=T8O(q@X9h enum { - kParamA =0, - kParamB =1, - kParamC =2, - kParamD =3, - kParamE =4, - kParamF =5, - kParamG =6, - kParamH =7, - kParamI =8, - kParamJ =9, - kParamK =10, - kParamL =11, - kParamM =12, - kParamN =13, - kParamO =14, - kParamP =15, - kParamQ =16, + kParamTRM =0, + kParamMOR =1, + kParamHIG =2, + kParamHMG =3, + kParamLMG =4, + kParamBSG =5, + kParamHIF =6, + kParamHMF =7, + kParamLMF =8, + kParamBSF =9, + kParamTHR =10, + kParamATK =11, + kParamRLS =12, + kParamGAT =13, + kParamLOP =14, + kParamHIP =15, + kParamFAD =16, kNumParameters = 17 }; // const int dscBuf = 256; @@ -69,23 +69,23 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - float A; - float B; - float C; - float D; - float E; - float F; - float G; - float H; - float I; - float J; - float K; - float L; - float M; - float N; - float O; - float P; - float Q; + float TRM; + float MOR; + float HIG; + float HMG; + float LMG; + float BSG; + float HIF; + float HMF; + float LMF; + float BSF; + float THR; + float ATK; + float RLS; + float GAT; + float LOP; + float HIP; + float FAD; enum { biq_freq, @@ -124,23 +124,22 @@ private: bez_AL, bez_BL, bez_CL, - bez_InL, - bez_UnInL, - bez_SampL, + bez_CtrlL, bez_AR, bez_BR, bez_CR, - bez_InR, - bez_UnInR, - bez_SampR, + bez_CtrlR, bez_cycle, bez_total }; //the new undersampling. bez signifies the bezier curve reconstruction - double bezCompF[bez_total]; - double bezMaxF; - double bezCompS[bez_total]; - double bezGate; - //Dynamics2 + double bezComp[bez_total]; + double bezMaxL; + double bezMinL; + double bezGateL; + double bezMaxR; + double bezMinR; + double bezGateR; + //Dynamics3 double iirHPositionL[23]; double iirHAngleL[23]; diff --git a/plugins/WinVST/ConsoleX2Pre/ConsoleX2PreProc.cpp b/plugins/WinVST/ConsoleX2Pre/ConsoleX2PreProc.cpp index 4c8abed86..18ab0486d 100755 --- a/plugins/WinVST/ConsoleX2Pre/ConsoleX2PreProc.cpp +++ b/plugins/WinVST/ConsoleX2Pre/ConsoleX2PreProc.cpp @@ -21,148 +21,157 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - - inTrimA = inTrimB; inTrimB = Q*2.0; + + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -172,309 +181,285 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); @@ -526,7 +511,7 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa } //blank out lowpass if just switched off } //Cabs2 - + double gain = (inTrimA*temp)+(inTrimB*(1.0-temp)); if (gain > 1.0) gain *= gain; if (gain < 1.0) gain = 1.0-pow(1.0-gain,2); @@ -567,149 +552,158 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst overallscale *= getSampleRate(); int spacing = floor(overallscale*2.0); if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32; - - double moreTapeHack = (B*2.0)+1.0; - switch ((int)(A*4.0)){ + + double moreTapeHack = (MOR*2.0)+1.0; + bool tapehackOff = (MOR == 0.0); + switch ((int)TRM){ case 0: moreTapeHack *= 0.5; break; case 1: break; case 2: moreTapeHack *= 2.0; break; case 3: moreTapeHack *= 4.0; break; case 4: moreTapeHack *= 8.0; break; } - double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001); + double moreDiscontinuity = fmax(pow(MOR*0.42,3.0)*overallscale,0.00001); //Discontapeity - double trebleGain = (C-0.5)*2.0; + double trebleGain = (HIG-0.5)*2.0; trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain)); - double highmidGain = (D-0.5)*2.0; + double highmidGain = (HMG-0.5)*2.0; highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain)); - double lowmidGain = (E-0.5)*2.0; + double lowmidGain = (LMG-0.5)*2.0; lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain)); - double bassGain = (F-0.5)*2.0; + double bassGain = (BSG-0.5)*2.0; bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain)); + double highCoef = 0.0; + double midCoef = 0.0; + double lowCoef = 0.0; - double trebleRef = G-0.5; - double highmidRef = H-0.5; - double lowmidRef = I-0.5; - double bassRef = J-0.5; - double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); - double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); - double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); - - double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); - double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); - double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); - - highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); - highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); - double highFreq = pow(highF,3)*20000.0; - double omega = 2.0*M_PI*(highFreq/getSampleRate()); - double biqK = 2.0-cos(omega); - double highCoef = -sqrt((biqK*biqK)-1.0)+biqK; - highA[biq_reso] = 2.24697960 * highQ; - highB[biq_reso] = 0.80193774 * highQ; - highC[biq_reso] = 0.55495813 * highQ; - - midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); - midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); - double midFreq = pow(midF,3)*20000.0; - omega = 2.0*M_PI*(midFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double midCoef = -sqrt((biqK*biqK)-1.0)+biqK; - midA[biq_reso] = 2.24697960 * midQ; - midB[biq_reso] = 0.80193774 * midQ; - midC[biq_reso] = 0.55495813 * midQ; - - lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); - lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); - double lowFreq = pow(bassF,3)*20000.0; - omega = 2.0*M_PI*(lowFreq/getSampleRate()); - biqK = 2.0-cos(omega); - double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; - lowA[biq_reso] = 2.24697960 * lowQ; - lowB[biq_reso] = 0.80193774 * lowQ; - lowC[biq_reso] = 0.55495813 * lowQ; - - biqK = tan(M_PI * highA[biq_freq]); - double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); - highA[biq_a0] = biqK * biqK * norm; - highA[biq_a1] = 2.0 * highA[biq_a0]; - highA[biq_a2] = highA[biq_a0]; - highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highB[biq_freq]); - norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); - highB[biq_a0] = biqK * biqK * norm; - highB[biq_a1] = 2.0 * highB[biq_a0]; - highB[biq_a2] = highB[biq_a0]; - highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * highC[biq_freq]); - norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); - highC[biq_a0] = biqK * biqK * norm; - highC[biq_a1] = 2.0 * highC[biq_a0]; - highC[biq_a2] = highC[biq_a0]; - highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * midA[biq_freq]); - norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); - midA[biq_a0] = biqK * biqK * norm; - midA[biq_a1] = 2.0 * midA[biq_a0]; - midA[biq_a2] = midA[biq_a0]; - midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midB[biq_freq]); - norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); - midB[biq_a0] = biqK * biqK * norm; - midB[biq_a1] = 2.0 * midB[biq_a0]; - midB[biq_a2] = midB[biq_a0]; - midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * midC[biq_freq]); - norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); - midC[biq_a0] = biqK * biqK * norm; - midC[biq_a1] = 2.0 * midC[biq_a0]; - midC[biq_a2] = midC[biq_a0]; - midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; - - biqK = tan(M_PI * lowA[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); - lowA[biq_a0] = biqK * biqK * norm; - lowA[biq_a1] = 2.0 * lowA[biq_a0]; - lowA[biq_a2] = lowA[biq_a0]; - lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowB[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); - lowB[biq_a0] = biqK * biqK * norm; - lowB[biq_a1] = 2.0 * lowB[biq_a0]; - lowB[biq_a2] = lowB[biq_a0]; - lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; - biqK = tan(M_PI * lowC[biq_freq]); - norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); - lowC[biq_a0] = biqK * biqK * norm; - lowC[biq_a1] = 2.0 * lowC[biq_a0]; - lowC[biq_a2] = lowC[biq_a0]; - lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; - lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + bool eqOff = (trebleGain == 1.0 && highmidGain == 1.0 && lowmidGain == 1.0 && bassGain == 1.0); + //we get to completely bypass EQ if we're truly not using it. The mechanics of it mean that + //it cancels out to bit-identical anyhow, but we get to skip the calculation + if (!eqOff) { + double trebleRef = HIF-0.5; + double highmidRef = HMF-0.5; + double lowmidRef = LMF-0.5; + double bassRef = BSF-0.5; + double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125); + double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125); + double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125); + + double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125); + double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125); + double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125); + + highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate()); + highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025); + double highFreq = pow(highF,3)*20000.0; + double omega = 2.0*M_PI*(highFreq/getSampleRate()); + double biqK = 2.0-cos(omega); + highCoef = -sqrt((biqK*biqK)-1.0)+biqK; + highA[biq_reso] = 2.24697960 * highQ; + highB[biq_reso] = 0.80193774 * highQ; + highC[biq_reso] = 0.55495813 * highQ; + + midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate()); + midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025); + double midFreq = pow(midF,3)*20000.0; + omega = 2.0*M_PI*(midFreq/getSampleRate()); + biqK = 2.0-cos(omega); + midCoef = -sqrt((biqK*biqK)-1.0)+biqK; + midA[biq_reso] = 2.24697960 * midQ; + midB[biq_reso] = 0.80193774 * midQ; + midC[biq_reso] = 0.55495813 * midQ; + + lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate()); + lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025); + double lowFreq = pow(bassF,3)*20000.0; + omega = 2.0*M_PI*(lowFreq/getSampleRate()); + biqK = 2.0-cos(omega); + lowCoef = -sqrt((biqK*biqK)-1.0)+biqK; + lowA[biq_reso] = 2.24697960 * lowQ; + lowB[biq_reso] = 0.80193774 * lowQ; + lowC[biq_reso] = 0.55495813 * lowQ; + + biqK = tan(M_PI * highA[biq_freq]); + double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK); + highA[biq_a0] = biqK * biqK * norm; + highA[biq_a1] = 2.0 * highA[biq_a0]; + highA[biq_a2] = highA[biq_a0]; + highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highB[biq_freq]); + norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK); + highB[biq_a0] = biqK * biqK * norm; + highB[biq_a1] = 2.0 * highB[biq_a0]; + highB[biq_a2] = highB[biq_a0]; + highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * highC[biq_freq]); + norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK); + highC[biq_a0] = biqK * biqK * norm; + highC[biq_a1] = 2.0 * highC[biq_a0]; + highC[biq_a2] = highC[biq_a0]; + highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * midA[biq_freq]); + norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK); + midA[biq_a0] = biqK * biqK * norm; + midA[biq_a1] = 2.0 * midA[biq_a0]; + midA[biq_a2] = midA[biq_a0]; + midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midB[biq_freq]); + norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK); + midB[biq_a0] = biqK * biqK * norm; + midB[biq_a1] = 2.0 * midB[biq_a0]; + midB[biq_a2] = midB[biq_a0]; + midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * midC[biq_freq]); + norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK); + midC[biq_a0] = biqK * biqK * norm; + midC[biq_a1] = 2.0 * midC[biq_a0]; + midC[biq_a2] = midC[biq_a0]; + midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm; + + biqK = tan(M_PI * lowA[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK); + lowA[biq_a0] = biqK * biqK * norm; + lowA[biq_a1] = 2.0 * lowA[biq_a0]; + lowA[biq_a2] = lowA[biq_a0]; + lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowB[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK); + lowB[biq_a0] = biqK * biqK * norm; + lowB[biq_a1] = 2.0 * lowB[biq_a0]; + lowB[biq_a2] = lowB[biq_a0]; + lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm; + biqK = tan(M_PI * lowC[biq_freq]); + norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK); + lowC[biq_a0] = biqK * biqK * norm; + lowC[biq_a1] = 2.0 * lowC[biq_a0]; + lowC[biq_a2] = lowC[biq_a0]; + lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm; + lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm; + } //SmoothEQ2 - double bezCThresh = pow(1.0-K, 6.0) * 8.0; - double bezRez = pow(1.0-L, 8.0) / overallscale; - double sloRez = pow(1.0-M,12.0) / overallscale; - sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0); + double bezThresh = pow(1.0-THR, 4.0) * 8.0; + double bezRez = pow(1.0-ATK, 4.0) / overallscale; + double sloRez = pow(1.0-RLS, 4.0) / overallscale; + double gate = pow(GAT,4.0); bezRez = fmin(fmax(bezRez,0.0001),1.0); - double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0)); - //Dynamics2 + sloRez = fmin(fmax(sloRez,0.0001),1.0); + //Dynamics3 - lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass - hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass + lFreqA = lFreqB; lFreqB = pow(fmax(LOP,0.002),overallscale); //the lowpass + hFreqA = hFreqB; hFreqB = pow(HIP,overallscale+2.0); //the highpass //Cabs2 - inTrimA = inTrimB; inTrimB = Q*2.0; + inTrimA = inTrimB; inTrimB = FAD*2.0; //Console while (--sampleFrames >= 0) @@ -718,310 +712,286 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleR = *in2; if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; - - double darkSampleL = inputSampleL; - double darkSampleR = inputSampleR; - if (avgPos > 31) avgPos = 0; - if (spacing > 31) { - avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} - darkSampleL /= 32.0; darkSampleR /= 32.0; - } if (spacing > 15) { - avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} - darkSampleL /= 16.0; darkSampleR /= 16.0; - } if (spacing > 7) { - avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} - darkSampleL /= 8.0; darkSampleR /= 8.0; - } if (spacing > 3) { - avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} - darkSampleL /= 4.0; darkSampleR /= 4.0; - } if (spacing > 1) { - avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; - darkSampleL = 0.0; darkSampleR = 0.0; - for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} - darkSampleL /= 2.0; darkSampleR /= 2.0; - } avgPos++; - lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; - double avgSlewL = fmin(lastSlewL,1.0); - lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); - lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; - double avgSlewR = fmin(lastSlewR,1.0); - lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool - inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); - inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); - - //begin Discontinuity section + inputSampleL *= moreTapeHack; - inputSampleL *= moreDiscontinuity; - dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); - dBaPosL = fmin(dBaPosL,1.0); - int dBdly = floor(dBaPosL*dscBuf); - double dBi = (dBaPosL*dscBuf)-dBdly; - inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; - dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; - inputSampleL /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908); - double addtwo = inputSampleL * inputSampleL; - double empower = inputSampleL * addtwo; // inputSampleL to the third power - inputSampleL -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleL += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleL -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleL += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleL -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleL *= 0.9239; - //end TapeHack section - - //begin Discontinuity section inputSampleR *= moreTapeHack; - inputSampleR *= moreDiscontinuity; - dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); - dBaPosR = fmin(dBaPosR,1.0); - dBdly = floor(dBaPosR*dscBuf); - dBi = (dBaPosR*dscBuf)-dBdly; - inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); - dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; - dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; - inputSampleR /= moreDiscontinuity; - //end Discontinuity section, begin TapeHack section - inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908); - addtwo = inputSampleR * inputSampleR; - empower = inputSampleR * addtwo; // inputSampleR to the third power - inputSampleR -= (empower / 6.0); - empower *= addtwo; // to the fifth power - inputSampleR += (empower / 69.0); - empower *= addtwo; //seventh - inputSampleR -= (empower / 2530.08); - empower *= addtwo; //ninth - inputSampleR += (empower / 224985.6); - empower *= addtwo; //eleventh - inputSampleR -= (empower / 9979200.0f); - //this is a degenerate form of a Taylor Series to approximate sin() - inputSampleR *= 0.9239; - //end TapeHack section - //Discontapeity + //trim control gets to work even when MORE is off - double trebleL = inputSampleL; - double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; - highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; - highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidL = outSample; trebleL -= highmidL; + if (!tapehackOff) { + double darkSampleL = inputSampleL; + double darkSampleR = inputSampleR; + if (avgPos > 31) avgPos = 0; + if (spacing > 31) { + avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];} + darkSampleL /= 32.0; darkSampleR /= 32.0; + } if (spacing > 15) { + avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];} + darkSampleL /= 16.0; darkSampleR /= 16.0; + } if (spacing > 7) { + avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];} + darkSampleL /= 8.0; darkSampleR /= 8.0; + } if (spacing > 3) { + avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];} + darkSampleL /= 4.0; darkSampleR /= 4.0; + } if (spacing > 1) { + avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR; + darkSampleL = 0.0; darkSampleR = 0.0; + for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];} + darkSampleL /= 2.0; darkSampleR /= 2.0; + } avgPos++; + lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL; + double avgSlewL = fmin(lastSlewL*lastSlewL*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); + lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR; + double avgSlewR = fmin(lastSlewR*lastSlewR*(0.0635-(overallscale*0.0018436)),1.0); + lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool + inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL); + inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR); + //begin Discontinuity section + inputSampleL *= moreDiscontinuity; + dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5); + dBaPosL = fmin(dBaPosL,1.0); + int dBdly = floor(dBaPosL*dscBuf); + double dBi = (dBaPosL*dscBuf)-dBdly; + inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi; + dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0; + inputSampleL /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908); + double addtwo = inputSampleL * inputSampleL; + double empower = inputSampleL * addtwo; // inputSampleL to the third power + inputSampleL -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleL += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleL -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleL += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleL -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //begin Discontinuity section + inputSampleR *= moreDiscontinuity; + dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5); + dBaPosR = fmin(dBaPosR,1.0); + dBdly = floor(dBaPosR*dscBuf); + dBi = (dBaPosR*dscBuf)-dBdly; + inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi); + dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi; + dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0; + inputSampleR /= moreDiscontinuity; + //end Discontinuity section, begin TapeHack section + inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908); + addtwo = inputSampleR * inputSampleR; + empower = inputSampleR * addtwo; // inputSampleR to the third power + inputSampleR -= (empower / 6.0); + empower *= addtwo; // to the fifth power + inputSampleR += (empower / 69.0); + empower *= addtwo; //seventh + inputSampleR -= (empower / 2530.08); + empower *= addtwo; //ninth + inputSampleR += (empower / 224985.6); + empower *= addtwo; //eleventh + inputSampleR -= (empower / 9979200.0f); + //this is a degenerate form of a Taylor Series to approximate sin() + //end TapeHack section + //Discontapeity + } - outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; - midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; - midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; - lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; - lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //first stage of three crossovers - - outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; - highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; - highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; - midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; - midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; - lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; - lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //second stage of three crossovers - - outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; - highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; - highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidL = outSample; trebleL -= highmidL; - - outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; - midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; - midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidL = outSample; highmidL -= lowmidL; - - outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; - lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; - lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassL = outSample; lowmidL -= bassL; - - trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //third stage of three crossovers - - highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); - highmidL = highLIIR; trebleL -= highmidL; - - midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); - lowmidL = midLIIR; highmidL -= lowmidL; - - lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); - bassL = lowLIIR; lowmidL -= bassL; - - inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); - //fourth stage of three crossovers is the exponential filters - - - double trebleR = inputSampleR; - outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; - highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; - highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); - double highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; - midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; - midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); - double lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; - lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; - lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); - double bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //first stage of three crossovers - - outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; - highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; - highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; - midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; - midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; - lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; - lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //second stage of three crossovers - - outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; - highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; - highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); - highmidR = outSample; trebleR -= highmidR; - - outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; - midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; - midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); - lowmidR = outSample; highmidR -= lowmidR; - - outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; - lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; - lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); - bassR = outSample; lowmidR -= bassR; - - trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //third stage of three crossovers - - highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); - highmidR = highRIIR; trebleR -= highmidR; - - midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); - lowmidR = midRIIR; highmidR -= lowmidR; - - lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); - bassR = lowRIIR; lowmidR -= bassR; - - inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); - //fourth stage of three crossovers is the exponential filters + if (!eqOff) { + double trebleL = inputSampleL; + double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1]; + highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2]; + highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1]; + midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2]; + midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1]; + lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2]; + lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //first stage of three crossovers + + outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1]; + highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2]; + highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1]; + midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2]; + midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1]; + lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2]; + lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //second stage of three crossovers + + outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1]; + highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2]; + highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidL = outSample; trebleL -= highmidL; + + outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1]; + midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2]; + midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidL = outSample; highmidL -= lowmidL; + + outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1]; + lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2]; + lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassL = outSample; lowmidL -= bassL; + + trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //third stage of three crossovers + + highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef)); + highmidL = highLIIR; trebleL -= highmidL; + + midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef)); + lowmidL = midLIIR; highmidL -= lowmidL; + + lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef)); + bassL = lowLIIR; lowmidL -= bassL; + + inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain); + //fourth stage of three crossovers is the exponential filters + + + double trebleR = inputSampleR; + outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1]; + highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2]; + highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]); + double highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1]; + midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2]; + midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]); + double lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1]; + lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2]; + lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]); + double bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //first stage of three crossovers + + outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1]; + highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2]; + highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1]; + midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2]; + midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1]; + lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2]; + lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //second stage of three crossovers + + outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1]; + highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2]; + highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]); + highmidR = outSample; trebleR -= highmidR; + + outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1]; + midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2]; + midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]); + lowmidR = outSample; highmidR -= lowmidR; + + outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1]; + lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2]; + lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]); + bassR = outSample; lowmidR -= bassR; + + trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //third stage of three crossovers + + highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef)); + highmidR = highRIIR; trebleR -= highmidR; + + midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef)); + lowmidR = midRIIR; highmidR -= lowmidR; + + lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef)); + bassR = lowRIIR; lowmidR -= bassR; + + inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain); + //fourth stage of three crossovers is the exponential filters + } //SmoothEQ2 - if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale); - else bezGate = fmax(0.0, bezGate-(sloRez*sloRez)); + if (fabs(inputSampleL) > gate) bezGateL = overallscale/fmin(bezRez,sloRez); + else bezGateL = fmax(0.000001, bezGateL-fmin(bezRez,sloRez)); - if (bezCThresh > 0.0) { - inputSampleL *= ((bezCThresh*0.5)+1.0); - inputSampleR *= ((bezCThresh*0.5)+1.0); + if (fabs(inputSampleR) > gate) bezGateR = overallscale/fmin(bezRez,sloRez); + else bezGateR = fmax(0.000001, bezGateR-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } //makeup gain + + bezMaxL = fmax(bezMaxL,fabs(inputSampleL)); + bezMinL = fmax(bezMinL-sloRez,fabs(inputSampleL)); + bezMaxR = fmax(bezMaxR,fabs(inputSampleR)); + bezMinR = fmax(bezMinR-sloRez,fabs(inputSampleR)); + bezComp[bez_cycle] += bezRez; + bezComp[bez_CtrlL] += (bezMinL * bezRez); + bezComp[bez_CtrlR] += (bezMinR * bezRez); //Dual mono build + + if (bezComp[bez_cycle] > 1.0) { + if (bezGateL < 1.0) bezComp[bez_CtrlL] /= bezGateL; + if (bezGateR < 1.0) bezComp[bez_CtrlR] /= bezGateR; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_CL] = bezComp[bez_BL]; + bezComp[bez_BL] = bezComp[bez_AL]; + bezComp[bez_AL] = bezComp[bez_CtrlL]; + bezComp[bez_CtrlL] = 0.0; + bezMaxL = 0.0; + bezComp[bez_CR] = bezComp[bez_BR]; + bezComp[bez_BR] = bezComp[bez_AR]; + bezComp[bez_AR] = bezComp[bez_CtrlR]; + bezComp[bez_CtrlR] = 0.0; + bezMaxR = 0.0; } + double CBL = (bezComp[bez_CL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BL]*bezComp[bez_cycle]); + double BAL = (bezComp[bez_BL]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AL]*bezComp[bez_cycle]); + double CBAL = (bezComp[bez_BL]+(CBL*(1.0-bezComp[bez_cycle]))+(BAL*bezComp[bez_cycle]))*0.5; + double CBR = (bezComp[bez_CR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_BR]*bezComp[bez_cycle]); + double BAR = (bezComp[bez_BR]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_AR]*bezComp[bez_cycle]); + double CBAR = (bezComp[bez_BR]+(CBR*(1.0-bezComp[bez_cycle]))+(BAR*bezComp[bez_cycle]))*0.5; - bezCompF[bez_cycle] += bezRez; - bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez); - bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez); - bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR))); - - if (bezCompF[bez_cycle] > 1.0) { - bezCompF[bez_cycle] -= 1.0; - - if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage, - if (bezCompF[bez_SampL] 0.0) { + inputSampleL *= 1.0-(fmin(CBAL*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBAR*bezThresh,1.0)); } - bezCompS[bez_cycle] += sloRez; - bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage - bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage - if (bezCompS[bez_cycle] > 1.0) { - bezCompS[bez_cycle] -= 1.0; - - if (bezCompS[bez_SampL] 0.0) CBAMax = 1.0/CBAMax; - double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0)); - - double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]); - double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]); - double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5; - double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]); - double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]); - double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5; - CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax; - CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5; - if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0)); - - if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;} - //Dynamics2 + //Dynamics3, but with crossfade over EQ or HipCrush const double temp = (double)sampleFrames/inFramesToProcess; const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp)); diff --git a/plugins/WinVST/Dynamics3/.vs/Console4Channel64/v14/.suo b/plugins/WinVST/Dynamics3/.vs/Console4Channel64/v14/.suo new file mode 100755 index 0000000000000000000000000000000000000000..777b84637178603e9e29062e78424d1a54b8cd74 GIT binary patch literal 32768 zcmeHQYj7M#wVt&d5)&u64#5cyBuhv_LbRKGOY$q(mux3dEL)ai#|maWJCfE~?TVdU zOHO16@0Tx+@VeZ4fh2IrC4s~|3i!bfDEPsvia_y$q9`g9Ra8;MtDp)BC~UrOdRjX> zn%y0()?V36tIkeOPj{bwoIZW}oHL{6f4K35C%&-xmx?XyP}VAE&aPKpWJ&iSzDC~v zhoW3z-k&*p_AHav0uc4W1vCQtlrsLRieJepC0r}Y2~MT!ut~XOan9GbDK!!ry8iEf z{E_c!KA2?>>iQkgpLWe&U@~ifBPa z(Ey_uiyS~R^EJENtgP|ff`_sV&GK2(Gq~AiE~Gt54Oogw0sSXTS}+gK7|I@(R#r5AnM@FaG{H&(+FKPA_Xfyc$*E_=o+>4l4|2LZV z8*yC+;QHrtu78%XuYW#kw*JW*`~c3uD*+NG%XA}n>)-t-z6s<1X24qjZw0&!@OHpE z0GyY1;rebf&U*>(L)!ZR9{@ZC_#ogzfDZ#c0{AH4zW^Tt{5Rl#0RId4I6&6%IO0zL zo;1@wjqCpbK4aehKdzqzJPmlpO#3{p&jOw^?^%}@Iv;@xZT`La?tHGDN@gJ89)%1# zi9gD{4;WIY4w+O)!bwQQv&t~;D4&W{EWO2$fc$H%ckw}sh}=V%Mc~V${yAXD0ZYzo zNf5FDCE^m=l~;z)wwyA9xZY4R@EfuwWmUGL;bD^-AJVzMF^K+A{#FfnzhLx~(uj_< zNo5LsZp0|c$=};LkiS`$XCQ`F@;}ccVUexrFV7#`k15By?f(e!o-u1I8FR0pmz{+T z=KOO^-QwrbW86G{2>EZ;puH;2o_-q@v}@H(9gIJZULmvMQOvt)N}me+oB$F%#P1=b5op=;ZwS6e?Upg6&d}edo1HRW7TVmEc!# zIvxi->jvHHh^ydv6;Qp{17>l@ec>3We#+pA+zH094$8<`GdMEW0!tn@%IJ7DtwfZd z57IT&R(drO5ZXCGexm2`;7`g7bE08Z}=vx}?<9@~csc7zFQPj{br|1{g zD+9@Ja!v8b&e!Me{Pf$N_=1tRjGt$HD;t|Jw4YipayIU>_I^`7IF2!iHEB~{2mFsR zoUCpaMm}%gE`jG3(V8J+gasdNweyM^!2f;JImz>?thd$Gia&*(tDx6O(3Rlp`9)5j z!82+BTZLOY;D0GpIBZsG-)97sQ4dQx+k^EZcOd7n2zD_3N#N$$o58+|!h?lkyxA@ZNGGWRITiwOYr|I`E01|aqSvaQtr-vyBOyr#|jEUrU&4B zCIFKF%0C6bF~BsS2$%ts0A;`|;PrqCfV)E#Py-wX%mL;BCjbuv9sw)>P6FNlcq8CZ zz#g3bk6}0B{wMby4HziV9WX`^nOX$N|40+)#@QBG7at8HCgqcgT%-Pp*mwr9YkF*m&0Bv5``_ItOJ2ob$DhIoXz1}Y zR#zFl7AryIb^3+=$46ec8Q`}6+mZL{W@UE#oNvkmn{Q7<@Lw7u^=?Ze*%Iagzc9C-{p+|r%>Tv%u3tg=YHNQ5I^Mw?k8^h{}l84M6K=c$3(WKzn$ox zK8M=A-L%H#KagYZw*O8TjNvfH#OZmnv<-OBL9xZ^Se8K9ueF9HVaRu}U^p5H_xaPc zVzpM$wi|`naoLCsq=dcq*LG^v;Qn&CsQ38~XcfIsE^UtnWB6+yP;??b(LWIm=i{MVGzrm>Xz-V^9s+Cw}&`227s?|biQfHPM zw>?lO<;!z2ZO8PHBdMG^jpsuJt(af?fi9LyuRa=0d(+>ai>vWOcrY5%LIZ;j^&J)? zG=iq(Cbi*Q3BNO1sTv&H9URlOifn(Mzj?-bLzXkL(eTlU=s-M?%SRJ2EgFC5AGI5MuA)^g+m+L&Mhg#X@VmThlSwOkD)~YwS6s}4g39`J z{6$#DNRynT-OG;@CQIdtmd@##;`3b|GjtB)kj&FKyHFNVA+1wes^Pv08I30o5z>Z+ zR!EaPOVC#5$4RPy5|rfpIL*!DJdwbOZXD+gYFDV^B3`E;&j;3LPHBAZl)jQQsr_}+ z581wrh&&4DbR4Kxp1_#;jdM_4KRt@Hx_+8^Sn7eA&55GCv*&G4asI5Lg^F^j=WUq* z<&kD9MtgccHaetA+7ed7Jc;$20^OBy+Tkg$f-C9Gjo&M}V1$=LlJX-)`gbdT{3r6> z24L6^Y&!7X2adpV=P0-erEi`AX?<-bcZ<@L8`k(vL&)sC!{s-rMu}QL#d}`-@o< z9)Z23m;yAulqNVnkM(?fg#Z3DMu~cxUU7IiKXO%(pB7ii2ptFYkcuj3Q30Hm^Y)>h z&l_7sjVHBy1*|s8wY^wx+;NM*KY{ktxuU#ZJuMRLTn%GnKaF78Itub^q;}{B!}H5& zK&R!M{bxVTu1su!D7gn|KZmB5N6X|tyy{P>FC8@gw%5}6EKZ?B7Mf*c@{BrDC`2oTI z#z#9ib^31cTkQ|d{y!7w^(6Ks>QQ9xfxsb1|0~+)-QvF=d4Eft62e7r{xf_Byz?Jt z-<|!*N`H3$FUpK|56&9oHQ^y2G@nsM0rLcX(muGjzV&0be?K?(``?_t_Vz!0kMw8dmG-!uKArBZ{NL{X z>Xg4#nrHvjs?t_Ux!be4mR=-CE+=|LSyW9~%{?eb4^ae0)6npWQRbPC=giuazH{ zXaD27*rU)rO3k6)c<0#a>()3%p8c;;bGN)V)Un|sc=kWf{&!*M#p{;WAiPUe*eqvZ z9gy_f#)3-YC|}E@dS+J$R%`2DVDYYX%vy$V2HME^=4m?{c>p<6Xha59^bEX~B6us6 z-b-n`jY$K@Ft}dPu=9}v(hrk-aCY%q4E$=PFxPEGEqs?V4C}jl8+|MM^M=P;5S}Oe z5`uX1E@jwXtXS{rGS(p8ndMhAXql(pb;0uejCO6=+V!^7-@#e{WszLkwSjN&b#oSi zmiNGxGZumxlAx#|&=x&2vY-umXD}W$d^f_Vo4y5>DCsWaMAe_vG05~g-yf;%WYO(ZGu2j;BcLU=gVr1Z@TE?#|wHbSM=-ETE0;B zM?&HF_y|hlr5t_Ssd{@NGOIy#c6MRmk%3fnAcDU@A`*%O!r@FfFfh;`3WN}b2KwXu zgPF+5)3S%j$WXRFmJJ6|{jn%>hXToLIEmcJPLDzPMerO?}AhH7XQ@e&QGM5`-I)v+|Gt7 zz8&)1{dfN@b2#~{zU(#6-}>cW zBw#4qeerXjwMypV@8q>MzAagF>HO{p=NVlew;2Xwzp?#@Cn3BiYJ>$r@%7*96ypO* z^#th;sbp5;hSi#3tzX>Y_H=p6>~?*9IW5wkOB@Xav}i0Ih(!hl0)vVCL?Eu^CZdBe zO^YT5IcJH1P?I^kMY1nt^Ebj~JaaL#?2We79h{mvKkNEDBI@#5rmW6DKMm96Q?ZE6 z!S4F4>o`H$y$4s~{jv>be103Yg#X!ah4CFKoIDuzrjv(wonYS>Nglj^bYEz9vZBY- z#9k)sEA1T%r;^F^{IR*?1BdpGG4UQXJN2MCmrQ2#Vchm-4*pP#5b~8q$M&TTWTr+A zMbeYmOeQ_J>(2hcTIkN<2OgYP5AI409?FcB=Z{Us?%0zF&CMMgn%8#Tyu^c+?>ZmA zS%;?`>Mz4=qN2~#9xUw2M)nU!w2_1Qp?juJ9GblM-XXfU|IB=QK>8a~m$#Cya9VA* zoRPXtwe#;=b|!-hrOPiafd17rOzpnkY4=eR-%LB*> zE@t<(94Gy+RR+KC^uN~DuRJdGzn#|PR{z_qeoz0)|0%e<|1xzh^xJg})4!Mg_h0XJ BW`+O& literal 0 HcmV?d00001 diff --git a/plugins/WinVST/Dynamics3/.vs/VSTProject/v14/.suo b/plugins/WinVST/Dynamics3/.vs/VSTProject/v14/.suo new file mode 100755 index 0000000000000000000000000000000000000000..e377ffca41d963a134e54917be9dee1ccd4374cc GIT binary patch literal 22528 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 j_CkbTZ@=H^C0?pIx`})g#E)&@cUku 1.0f) return 1.0f; + return data; +} + +VstInt32 Dynamics3::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 Dynamics3::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void Dynamics3::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float Dynamics3::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Dynamics3::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Release", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Dynamics3::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Dynamics3::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Dynamics3::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Dynamics3::getEffectName(char* name) { + vst_strncpy(name, "Dynamics3", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Dynamics3::getPlugCategory() {return kPlugCategEffect;} + +bool Dynamics3::getProductString(char* text) { + vst_strncpy (text, "airwindows Dynamics3", kVstMaxProductStrLen); return true; +} + +bool Dynamics3::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugins/WinVST/Dynamics3/Dynamics3.h b/plugins/WinVST/Dynamics3/Dynamics3.h new file mode 100755 index 000000000..9e23dffc8 --- /dev/null +++ b/plugins/WinVST/Dynamics3/Dynamics3.h @@ -0,0 +1,81 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#define __Dynamics3_H + +#ifndef __audioeffect__ +#include "audioeffectx.h" +#endif + +#include +#include +#include + +enum { + kParamA =0, + kParamB =1, + kParamC =2, + kParamD =3, + kNumParameters = 4 +}; // + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'dyn3'; //Change this to what the AU identity is! + +class Dynamics3 : + public AudioEffectX +{ +public: + Dynamics3(audioMasterCallback audioMaster); + ~Dynamics3(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual VstInt32 getChunk (void** data, bool isPreset); + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + float C; + float D; + + enum { + bez_A, + bez_B, + bez_C, + bez_Ctrl, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bezComp[bez_total]; + double bezMax; + double bezMin; + double bezGate; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif diff --git a/plugins/WinVST/Dynamics3/Dynamics3Proc.cpp b/plugins/WinVST/Dynamics3/Dynamics3Proc.cpp new file mode 100755 index 000000000..86a8fb63e --- /dev/null +++ b/plugins/WinVST/Dynamics3/Dynamics3Proc.cpp @@ -0,0 +1,160 @@ +/* ======================================== + * Dynamics3 - Dynamics3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Dynamics3_H +#include "Dynamics3.h" +#endif + +void Dynamics3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Dynamics3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + double bezThresh = pow(1.0-A, 4.0) * 8.0; + double bezRez = pow(1.0-B, 4.0) / overallscale; + double sloRez = pow(1.0-C, 4.0) / overallscale; + double gate = pow(D,4.0); + bezRez = fmin(fmax(bezRez,0.0001),1.0); + sloRez = fmin(fmax(sloRez,0.0001),1.0); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + + if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate) bezGate = overallscale/fmin(bezRez,sloRez); + else bezGate = bezGate = fmax(0.000001, bezGate-fmin(bezRez,sloRez)); + + if (bezThresh > 0.0) { + inputSampleL *= (bezThresh+1.0); + inputSampleR *= (bezThresh+1.0); + } + + double ctrl = fmax(fabs(inputSampleL),fabs(inputSampleR)); + bezMax = fmax(bezMax,ctrl); + bezMin = fmax(bezMin-sloRez,ctrl); + bezComp[bez_cycle] += bezRez; + bezComp[bez_Ctrl] += (bezMin * bezRez); + + if (bezComp[bez_cycle] > 1.0) { + if (bezGate < 1.0) bezComp[bez_Ctrl] /= bezGate; + bezComp[bez_cycle] -= 1.0; + bezComp[bez_C] = bezComp[bez_B]; + bezComp[bez_B] = bezComp[bez_A]; + bezComp[bez_A] = bezComp[bez_Ctrl]; + bezComp[bez_Ctrl] = 0.0; + bezMax = 0.0; + } + double CB = (bezComp[bez_C]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_B]*bezComp[bez_cycle]); + double BA = (bezComp[bez_B]*(1.0-bezComp[bez_cycle]))+(bezComp[bez_A]*bezComp[bez_cycle]); + double CBA = (bezComp[bez_B]+(CB*(1.0-bezComp[bez_cycle]))+(BA*bezComp[bez_cycle]))*0.5; + + if (bezThresh > 0.0) { + inputSampleL *= 1.0-(fmin(CBA*bezThresh,1.0)); + inputSampleR *= 1.0-(fmin(CBA*bezThresh,1.0)); + } + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugins/WinVST/Dynamics3/VSTProject.sln b/plugins/WinVST/Dynamics3/VSTProject.sln new file mode 100755 index 000000000..694b42443 --- /dev/null +++ b/plugins/WinVST/Dynamics3/VSTProject.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VSTProject", "VSTProject.vcxproj", "{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.ActiveCfg = Debug|x64 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.Build.0 = Debug|x64 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.ActiveCfg = Debug|Win32 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.Build.0 = Debug|Win32 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.ActiveCfg = Release|x64 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.Build.0 = Release|x64 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.ActiveCfg = Release|Win32 + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/plugins/WinVST/Dynamics3/VSTProject.vcxproj b/plugins/WinVST/Dynamics3/VSTProject.vcxproj new file mode 100755 index 000000000..26a781011 --- /dev/null +++ b/plugins/WinVST/Dynamics3/VSTProject.vcxproj @@ -0,0 +1,183 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + {16F7AB3C-1AE0-4574-B60C-7B4DED82938C} + VSTProject + 8.1 + Dynamics364 + + + + DynamicLibrary + true + v140 + NotSet + + + DynamicLibrary + false + v140 + false + NotSet + + + DynamicLibrary + true + v140 + NotSet + + + DynamicLibrary + false + v140 + false + NotSet + + + + + + + + + + + + + + + + + + + + + .dll + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH) + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH) + + + + Level3 + MaxSpeed + true + C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories) + WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions) + MultiThreadedDebug + Speed + false + Default + false + None + + + vstplug.def + libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories) + Speed + WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions) + false + MultiThreadedDebug + Default + false + None + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries) + vstplug.def + + + + + Level3 + MaxSpeed + false + false + true + MultiThreaded + C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories) + None + Speed + WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions) + + + true + true + libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + vstplug.def + + + + + Level3 + MaxSpeed + false + false + true + C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories) + None + Speed + WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions) + MultiThreaded + + + true + true + libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) + libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + vstplug.def + + + + + + \ No newline at end of file diff --git a/plugins/WinVST/Dynamics3/VSTProject.vcxproj.filters b/plugins/WinVST/Dynamics3/VSTProject.vcxproj.filters new file mode 100755 index 000000000..0d57bd446 --- /dev/null +++ b/plugins/WinVST/Dynamics3/VSTProject.vcxproj.filters @@ -0,0 +1,48 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/plugins/WinVST/Dynamics3/VSTProject.vcxproj.user b/plugins/WinVST/Dynamics3/VSTProject.vcxproj.user new file mode 100755 index 000000000..221626789 --- /dev/null +++ b/plugins/WinVST/Dynamics3/VSTProject.vcxproj.user @@ -0,0 +1,19 @@ + + + + {ADEFF70D-84BF-47A1-91C3-FF6B0FC71218} + WindowsLocalDebugger + + + {ADEFF70D-84BF-47A1-91C3-FF6B0FC71218} + WindowsLocalDebugger + + + {ADEFF70D-84BF-47A1-91C3-FF6B0FC71218} + WindowsLocalDebugger + + + {ADEFF70D-84BF-47A1-91C3-FF6B0FC71218} + WindowsLocalDebugger + + \ No newline at end of file diff --git a/plugins/WinVST/Dynamics3/vstplug.def b/plugins/WinVST/Dynamics3/vstplug.def new file mode 100755 index 000000000..5bf499aa2 --- /dev/null +++ b/plugins/WinVST/Dynamics3/vstplug.def @@ -0,0 +1,3 @@ +EXPORTS + VSTPluginMain + main=VSTPluginMain \ No newline at end of file diff --git a/plugins/WinVST/PunchyDeluxe/.vs/VSTProject/v14/.suo b/plugins/WinVST/PunchyDeluxe/.vs/VSTProject/v14/.suo index 8bf56e84cca067fc969c8f7aa3f2e75568beeed5..eae8a5b66943750e7cad81c3c42265493a1bd443 100755 GIT binary patch delta 944 zcmcJN&uGu<&cD=+`r|}tI-q9L&sl+nd{_m z{SBIL61Rv2;x=)Is1h||k+@6n+U-1~*du%wxYnvqv}MElfc#Gao3bPgGQ-4BK*f`U z``DLPCI6l)1vz|AEd_u4MNkZ202Ee_}N^osy8(cXh{tEb zOLa$057brvU;sMjyC5S}!tLRfd8f(o3H592>*k(rZ}3G`FIomHEIRF)g9Ss!ZY_`b z_;YGJz+CJ#em`1LrR0ZTyU-gRG6$-d{kR8`2#2P(SJ1a|&+`C;!<36TodfHD>&0cs zTB4M3HK~TR0?N*8UIDGqd?&sP=p=OYYIZd|n-e)=oE2xtI!XR%acO8}#f-4T mMT&8LGn*Afk)h}*ksj7%C_gDO>gB>0P;@&$+uXp7YUnQ;%ryJ} delta 1148 zcmc(eJxo(k6vyv*uavJ>?T1hhq@~eF_|O&$Vl=e88X&bn38~?<2Y=E#|5jh6mpt-<p(TCIup59E`Z{b<{&CO+ zwpKaFFWb+t5d$}r}b1bo+Q%y5 z2>Wbq)-90Hu&&UgxzRmBX2h8xO~sacBc&|nx+g~Tib>~=q?i)Z_@=}pT9OhE#3Q_+ z8S!(LdcAKx#8=-&+ka#q592tmwYzvkpF}Fc^0nYhXAF)(_Z~?&Gvwy})9(yDL!5Aj zINT9tzhdG1(1BfK>w_HjT1;(tp_-TKyUcKVzA~qJcb67gpqD|b;Vf)dRK2Sr*9Fq# zpH4odQk|TtTQr&r#09IrB7}`9-VFSbtvOgr#+kE<=7zJe?1Y)>UnD~hx`qNGC{Bq! z(JOjj_25AU#7S5>tRSotVi48XaYGIh`v-@Hd$HMfHWxGfWJYkXaYGIhd&9@|J6E5$y}6j_Co_V>)*A=_H_Z|Y diff --git a/plugins/WinVST/PunchyGuitar/PunchyGuitarProc.cpp b/plugins/WinVST/PunchyGuitar/PunchyGuitarProc.cpp index 02396a754..1cffc39b1 100755 --- a/plugins/WinVST/PunchyGuitar/PunchyGuitarProc.cpp +++ b/plugins/WinVST/PunchyGuitar/PunchyGuitarProc.cpp @@ -90,7 +90,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -161,7 +170,16 @@ void PunchyGuitar::processReplacing(float **inputs, float **outputs, VstInt32 sa } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) @@ -291,7 +309,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleL += (band*angG[9]); inputSampleL *= drive; - inputSampleL = sin(fmin(fmax(inputSampleL,-M_PI),M_PI)); + inputSampleL = fmin(fmax(inputSampleL,-2.032610446872596),2.032610446872596); + long double X = inputSampleL * inputSampleL; + long double temp = inputSampleL * X; + inputSampleL -= (temp*0.125); temp *= X; + inputSampleL += (temp*0.0078125); temp *= X; + inputSampleL -= (temp*0.000244140625); temp *= X; + inputSampleL += (temp*0.000003814697265625); temp *= X; + inputSampleL -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerL < 1.0) @@ -362,7 +389,16 @@ void PunchyGuitar::processDoubleReplacing(double **inputs, double **outputs, Vst } inputSampleR += (band*angG[9]); inputSampleR *= drive; - inputSampleR = sin(fmin(fmax(inputSampleR,-M_PI),M_PI)); + inputSampleR = fmin(fmax(inputSampleR,-2.032610446872596),2.032610446872596); + long double X = inputSampleR * inputSampleR; + long double temp = inputSampleR * X; + inputSampleR -= (temp*0.125); temp *= X; + inputSampleR += (temp*0.0078125); temp *= X; + inputSampleR -= (temp*0.000244140625); temp *= X; + inputSampleR += (temp*0.000003814697265625); temp *= X; + inputSampleR -= (temp*0.0000000298023223876953125); temp *= X; + //purestsaturation: sine, except all the corrections + //retain mantissa of a long double increasing power function } if (gaterollerR < 1.0) diff --git a/what.txt b/what.txt index 57522849e..715600d01 100644 --- a/what.txt +++ b/what.txt @@ -328,6 +328,7 @@ Pressure5 expands Pressure4 with after-boost and built-in ClipOnly2.[coll=] Pressure6 refines the Pressure compressor and how it moves.[coll=Latest] PrimeFIR is a mostly linear-phase brickwall with a taste for the bizarre![coll=Latest] PurestAir is a brightness experiment.[coll=] +PurestDualPan is an updated PurestGain but as a dual pan.[coll=Basic,Recommended,Latest] PurestConsoleBuss is the most free from coloration Console system.[coll=Recommended] PurestConsoleChannel is the most free from coloration Console system.[coll=Recommended] PurestConsole2Buss is the distributed filter version of PurestConsole.[coll=]