From 2032a0aa1b443f48376347116e57af82cddc6684 Mon Sep 17 00:00:00 2001 From: airwindows Date: Mon, 28 Feb 2022 01:18:26 -0500 Subject: [PATCH] Acceleration through Aura --- .gitignore | 1 + .../src/Apicolypse/ApicolypseProc.cpp | 20 +- .../src/AverMatrix/AverMatrixProc.cpp | 12 +- plugins/LinuxVST/src/BassAmp/BassAmpProc.cpp | 25 +-- .../LinuxVST/src/BassDrive/BassDriveProc.cpp | 12 +- plugins/LinuxVST/src/BassKit/BassKitProc.cpp | 4 +- .../LinuxVST/src/Baxandall/BaxandallProc.cpp | 12 +- plugins/LinuxVST/src/Biquad/BiquadProc.cpp | 12 +- plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp | 12 +- .../src/BiquadDouble/BiquadDoubleProc.cpp | 12 +- .../src/BiquadOneHalf/BiquadOneHalfProc.cpp | 12 +- .../src/BiquadTriple/BiquadTripleProc.cpp | 12 +- .../src/BrassRider/BrassRiderProc.cpp | 12 +- .../src/BrightAmbience/BrightAmbienceProc.cpp | 12 +- .../BrightAmbience2/BrightAmbience2Proc.cpp | 12 +- .../src/BuildATPDF/BuildATPDFProc.cpp | 13 +- plugins/LinuxVST/src/Calibre/CalibreProc.cpp | 21 +- .../src/Capacitor2/Capacitor2Proc.cpp | 12 +- .../LinuxVST/src/Channel7/Channel7Proc.cpp | 12 +- .../LinuxVST/src/Channel8/Channel8Proc.cpp | 12 +- .../src/ChromeOxide/ChromeOxideProc.cpp | 20 +- plugins/LinuxVST/src/Cider/CiderProc.cpp | 20 +- plugins/LinuxVST/src/Coils/CoilsProc.cpp | 12 +- .../Compresaturator/CompresaturatorProc.cpp | 28 +-- .../src/Console6Buss/Console6BussProc.cpp | 12 +- .../Console6Channel/Console6ChannelProc.cpp | 12 +- plugins/LinuxVST/src/Crystal/CrystalProc.cpp | 8 +- plugins/LinuxVST/src/DeBess/DeBessProc.cpp | 12 +- plugins/LinuxVST/src/DeHiss/DeHissProc.cpp | 12 +- plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp | 12 +- .../src/Deckwrecka/DeckwreckaProc.cpp | 60 +++--- .../src/DigitalBlack/DigitalBlackProc.cpp | 12 +- .../src/Distortion/DistortionProc.cpp | 12 +- .../LinuxVST/src/Ditherbox/DitherboxProc.cpp | 202 ++++++++--------- .../src/DoublePaul/DoublePaulProc.cpp | 16 +- .../LinuxVST/src/DubCenter/DubCenterProc.cpp | 4 +- plugins/LinuxVST/src/DubSub/DubSubProc.cpp | 8 +- plugins/LinuxVST/src/Dyno/DynoProc.cpp | 12 +- plugins/LinuxVST/src/Elation/ElationProc.cpp | 20 +- plugins/LinuxVST/src/Facet/FacetProc.cpp | 12 +- plugins/LinuxVST/src/Focus/FocusProc.cpp | 12 +- .../LinuxVST/src/FromTape/FromTapeProc.cpp | 4 +- .../src/GlitchShifter/GlitchShifterProc.cpp | 12 +- plugins/LinuxVST/src/Gringer/GringerProc.cpp | 12 +- .../LinuxVST/src/Highpass2/Highpass2Proc.cpp | 12 +- .../src/Infrasonic/InfrasonicProc.cpp | 12 +- .../src/Interstage/InterstageProc.cpp | 12 +- .../src/IronOxide5/IronOxide5Proc.cpp | 8 +- .../LinuxVST/src/Isolator/IsolatorProc.cpp | 12 +- .../LinuxVST/src/Lowpass2/Lowpass2Proc.cpp | 12 +- plugins/LinuxVST/src/Luxor/LuxorProc.cpp | 20 +- plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp | 12 +- plugins/LinuxVST/src/Mojo/MojoProc.cpp | 12 +- .../NaturalizeDither/NaturalizeDitherProc.cpp | 16 +- .../LinuxVST/src/Neverland/NeverlandProc.cpp | 20 +- plugins/LinuxVST/src/Nikola/NikolaProc.cpp | 12 +- .../src/NodeDither/NodeDitherProc.cpp | 16 +- plugins/LinuxVST/src/Noise/NoiseProc.cpp | 32 +-- .../src/PaulDither/PaulDitherProc.cpp | 16 +- .../LinuxVST/src/PaulWide/PaulWideProc.cpp | 28 ++- .../LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp | 12 +- .../src/PocketVerbs/PocketVerbsProc.cpp | 12 +- plugins/LinuxVST/src/Podcast/PodcastProc.cpp | 12 +- .../src/PodcastDeluxe/PodcastDeluxeProc.cpp | 12 +- .../LinuxVST/src/PowerSag2/PowerSag2Proc.cpp | 12 +- .../LinuxVST/src/Precious/PreciousProc.cpp | 20 +- .../LinuxVST/src/PurestAir/PurestAirProc.cpp | 12 +- plugins/LinuxVST/src/Recurve/RecurveProc.cpp | 12 +- plugins/LinuxVST/src/Remap/RemapProc.cpp | 12 +- plugins/LinuxVST/src/ResEQ/ResEQProc.cpp | 12 +- plugins/LinuxVST/src/Slew3/Slew3Proc.cpp | 12 +- plugins/LinuxVST/src/Smooth/SmoothProc.cpp | 12 +- .../LinuxVST/src/SoftGate/SoftGateProc.cpp | 12 +- .../SpatializeDither/SpatializeDitherProc.cpp | 16 +- .../src/TPDFDither/TPDFDitherProc.cpp | 24 ++- .../LinuxVST/src/TPDFWide/TPDFWideProc.cpp | 48 +++-- plugins/LinuxVST/src/Tape/TapeProc.cpp | 12 +- .../src/TapeDither/TapeDitherProc.cpp | 16 +- plugins/LinuxVST/src/ToTape5/ToTape5Proc.cpp | 4 +- plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp | 12 +- .../src/TremoSquare/TremoSquareProc.cpp | 12 +- .../src/TripleSpread/TripleSpreadProc.cpp | 12 +- .../src/Ultrasonic/UltrasonicProc.cpp | 12 +- .../src/UltrasonicLite/UltrasonicLiteProc.cpp | 12 +- .../src/UltrasonicMed/UltrasonicMedProc.cpp | 12 +- plugins/LinuxVST/src/Vibrato/VibratoProc.cpp | 12 +- .../src/VinylDither/VinylDitherProc.cpp | 136 ++++++------ .../VoiceOfTheStarshipProc.cpp | 16 +- .../src/VoiceTrick/VoiceTrickProc.cpp | 12 +- plugins/LinuxVST/src/curve/curveProc.cpp | 12 +- .../christopherjohnson.pbxuser | 26 +-- .../christopherjohnson.perspectivev3 | 39 ++-- .../ADT.xcodeproj/christopherjohnson.pbxuser | 42 ++-- .../christopherjohnson.perspectivev3 | 24 +-- .../MacAU/AQuickVoiceClip/AQuickVoiceClip.cpp | 2 +- .../MacAU/AQuickVoiceClip/AQuickVoiceClip.h | 1 + .../christopherjohnson.pbxuser | 40 ++-- .../christopherjohnson.perspectivev3 | 18 +- .../christopherjohnson.pbxuser | 71 +++--- .../christopherjohnson.perspectivev3 | 81 ++----- .../christopherjohnson.pbxuser | 60 +++--- .../christopherjohnson.perspectivev3 | 35 ++- plugins/MacAU/Air/Air.cpp | 16 +- .../Air.xcodeproj/christopherjohnson.pbxuser | 60 +++--- .../christopherjohnson.perspectivev3 | 22 +- .../Air2.xcodeproj/christopherjohnson.pbxuser | 42 ++-- .../christopherjohnson.perspectivev3 | 33 ++- plugins/MacAU/Apicolypse/Apicolypse.cpp | 2 +- .../christopherjohnson.pbxuser | 42 ++-- .../christopherjohnson.perspectivev3 | 34 +-- .../christopherjohnson.pbxuser | 29 +-- .../christopherjohnson.perspectivev3 | 29 +-- .../christopherjohnson.pbxuser | 44 ++-- .../christopherjohnson.perspectivev3 | 28 +-- .../Aura.xcodeproj/christopherjohnson.pbxuser | 12 +- .../christopherjohnson.perspectivev3 | 28 +-- plugins/MacAU/BassAmp/BassAmp.cpp | 2 +- plugins/MacAU/BassKit/BassKit.cpp | 4 +- plugins/MacAU/BuildATPDF/BuildATPDF.cpp | 6 +- plugins/MacAU/CStrip/CStrip.cpp | 2 +- plugins/MacAU/Calibre/Calibre.cpp | 2 +- plugins/MacAU/Channel4/Channel4.cpp | 2 +- plugins/MacAU/ChromeOxide/ChromeOxide.cpp | 2 +- plugins/MacAU/Cider/Cider.cpp | 2 +- .../MacAU/Compresaturator/Compresaturator.cpp | 2 +- plugins/MacAU/Crystal/Crystal.cpp | 2 +- plugins/MacAU/Deckwrecka/Deckwrecka.cpp | 12 +- .../MacAU/Distance2/Ditherbox/Ditherbox.cpp | 51 ++--- plugins/MacAU/Ditherbox/Ditherbox.cpp | 51 ++--- plugins/MacAU/DoublePaul/DoublePaul.cpp | 6 +- plugins/MacAU/DubCenter/DubCenter.cpp | 4 +- plugins/MacAU/DubSub/DubSub.cpp | 4 +- plugins/MacAU/DustBunny/DustBunny.cpp | 4 +- plugins/MacAU/Elation/Elation.cpp | 2 +- plugins/MacAU/Energy/Energy.cpp | 2 +- plugins/MacAU/FromTape/FromTape.cpp | 2 +- plugins/MacAU/IronOxide5/IronOxide5.cpp | 4 +- plugins/MacAU/Luxor/Luxor.cpp | 2 +- .../NaturalizeDither/NaturalizeDither.cpp | 6 +- plugins/MacAU/Neverland/Neverland.cpp | 2 +- plugins/MacAU/NodeDither/NodeDither.cpp | 6 +- plugins/MacAU/Noise/Noise.cpp | 8 +- plugins/MacAU/PaulDither/PaulDither.cpp | 6 +- plugins/MacAU/PaulWide/PaulWide.cpp | 14 +- plugins/MacAU/Precious/Precious.cpp | 2 +- plugins/MacAU/Slew2/Slew2.cpp | 4 +- .../SpatializeDither/SpatializeDither.cpp | 6 +- plugins/MacAU/TPDFDither/TPDFDither.cpp | 8 +- plugins/MacAU/TPDFWide/TPDFWide.cpp | 26 ++- plugins/MacAU/TapeDither/TapeDither.cpp | 6 +- plugins/MacAU/ToTape5/ToTape5.cpp | 2 +- plugins/MacAU/TransDesk/TransDesk.cpp | 10 +- plugins/MacAU/TubeDesk/TubeDesk.cpp | 10 +- plugins/MacAU/VinylDither/VinylDither.cpp | 36 ++-- .../VoiceOfTheStarship/VoiceOfTheStarship.cpp | 4 +- .../AQuickVoiceClip/AQuickVoiceClip.cpp | 2 +- plugins/MacSignedAU/Air/Air.cpp | 16 +- plugins/MacSignedAU/Apicolypse/Apicolypse.cpp | 2 +- plugins/MacSignedAU/BassAmp/BassAmp.cpp | 2 +- plugins/MacSignedAU/BassKit/BassKit.cpp | 4 +- plugins/MacSignedAU/BuildATPDF/BuildATPDF.cpp | 6 +- plugins/MacSignedAU/CStrip/CStrip.cpp | 2 +- plugins/MacSignedAU/Calibre/Calibre.cpp | 2 +- plugins/MacSignedAU/Channel4/Channel4.cpp | 2 +- .../MacSignedAU/ChromeOxide/ChromeOxide.cpp | 2 +- plugins/MacSignedAU/Cider/Cider.cpp | 2 +- .../Compresaturator/Compresaturator.cpp | 2 +- plugins/MacSignedAU/Crystal/Crystal.cpp | 2 +- plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp | 12 +- .../Distance2/Ditherbox/Ditherbox.cpp | 51 ++--- plugins/MacSignedAU/Ditherbox/Ditherbox.cpp | 51 ++--- plugins/MacSignedAU/DoublePaul/DoublePaul.cpp | 6 +- plugins/MacSignedAU/DubCenter/DubCenter.cpp | 4 +- plugins/MacSignedAU/DubSub/DubSub.cpp | 4 +- plugins/MacSignedAU/DustBunny/DustBunny.cpp | 4 +- plugins/MacSignedAU/Elation/Elation.cpp | 2 +- plugins/MacSignedAU/Energy/Energy.cpp | 2 +- plugins/MacSignedAU/FromTape/FromTape.cpp | 2 +- plugins/MacSignedAU/IronOxide5/IronOxide5.cpp | 4 +- plugins/MacSignedAU/Luxor/Luxor.cpp | 2 +- .../NaturalizeDither/NaturalizeDither.cpp | 6 +- plugins/MacSignedAU/Neverland/Neverland.cpp | 2 +- plugins/MacSignedAU/NodeDither/NodeDither.cpp | 6 +- plugins/MacSignedAU/Noise/Noise.cpp | 8 +- plugins/MacSignedAU/PaulDither/PaulDither.cpp | 6 +- plugins/MacSignedAU/PaulWide/PaulWide.cpp | 16 +- plugins/MacSignedAU/Precious/Precious.cpp | 2 +- plugins/MacSignedAU/Slew2/Slew2.cpp | 4 +- .../SpatializeDither/SpatializeDither.cpp | 6 +- plugins/MacSignedAU/TPDFDither/TPDFDither.cpp | 8 +- plugins/MacSignedAU/TPDFWide/TPDFWide.cpp | 24 ++- plugins/MacSignedAU/TapeDither/TapeDither.cpp | 6 +- plugins/MacSignedAU/ToTape5/ToTape5.cpp | 2 +- plugins/MacSignedAU/TransDesk/TransDesk.cpp | 10 +- plugins/MacSignedAU/TubeDesk/TubeDesk.cpp | 10 +- .../MacSignedAU/VinylDither/VinylDither.cpp | 36 ++-- .../VoiceOfTheStarship/VoiceOfTheStarship.cpp | 4 +- .../Apicolypse/source/ApicolypseProc.cpp | 20 +- .../AverMatrix/source/AverMatrixProc.cpp | 12 +- .../BassAmp/source/BassAmpProc.cpp | 24 +-- .../BassDrive/source/BassDriveProc.cpp | 12 +- .../BassKit/source/BassKitProc.cpp | 4 +- .../Baxandall/source/BaxandallProc.cpp | 12 +- .../MacSignedVST/Biquad/source/BiquadProc.cpp | 12 +- .../Biquad2/source/Biquad2Proc.cpp | 12 +- .../BiquadDouble/source/BiquadDoubleProc.cpp | 12 +- .../source/BiquadOneHalfProc.cpp | 12 +- .../BiquadTriple/source/BiquadTripleProc.cpp | 12 +- .../BrassRider/source/BrassRiderProc.cpp | 12 +- .../source/BrightAmbienceProc.cpp | 12 +- .../source/BrightAmbience2Proc.cpp | 12 +- .../BuildATPDF/source/BuildATPDFProc.cpp | 20 +- .../Calibre/source/CalibreProc.cpp | 20 +- .../Capacitor2/source/Capacitor2Proc.cpp | 12 +- .../Channel7/source/Channel7Proc.cpp | 12 +- .../Channel8/source/Channel8Proc.cpp | 12 +- .../ChromeOxide/source/ChromeOxideProc.cpp | 20 +- .../MacSignedVST/Cider/source/CiderProc.cpp | 20 +- .../MacSignedVST/Coils/source/CoilsProc.cpp | 12 +- .../source/CompresaturatorProc.cpp | 16 +- .../Console6Buss/source/Console6BussProc.cpp | 12 +- .../source/Console6ChannelProc.cpp | 12 +- .../Crystal/source/CrystalProc.cpp | 8 +- .../MacSignedVST/DeBess/source/DeBessProc.cpp | 12 +- .../MacSignedVST/DeHiss/source/DeHissProc.cpp | 12 +- .../MacSignedVST/DeRez2/source/DeRez2Proc.cpp | 12 +- .../Deckwrecka/source/DeckwreckaProc.cpp | 60 +++--- .../DigitalBlack/source/DigitalBlackProc.cpp | 12 +- .../Distortion/source/DistortionProc.cpp | 12 +- .../Ditherbox/source/DitherboxProc.cpp | 204 +++++++++--------- .../DoublePaul/source/DoublePaulProc.cpp | 16 +- .../DubCenter/source/DubCenterProc.cpp | 4 +- .../MacSignedVST/DubSub/source/DubSubProc.cpp | 8 +- plugins/MacSignedVST/Dyno/source/DynoProc.cpp | 12 +- .../Elation/source/ElationProc.cpp | 20 +- .../MacSignedVST/Facet/source/FacetProc.cpp | 12 +- .../MacSignedVST/Focus/source/FocusProc.cpp | 12 +- .../FromTape/source/FromTapeProc.cpp | 4 +- .../source/GlitchShifterProc.cpp | 12 +- .../Gringer/source/GringerProc.cpp | 12 +- .../Highpass2/source/Highpass2Proc.cpp | 12 +- .../Infrasonic/source/InfrasonicProc.cpp | 12 +- .../Interstage/source/InterstageProc.cpp | 12 +- .../IronOxide5/source/IronOxide5Proc.cpp | 8 +- .../Isolator/source/IsolatorProc.cpp | 12 +- .../Lowpass2/source/Lowpass2Proc.cpp | 12 +- .../MacSignedVST/Luxor/source/LuxorProc.cpp | 20 +- .../MacSignedVST/MoNoam/source/MoNoamProc.cpp | 12 +- plugins/MacSignedVST/Mojo/source/MojoProc.cpp | 12 +- .../source/NaturalizeDitherProc.cpp | 16 +- .../Neverland/source/NeverlandProc.cpp | 20 +- .../MacSignedVST/Nikola/source/NikolaProc.cpp | 12 +- .../NodeDither/source/NodeDitherProc.cpp | 16 +- .../MacSignedVST/Noise/source/NoiseProc.cpp | 32 +-- .../PaulDither/source/PaulDitherProc.cpp | 16 +- .../PaulWide/source/PaulWideProc.cpp | 28 ++- .../PeaksOnly/source/PeaksOnlyProc.cpp | 12 +- .../PocketVerbs/source/PocketVerbsProc.cpp | 12 +- .../Podcast/source/PodcastProc.cpp | 12 +- .../source/PodcastDeluxeProc.cpp | 12 +- .../PowerSag2/source/PowerSag2Proc.cpp | 12 +- .../Precious/source/PreciousProc.cpp | 20 +- .../PurestAir/source/PurestAirProc.cpp | 12 +- .../Recurve/source/RecurveProc.cpp | 12 +- .../MacSignedVST/Remap/source/RemapProc.cpp | 12 +- .../MacSignedVST/ResEQ/source/ResEQProc.cpp | 12 +- .../MacSignedVST/Slew3/source/Slew3Proc.cpp | 12 +- .../MacSignedVST/Smooth/source/SmoothProc.cpp | 12 +- .../SoftGate/source/SoftGateProc.cpp | 12 +- .../source/SpatializeDitherProc.cpp | 16 +- .../TPDFDither/source/TPDFDitherProc.cpp | 24 ++- .../TPDFWide/source/TPDFWideProc.cpp | 48 +++-- plugins/MacSignedVST/Tape/source/TapeProc.cpp | 12 +- .../TapeDither/source/TapeDitherProc.cpp | 16 +- .../ToTape5/source/ToTape5Proc.cpp | 4 +- .../ToTape6/source/ToTape6Proc.cpp | 12 +- .../TremoSquare/source/TremoSquareProc.cpp | 12 +- .../TripleSpread/source/TripleSpreadProc.cpp | 12 +- .../Ultrasonic/source/UltrasonicProc.cpp | 12 +- .../source/UltrasonicLiteProc.cpp | 12 +- .../source/UltrasonicMedProc.cpp | 12 +- .../Vibrato/source/VibratoProc.cpp | 12 +- .../VinylDither/source/VinylDitherProc.cpp | 136 ++++++------ .../source/VoiceOfTheStarshipProc.cpp | 16 +- .../VoiceTrick/source/VoiceTrickProc.cpp | 12 +- .../MacSignedVST/curve/source/curveProc.cpp | 12 +- .../christopherjohnson.pbxuser | 32 +-- .../christopherjohnson.perspectivev3 | 20 +- .../ADT.xcodeproj/christopherjohnson.pbxuser | 46 ++-- .../christopherjohnson.perspectivev3 | 24 +-- plugins/MacVST/ADT/source/ADT.cpp | 3 +- plugins/MacVST/ADT/source/ADTProc.cpp | 24 +-- .../christopherjohnson.pbxuser | 12 +- .../christopherjohnson.perspectivev3 | 20 +- .../christopherjohnson.pbxuser | 64 +++--- .../christopherjohnson.perspectivev3 | 46 ++-- .../christopherjohnson.pbxuser | 37 ++-- .../christopherjohnson.perspectivev3 | 28 +-- .../Air.xcodeproj/christopherjohnson.pbxuser | 28 +-- .../christopherjohnson.perspectivev3 | 20 +- .../Air2.xcodeproj/christopherjohnson.pbxuser | 40 ++-- .../christopherjohnson.perspectivev3 | 29 ++- .../christopherjohnson.pbxuser | 42 ++-- .../christopherjohnson.perspectivev3 | 33 ++- .../MacVST/Apicolypse/source/Apicolypse.cpp | 3 +- plugins/MacVST/Apicolypse/source/Apicolypse.h | 3 +- .../Apicolypse/source/ApicolypseProc.cpp | 24 +-- .../christopherjohnson.pbxuser | 48 ++--- .../christopherjohnson.perspectivev3 | 33 +-- .../AtmosphereBuss/source/AtmosphereBuss.h | 2 + .../christopherjohnson.pbxuser | 48 ++--- .../christopherjohnson.perspectivev3 | 31 +-- .../source/AtmosphereChannel.h | 2 + .../Aura.xcodeproj/christopherjohnson.pbxuser | 38 ++-- .../christopherjohnson.perspectivev3 | 22 +- .../AverMatrix/source/AverMatrixProc.cpp | 12 +- plugins/MacVST/BassAmp/source/BassAmpProc.cpp | 24 +-- .../MacVST/BassDrive/source/BassDriveProc.cpp | 12 +- plugins/MacVST/BassKit/source/BassKitProc.cpp | 4 +- .../MacVST/Baxandall/source/BaxandallProc.cpp | 12 +- plugins/MacVST/Biquad/source/BiquadProc.cpp | 12 +- plugins/MacVST/Biquad2/source/Biquad2Proc.cpp | 12 +- .../BiquadDouble/source/BiquadDoubleProc.cpp | 12 +- .../source/BiquadOneHalfProc.cpp | 12 +- .../BiquadTriple/source/BiquadTripleProc.cpp | 12 +- .../BrassRider/source/BrassRiderProc.cpp | 12 +- .../source/BrightAmbienceProc.cpp | 12 +- .../source/BrightAmbience2Proc.cpp | 12 +- .../BuildATPDF/source/BuildATPDFProc.cpp | 16 +- plugins/MacVST/Calibre/source/CalibreProc.cpp | 20 +- .../Capacitor2/source/Capacitor2Proc.cpp | 12 +- .../MacVST/Channel7/source/Channel7Proc.cpp | 12 +- .../MacVST/Channel8/source/Channel8Proc.cpp | 12 +- .../ChromeOxide/source/ChromeOxideProc.cpp | 20 +- plugins/MacVST/Cider/source/CiderProc.cpp | 20 +- plugins/MacVST/Coils/source/CoilsProc.cpp | 12 +- .../source/CompresaturatorProc.cpp | 28 +-- .../Console6Buss/source/Console6BussProc.cpp | 12 +- .../source/Console6ChannelProc.cpp | 12 +- plugins/MacVST/Crystal/source/CrystalProc.cpp | 8 +- plugins/MacVST/DeBess/source/DeBessProc.cpp | 12 +- plugins/MacVST/DeHiss/source/DeHissProc.cpp | 12 +- plugins/MacVST/DeRez2/source/DeRez2Proc.cpp | 12 +- .../Deckwrecka/source/DeckwreckaProc.cpp | 60 +++--- .../DigitalBlack/source/DigitalBlackProc.cpp | 12 +- .../Distortion/source/DistortionProc.cpp | 12 +- .../MacVST/Ditherbox/source/DitherboxProc.cpp | 200 ++++++++--------- .../DoublePaul/source/DoublePaulProc.cpp | 16 +- .../MacVST/DubCenter/source/DubCenterProc.cpp | 4 +- plugins/MacVST/DubSub/source/DubSubProc.cpp | 8 +- plugins/MacVST/Dyno/source/DynoProc.cpp | 12 +- plugins/MacVST/Elation/source/ElationProc.cpp | 20 +- plugins/MacVST/Facet/source/FacetProc.cpp | 12 +- plugins/MacVST/Focus/source/FocusProc.cpp | 12 +- .../MacVST/FromTape/source/FromTapeProc.cpp | 4 +- .../source/GlitchShifterProc.cpp | 12 +- plugins/MacVST/Gringer/source/GringerProc.cpp | 12 +- .../MacVST/Highpass2/source/Highpass2Proc.cpp | 12 +- .../Infrasonic/source/InfrasonicProc.cpp | 12 +- .../Interstage/source/InterstageProc.cpp | 12 +- .../IronOxide5/source/IronOxide5Proc.cpp | 8 +- .../MacVST/Isolator/source/IsolatorProc.cpp | 12 +- .../MacVST/Lowpass2/source/Lowpass2Proc.cpp | 12 +- plugins/MacVST/Luxor/source/LuxorProc.cpp | 20 +- plugins/MacVST/MoNoam/source/MoNoamProc.cpp | 12 +- plugins/MacVST/Mojo/source/MojoProc.cpp | 12 +- .../source/NaturalizeDitherProc.cpp | 16 +- .../MacVST/Neverland/source/NeverlandProc.cpp | 20 +- plugins/MacVST/Nikola/source/NikolaProc.cpp | 12 +- .../NodeDither/source/NodeDitherProc.cpp | 16 +- plugins/MacVST/Noise/source/NoiseProc.cpp | 32 +-- .../PaulDither/source/PaulDitherProc.cpp | 8 +- .../MacVST/PaulWide/source/PaulWideProc.cpp | 28 ++- .../MacVST/PeaksOnly/source/PeaksOnlyProc.cpp | 12 +- .../PocketVerbs/source/PocketVerbsProc.cpp | 12 +- plugins/MacVST/Podcast/source/PodcastProc.cpp | 12 +- .../source/PodcastDeluxeProc.cpp | 12 +- .../MacVST/PowerSag2/source/PowerSag2Proc.cpp | 12 +- .../MacVST/Precious/source/PreciousProc.cpp | 20 +- .../MacVST/PurestAir/source/PurestAirProc.cpp | 12 +- plugins/MacVST/Recurve/source/RecurveProc.cpp | 12 +- plugins/MacVST/Remap/source/RemapProc.cpp | 12 +- plugins/MacVST/ResEQ/source/ResEQProc.cpp | 12 +- plugins/MacVST/Slew3/source/Slew3Proc.cpp | 12 +- plugins/MacVST/Smooth/source/SmoothProc.cpp | 12 +- .../MacVST/SoftGate/source/SoftGateProc.cpp | 12 +- .../source/SpatializeDitherProc.cpp | 16 +- .../TPDFDither/source/TPDFDitherProc.cpp | 24 ++- .../MacVST/TPDFWide/source/TPDFWideProc.cpp | 48 +++-- plugins/MacVST/Tape/source/TapeProc.cpp | 12 +- .../TapeDither/source/TapeDitherProc.cpp | 16 +- plugins/MacVST/ToTape5/source/ToTape5Proc.cpp | 4 +- plugins/MacVST/ToTape6/source/ToTape6Proc.cpp | 12 +- .../TremoSquare/source/TremoSquareProc.cpp | 12 +- .../TripleSpread/source/TripleSpreadProc.cpp | 12 +- .../Ultrasonic/source/UltrasonicProc.cpp | 12 +- .../source/UltrasonicLiteProc.cpp | 12 +- .../source/UltrasonicMedProc.cpp | 12 +- plugins/MacVST/Vibrato/source/VibratoProc.cpp | 12 +- .../VinylDither/source/VinylDitherProc.cpp | 136 ++++++------ .../source/VoiceOfTheStarshipProc.cpp | 16 +- .../VoiceTrick/source/VoiceTrickProc.cpp | 12 +- plugins/MacVST/curve/source/curveProc.cpp | 12 +- plugins/WinVST/Apicolypse/ApicolypseProc.cpp | 20 +- plugins/WinVST/AverMatrix/AverMatrixProc.cpp | 12 +- plugins/WinVST/BassAmp/BassAmpProc.cpp | 4 +- plugins/WinVST/BassDrive/BassDriveProc.cpp | 12 +- plugins/WinVST/BassKit/BassKitProc.cpp | 4 +- plugins/WinVST/Baxandall/BaxandallProc.cpp | 12 +- plugins/WinVST/Biquad/BiquadProc.cpp | 12 +- plugins/WinVST/Biquad2/Biquad2Proc.cpp | 12 +- .../WinVST/BiquadDouble/BiquadDoubleProc.cpp | 12 +- .../BiquadOneHalf/BiquadOneHalfProc.cpp | 12 +- .../WinVST/BiquadTriple/BiquadTripleProc.cpp | 12 +- plugins/WinVST/BrassRider/BrassRiderProc.cpp | 12 +- .../BrightAmbience/BrightAmbienceProc.cpp | 12 +- .../BrightAmbience2/BrightAmbience2Proc.cpp | 12 +- plugins/WinVST/BuildATPDF/BuildATPDFProc.cpp | 8 +- plugins/WinVST/Calibre/CalibreProc.cpp | 20 +- plugins/WinVST/Capacitor2/Capacitor2Proc.cpp | 12 +- plugins/WinVST/Channel7/Channel7Proc.cpp | 12 +- plugins/WinVST/Channel8/Channel8Proc.cpp | 12 +- .../WinVST/ChromeOxide/ChromeOxideProc.cpp | 20 +- plugins/WinVST/Cider/CiderProc.cpp | 20 +- plugins/WinVST/Coils/CoilsProc.cpp | 12 +- .../Compresaturator/CompresaturatorProc.cpp | 8 +- .../WinVST/Console6Buss/Console6BussProc.cpp | 12 +- .../Console6Channel/Console6ChannelProc.cpp | 12 +- plugins/WinVST/Crystal/CrystalProc.cpp | 8 +- plugins/WinVST/DeBess/DeBessProc.cpp | 12 +- plugins/WinVST/DeHiss/DeHissProc.cpp | 12 +- plugins/WinVST/DeRez2/DeRez2Proc.cpp | 12 +- plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp | 60 +++--- .../WinVST/DigitalBlack/DigitalBlackProc.cpp | 12 +- plugins/WinVST/Distortion/DistortionProc.cpp | 12 +- plugins/WinVST/Ditherbox/DitherboxProc.cpp | 192 ++++++++--------- plugins/WinVST/DoublePaul/DoublePaulProc.cpp | 8 +- plugins/WinVST/DubCenter/DubCenterProc.cpp | 4 +- plugins/WinVST/DubSub/DubSubProc.cpp | 8 +- plugins/WinVST/Dyno/DynoProc.cpp | 12 +- plugins/WinVST/Elation/ElationProc.cpp | 20 +- plugins/WinVST/Facet/FacetProc.cpp | 12 +- plugins/WinVST/Focus/FocusProc.cpp | 12 +- plugins/WinVST/FromTape/FromTapeProc.cpp | 4 +- .../GlitchShifter/GlitchShifterProc.cpp | 12 +- plugins/WinVST/Gringer/GringerProc.cpp | 12 +- plugins/WinVST/Highpass2/Highpass2Proc.cpp | 12 +- plugins/WinVST/Infrasonic/InfrasonicProc.cpp | 12 +- plugins/WinVST/Interstage/InterstageProc.cpp | 12 +- plugins/WinVST/IronOxide5/IronOxide5Proc.cpp | 8 +- plugins/WinVST/Isolator/IsolatorProc.cpp | 12 +- plugins/WinVST/Lowpass2/Lowpass2Proc.cpp | 12 +- plugins/WinVST/Luxor/LuxorProc.cpp | 20 +- plugins/WinVST/MoNoam/MoNoamProc.cpp | 12 +- plugins/WinVST/Mojo/MojoProc.cpp | 12 +- .../NaturalizeDither/NaturalizeDitherProc.cpp | 8 +- plugins/WinVST/Neverland/NeverlandProc.cpp | 20 +- plugins/WinVST/Nikola/NikolaProc.cpp | 12 +- plugins/WinVST/NodeDither/NodeDitherProc.cpp | 8 +- plugins/WinVST/Noise/NoiseProc.cpp | 32 +-- plugins/WinVST/PaulDither/PaulDitherProc.cpp | 8 +- plugins/WinVST/PaulWide/PaulWideProc.cpp | 20 +- plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp | 12 +- .../WinVST/PocketVerbs/PocketVerbsProc.cpp | 12 +- plugins/WinVST/Podcast/PodcastProc.cpp | 12 +- .../PodcastDeluxe/PodcastDeluxeProc.cpp | 12 +- plugins/WinVST/PowerSag2/PowerSag2Proc.cpp | 12 +- plugins/WinVST/Precious/PreciousProc.cpp | 20 +- plugins/WinVST/PurestAir/PurestAirProc.cpp | 12 +- plugins/WinVST/Recurve/RecurveProc.cpp | 12 +- plugins/WinVST/Remap/RemapProc.cpp | 12 +- plugins/WinVST/ResEQ/ResEQProc.cpp | 12 +- plugins/WinVST/Slew3/Slew3Proc.cpp | 12 +- plugins/WinVST/Smooth/SmoothProc.cpp | 12 +- plugins/WinVST/SoftGate/SoftGateProc.cpp | 12 +- .../SpatializeDither/SpatializeDitherProc.cpp | 8 +- plugins/WinVST/TPDFDither/TPDFDitherProc.cpp | 16 +- plugins/WinVST/TPDFWide/TPDFWideProc.cpp | 40 ++-- plugins/WinVST/Tape/TapeProc.cpp | 12 +- plugins/WinVST/TapeDither/TapeDitherProc.cpp | 8 +- plugins/WinVST/ToTape5/ToTape5Proc.cpp | 4 +- plugins/WinVST/ToTape6/ToTape6Proc.cpp | 12 +- .../WinVST/TremoSquare/TremoSquareProc.cpp | 12 +- .../WinVST/TripleSpread/TripleSpreadProc.cpp | 12 +- plugins/WinVST/Ultrasonic/UltrasonicProc.cpp | 12 +- .../UltrasonicLite/UltrasonicLiteProc.cpp | 12 +- .../UltrasonicMed/UltrasonicMedProc.cpp | 12 +- plugins/WinVST/Vibrato/VibratoProc.cpp | 12 +- .../WinVST/VinylDither/VinylDitherProc.cpp | 128 +++++------ .../VoiceOfTheStarshipProc.cpp | 16 +- plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp | 12 +- plugins/WinVST/curve/curveProc.cpp | 12 +- 492 files changed, 4458 insertions(+), 4078 deletions(-) diff --git a/.gitignore b/.gitignore index e43b0f988..aaab5add3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +build/ \ No newline at end of file diff --git a/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp b/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp index c0b954717..f72f53455 100755 --- a/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp +++ b/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp @@ -155,11 +155,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -331,22 +331,22 @@ void Apicolypse::processDoubleReplacing(double **inputs, double **outputs, VstIn } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp b/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp index 3887a51d7..0d50b6348 100755 --- a/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp +++ b/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp @@ -172,12 +172,12 @@ void AverMatrix::processDoubleReplacing(double **inputs, double **outputs, VstIn //wet can be negative, in which case dry is always full volume and they cancel //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BassAmp/BassAmpProc.cpp b/plugins/LinuxVST/src/BassAmp/BassAmpProc.cpp index 025fa038a..23deba80d 100755 --- a/plugins/LinuxVST/src/BassAmp/BassAmpProc.cpp +++ b/plugins/LinuxVST/src/BassAmp/BassAmpProc.cpp @@ -195,7 +195,7 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -362,12 +362,13 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + LinputSample += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); frexpf((float)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + RinputSample += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); //end 32 bit stereo floating point dither + *out1 = LinputSample; *out2 = RinputSample; @@ -567,7 +568,7 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -733,12 +734,12 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //apply stored up tiny corrections //begin 64 bit stereo floating point dither - int expon; frexp((double)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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 = LinputSample; diff --git a/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp b/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp index 8575a9e62..d289cdb77 100755 --- a/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp +++ b/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp @@ -637,12 +637,12 @@ void BassDrive::processDoubleReplacing(double **inputs, double **outputs, VstInt flip = !flip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BassKit/BassKitProc.cpp b/plugins/LinuxVST/src/BassKit/BassKitProc.cpp index 620b4449d..b4621d946 100755 --- a/plugins/LinuxVST/src/BassKit/BassKitProc.cpp +++ b/plugins/LinuxVST/src/BassKit/BassKitProc.cpp @@ -57,7 +57,7 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -239,7 +239,7 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp b/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp index 772a7cadc..4590b6f3f 100755 --- a/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp +++ b/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp @@ -263,12 +263,12 @@ void Baxandall::processDoubleReplacing(double **inputs, double **outputs, VstInt //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Biquad/BiquadProc.cpp b/plugins/LinuxVST/src/Biquad/BiquadProc.cpp index f872c60ca..5faae53f4 100755 --- a/plugins/LinuxVST/src/Biquad/BiquadProc.cpp +++ b/plugins/LinuxVST/src/Biquad/BiquadProc.cpp @@ -303,12 +303,12 @@ void Biquad::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp b/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp index db8d29571..64369d6a9 100755 --- a/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp +++ b/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp @@ -413,12 +413,12 @@ void Biquad2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp b/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp index a0a47f4f4..55512a0ca 100755 --- a/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp +++ b/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp @@ -286,12 +286,12 @@ void BiquadDouble::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp index 001a00ee1..d2e75159c 100755 --- a/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp +++ b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp @@ -294,12 +294,12 @@ void BiquadOneHalf::processDoubleReplacing(double **inputs, double **outputs, Vs } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp b/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp index 84b05ed53..0db6bc66a 100755 --- a/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp +++ b/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp @@ -309,12 +309,12 @@ void BiquadTriple::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp b/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp index b53db95e5..66b5c75e5 100755 --- a/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp +++ b/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp @@ -205,12 +205,12 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (drySampleR * clamp * wet * 16.0); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp b/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp index 69a6193b7..be5ab28ea 100755 --- a/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp +++ b/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp @@ -653,12 +653,12 @@ void BrightAmbience::processDoubleReplacing(double **inputs, double **outputs, V gcount--; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp index 1e9b85c8b..506eeccc4 100755 --- a/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp +++ b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp @@ -125,12 +125,12 @@ void BrightAmbience2::processDoubleReplacing(double **inputs, double **outputs, //Dry/Wet control, defaults to the last slider //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/BuildATPDF/BuildATPDFProc.cpp b/plugins/LinuxVST/src/BuildATPDF/BuildATPDFProc.cpp index 0b61354b3..195c248ea 100755 --- a/plugins/LinuxVST/src/BuildATPDF/BuildATPDFProc.cpp +++ b/plugins/LinuxVST/src/BuildATPDF/BuildATPDFProc.cpp @@ -41,7 +41,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -58,7 +58,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -122,7 +122,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -139,7 +139,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -158,6 +158,11 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/Calibre/CalibreProc.cpp b/plugins/LinuxVST/src/Calibre/CalibreProc.cpp index b51ae2d14..b69d8fcbe 100755 --- a/plugins/LinuxVST/src/Calibre/CalibreProc.cpp +++ b/plugins/LinuxVST/src/Calibre/CalibreProc.cpp @@ -160,11 +160,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,21 @@ void Calibre::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; - //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp b/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp index 5bd961e2d..5d2537a67 100755 --- a/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp +++ b/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp @@ -315,12 +315,12 @@ void Capacitor2::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (inputSampleR * nonLinTrim * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp b/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp index bb42ba20a..9620c3b75 100755 --- a/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp +++ b/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp @@ -201,12 +201,12 @@ void Channel7::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp b/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp index f62bed44f..2c0b5ac3d 100755 --- a/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp +++ b/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp @@ -249,12 +249,12 @@ void Channel8::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp b/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp index 873c535f1..662e103f2 100755 --- a/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp +++ b/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp @@ -96,7 +96,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -112,7 +112,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -257,7 +257,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -273,7 +273,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -312,12 +312,12 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI //that simple. //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Cider/CiderProc.cpp b/plugins/LinuxVST/src/Cider/CiderProc.cpp index 31be7279f..114cb1b45 100755 --- a/plugins/LinuxVST/src/Cider/CiderProc.cpp +++ b/plugins/LinuxVST/src/Cider/CiderProc.cpp @@ -158,11 +158,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Cider::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Coils/CoilsProc.cpp b/plugins/LinuxVST/src/Coils/CoilsProc.cpp index 278f0690d..f6a0fcb3d 100755 --- a/plugins/LinuxVST/src/Coils/CoilsProc.cpp +++ b/plugins/LinuxVST/src/Coils/CoilsProc.cpp @@ -157,12 +157,12 @@ void Coils::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp b/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp index 9a70ac814..1503a0683 100755 --- a/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp +++ b/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp @@ -119,7 +119,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad L padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -140,7 +140,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad R padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -171,11 +171,11 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + 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); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + 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; @@ -258,7 +258,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -319,7 +319,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -351,12 +351,12 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //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; diff --git a/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp b/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp index 6e25bd3a3..02799869f 100755 --- a/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp +++ b/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp @@ -103,12 +103,12 @@ void Console6Buss::processDoubleReplacing(double **inputs, double **outputs, Vst //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp b/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp index a72e3b8f0..d73c63139 100755 --- a/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp +++ b/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp @@ -103,12 +103,12 @@ void Console6Channel::processDoubleReplacing(double **inputs, double **outputs, //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Crystal/CrystalProc.cpp b/plugins/LinuxVST/src/Crystal/CrystalProc.cpp index d5eef67c8..5e90250eb 100755 --- a/plugins/LinuxVST/src/Crystal/CrystalProc.cpp +++ b/plugins/LinuxVST/src/Crystal/CrystalProc.cpp @@ -143,12 +143,12 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. @@ -312,12 +312,12 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/LinuxVST/src/DeBess/DeBessProc.cpp b/plugins/LinuxVST/src/DeBess/DeBessProc.cpp index f868c8284..f70dbc417 100755 --- a/plugins/LinuxVST/src/DeBess/DeBessProc.cpp +++ b/plugins/LinuxVST/src/DeBess/DeBessProc.cpp @@ -193,12 +193,12 @@ void DeBess::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //sense monitoring //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp b/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp index 88547ff75..16c9324b1 100755 --- a/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp +++ b/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp @@ -251,12 +251,12 @@ void DeHiss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp b/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp index 4ff6cf82d..0581d7162 100755 --- a/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp +++ b/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp @@ -345,12 +345,12 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 lastSampleR = drySampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp b/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp index 1e59e635c..fb9b670f0 100755 --- a/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp +++ b/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp @@ -41,22 +41,22 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -226,22 +226,22 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -359,12 +359,12 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR += (HeadBumpR * wreck); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp b/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp index efd520f21..f84078ef5 100755 --- a/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp +++ b/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp @@ -191,12 +191,12 @@ void DigitalBlack::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Distortion/DistortionProc.cpp b/plugins/LinuxVST/src/Distortion/DistortionProc.cpp index 17240d1cf..66d7a78cd 100755 --- a/plugins/LinuxVST/src/Distortion/DistortionProc.cpp +++ b/plugins/LinuxVST/src/Distortion/DistortionProc.cpp @@ -231,12 +231,12 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Ditherbox/DitherboxProc.cpp b/plugins/LinuxVST/src/Ditherbox/DitherboxProc.cpp index 8851aeaa0..4ac891638 100755 --- a/plugins/LinuxVST/src/Ditherbox/DitherboxProc.cpp +++ b/plugins/LinuxVST/src/Ditherbox/DitherboxProc.cpp @@ -70,34 +70,34 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -108,7 +108,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -131,7 +131,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -156,8 +156,8 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -202,37 +202,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -249,37 +249,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -303,7 +303,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -317,7 +317,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -339,11 +339,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -965,7 +965,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl noiseShapingL += inputSampleL - drySampleL; noiseShapingR += inputSampleR - drySampleR; } - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -1039,34 +1043,34 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -1077,7 +1081,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -1100,7 +1104,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -1124,8 +1128,8 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -1170,37 +1174,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -1217,37 +1221,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -1271,7 +1275,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -1285,7 +1289,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -1307,11 +1311,11 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -1934,6 +1938,10 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt noiseShapingR += inputSampleR - drySampleR; } + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/DoublePaul/DoublePaulProc.cpp b/plugins/LinuxVST/src/DoublePaul/DoublePaulProc.cpp index 0ba4cae2b..cd11d65ea 100755 --- a/plugins/LinuxVST/src/DoublePaul/DoublePaulProc.cpp +++ b/plugins/LinuxVST/src/DoublePaul/DoublePaulProc.cpp @@ -33,7 +33,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -56,7 +56,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -80,6 +80,10 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,7 +120,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -139,7 +143,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -163,6 +167,10 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp b/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp index 197309401..b51207b1d 100755 --- a/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp +++ b/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp @@ -155,7 +155,7 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -438,7 +438,7 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/LinuxVST/src/DubSub/DubSubProc.cpp b/plugins/LinuxVST/src/DubSub/DubSubProc.cpp index 81acffd7a..bdc30447d 100755 --- a/plugins/LinuxVST/src/DubSub/DubSubProc.cpp +++ b/plugins/LinuxVST/src/DubSub/DubSubProc.cpp @@ -194,11 +194,11 @@ void DubSub::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise @@ -597,11 +597,11 @@ void DubSub::processDoubleReplacing(double **inputs, double **outputs, VstInt32 else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise diff --git a/plugins/LinuxVST/src/Dyno/DynoProc.cpp b/plugins/LinuxVST/src/Dyno/DynoProc.cpp index c2db122db..b6c6d71f6 100755 --- a/plugins/LinuxVST/src/Dyno/DynoProc.cpp +++ b/plugins/LinuxVST/src/Dyno/DynoProc.cpp @@ -83,12 +83,12 @@ void Dyno::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //dyno is the one that tries to raise peak energy //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Elation/ElationProc.cpp b/plugins/LinuxVST/src/Elation/ElationProc.cpp index 8df4ce867..d0e0ad4ce 100755 --- a/plugins/LinuxVST/src/Elation/ElationProc.cpp +++ b/plugins/LinuxVST/src/Elation/ElationProc.cpp @@ -258,12 +258,12 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; @@ -538,23 +538,23 @@ void Elation::processDoubleReplacing(double **inputs, double **outputs, VstInt32 flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Facet/FacetProc.cpp b/plugins/LinuxVST/src/Facet/FacetProc.cpp index 85af36f42..e237d9252 100755 --- a/plugins/LinuxVST/src/Facet/FacetProc.cpp +++ b/plugins/LinuxVST/src/Facet/FacetProc.cpp @@ -103,12 +103,12 @@ void Facet::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Focus/FocusProc.cpp b/plugins/LinuxVST/src/Focus/FocusProc.cpp index fd7624e72..a5f0ead84 100755 --- a/plugins/LinuxVST/src/Focus/FocusProc.cpp +++ b/plugins/LinuxVST/src/Focus/FocusProc.cpp @@ -265,12 +265,12 @@ void Focus::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/FromTape/FromTapeProc.cpp b/plugins/LinuxVST/src/FromTape/FromTapeProc.cpp index 5e8aca68a..46bc5759b 100755 --- a/plugins/LinuxVST/src/FromTape/FromTapeProc.cpp +++ b/plugins/LinuxVST/src/FromTape/FromTapeProc.cpp @@ -55,7 +55,7 @@ void FromTape::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section @@ -252,7 +252,7 @@ void FromTape::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp b/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp index 06ebe4bae..d5d446136 100755 --- a/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp +++ b/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp @@ -623,12 +623,12 @@ void GlitchShifter::processDoubleReplacing(double **inputs, double **outputs, Vs //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Gringer/GringerProc.cpp b/plugins/LinuxVST/src/Gringer/GringerProc.cpp index b59800001..2dc2a26fe 100755 --- a/plugins/LinuxVST/src/Gringer/GringerProc.cpp +++ b/plugins/LinuxVST/src/Gringer/GringerProc.cpp @@ -219,12 +219,12 @@ void Gringer::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp b/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp index e87194339..b66aa6d31 100755 --- a/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp +++ b/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp @@ -261,12 +261,12 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp b/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp index 653fac502..a530eeb65 100755 --- a/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp +++ b/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp @@ -209,12 +209,12 @@ void Infrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Interstage/InterstageProc.cpp b/plugins/LinuxVST/src/Interstage/InterstageProc.cpp index 2707bd744..ab0efc435 100755 --- a/plugins/LinuxVST/src/Interstage/InterstageProc.cpp +++ b/plugins/LinuxVST/src/Interstage/InterstageProc.cpp @@ -163,12 +163,12 @@ void Interstage::processDoubleReplacing(double **inputs, double **outputs, VstIn lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/IronOxide5/IronOxide5Proc.cpp b/plugins/LinuxVST/src/IronOxide5/IronOxide5Proc.cpp index a79d2d315..ebffe6e53 100755 --- a/plugins/LinuxVST/src/IronOxide5/IronOxide5Proc.cpp +++ b/plugins/LinuxVST/src/IronOxide5/IronOxide5Proc.cpp @@ -76,7 +76,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -347,7 +347,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); @@ -471,7 +471,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -742,7 +742,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); diff --git a/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp b/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp index 4f7178a86..0f756ee6e 100755 --- a/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp +++ b/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp @@ -229,12 +229,12 @@ void Isolator::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp b/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp index 1bed77696..8e27a2379 100755 --- a/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp +++ b/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp @@ -262,12 +262,12 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Luxor/LuxorProc.cpp b/plugins/LinuxVST/src/Luxor/LuxorProc.cpp index 89c8487ba..f6ef00f03 100755 --- a/plugins/LinuxVST/src/Luxor/LuxorProc.cpp +++ b/plugins/LinuxVST/src/Luxor/LuxorProc.cpp @@ -160,11 +160,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Luxor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp b/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp index c7835d557..a1ca2768d 100755 --- a/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp +++ b/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp @@ -91,12 +91,12 @@ void MoNoam::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (processing == kBYPASS) {inputSampleL = *in1; inputSampleR = *in2;} //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Mojo/MojoProc.cpp b/plugins/LinuxVST/src/Mojo/MojoProc.cpp index 2597aae9e..e29ef01b9 100755 --- a/plugins/LinuxVST/src/Mojo/MojoProc.cpp +++ b/plugins/LinuxVST/src/Mojo/MojoProc.cpp @@ -83,12 +83,12 @@ void Mojo::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //mojo is the one that flattens WAAAAY out very softly before wavefolding //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/NaturalizeDither/NaturalizeDitherProc.cpp b/plugins/LinuxVST/src/NaturalizeDither/NaturalizeDitherProc.cpp index ffc731e21..6228d9601 100755 --- a/plugins/LinuxVST/src/NaturalizeDither/NaturalizeDitherProc.cpp +++ b/plugins/LinuxVST/src/NaturalizeDither/NaturalizeDitherProc.cpp @@ -36,11 +36,11 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -195,6 +195,10 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -234,11 +238,11 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -393,6 +397,10 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp b/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp index 02dcb04b7..babded715 100755 --- a/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp +++ b/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp @@ -156,11 +156,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -332,22 +332,22 @@ void Neverland::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Nikola/NikolaProc.cpp b/plugins/LinuxVST/src/Nikola/NikolaProc.cpp index 3c049ce59..86e5285a6 100755 --- a/plugins/LinuxVST/src/Nikola/NikolaProc.cpp +++ b/plugins/LinuxVST/src/Nikola/NikolaProc.cpp @@ -2028,12 +2028,12 @@ void Nikola::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/NodeDither/NodeDitherProc.cpp b/plugins/LinuxVST/src/NodeDither/NodeDitherProc.cpp index 50f3e85f9..cf4d3c51d 100755 --- a/plugins/LinuxVST/src/NodeDither/NodeDitherProc.cpp +++ b/plugins/LinuxVST/src/NodeDither/NodeDitherProc.cpp @@ -43,10 +43,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -71,6 +71,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -117,10 +121,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -145,6 +149,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/Noise/NoiseProc.cpp b/plugins/LinuxVST/src/Noise/NoiseProc.cpp index 82d67fde1..bc268c0ff 100755 --- a/plugins/LinuxVST/src/Noise/NoiseProc.cpp +++ b/plugins/LinuxVST/src/Noise/NoiseProc.cpp @@ -118,12 +118,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -134,12 +134,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -173,10 +173,10 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { @@ -388,12 +388,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -404,12 +404,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -443,10 +443,10 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/LinuxVST/src/PaulDither/PaulDitherProc.cpp b/plugins/LinuxVST/src/PaulDither/PaulDitherProc.cpp index 476bfd332..6495542ba 100755 --- a/plugins/LinuxVST/src/PaulDither/PaulDitherProc.cpp +++ b/plugins/LinuxVST/src/PaulDither/PaulDitherProc.cpp @@ -42,8 +42,8 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -69,6 +69,10 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -114,8 +118,8 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -141,6 +145,10 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/PaulWide/PaulWideProc.cpp b/plugins/LinuxVST/src/PaulWide/PaulWideProc.cpp index 13cd58f79..ecdae8a30 100644 --- a/plugins/LinuxVST/src/PaulWide/PaulWideProc.cpp +++ b/plugins/LinuxVST/src/PaulWide/PaulWideProc.cpp @@ -46,34 +46,34 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -85,6 +85,10 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -134,34 +138,34 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -173,6 +177,10 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp b/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp index d7d4af84c..794da2b65 100755 --- a/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp +++ b/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp @@ -267,12 +267,12 @@ void PeaksOnly::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR *= 0.63679; //scale it to 0dB output at full blast //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp b/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp index 5d8a7d157..3865d3bfc 100755 --- a/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp +++ b/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp @@ -18339,12 +18339,12 @@ void PocketVerbs::processDoubleReplacing(double **inputs, double **outputs, VstI //here we combine the tanks with the dry signal //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Podcast/PodcastProc.cpp b/plugins/LinuxVST/src/Podcast/PodcastProc.cpp index a6bd88d45..48f864776 100755 --- a/plugins/LinuxVST/src/Podcast/PodcastProc.cpp +++ b/plugins/LinuxVST/src/Podcast/PodcastProc.cpp @@ -307,12 +307,12 @@ void Podcast::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (inputSampleR < -0.999) inputSampleR = -0.999; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp index 2f306c079..c13b4ef04 100755 --- a/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp +++ b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp @@ -640,12 +640,12 @@ void PodcastDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vs //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp b/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp index 4b637c3ff..88eb14def 100755 --- a/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp +++ b/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp @@ -127,12 +127,12 @@ void PowerSag2::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR = drySampleR - (difference * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Precious/PreciousProc.cpp b/plugins/LinuxVST/src/Precious/PreciousProc.cpp index a2de05c32..189a324a9 100755 --- a/plugins/LinuxVST/src/Precious/PreciousProc.cpp +++ b/plugins/LinuxVST/src/Precious/PreciousProc.cpp @@ -158,11 +158,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Precious::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp b/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp index d2df18951..a4efee935 100755 --- a/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp +++ b/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp @@ -199,12 +199,12 @@ void PurestAir::processDoubleReplacing(double **inputs, double **outputs, VstInt } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Recurve/RecurveProc.cpp b/plugins/LinuxVST/src/Recurve/RecurveProc.cpp index 1b56af4a1..376e84f7f 100755 --- a/plugins/LinuxVST/src/Recurve/RecurveProc.cpp +++ b/plugins/LinuxVST/src/Recurve/RecurveProc.cpp @@ -99,12 +99,12 @@ void Recurve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //iron bar so people can play with this as a loudenator //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Remap/RemapProc.cpp b/plugins/LinuxVST/src/Remap/RemapProc.cpp index 32bb5b9e6..f715824c8 100755 --- a/plugins/LinuxVST/src/Remap/RemapProc.cpp +++ b/plugins/LinuxVST/src/Remap/RemapProc.cpp @@ -137,12 +137,12 @@ void Remap::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp b/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp index 22c389843..e11603657 100755 --- a/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp +++ b/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp @@ -579,12 +579,12 @@ void ResEQ::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp b/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp index 297a4f6e3..295ab21c6 100755 --- a/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp +++ b/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp @@ -135,12 +135,12 @@ void Slew3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //end R //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Smooth/SmoothProc.cpp b/plugins/LinuxVST/src/Smooth/SmoothProc.cpp index 9d532987c..24d9c46f1 100755 --- a/plugins/LinuxVST/src/Smooth/SmoothProc.cpp +++ b/plugins/LinuxVST/src/Smooth/SmoothProc.cpp @@ -293,12 +293,12 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp b/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp index f08b9563c..9d97f9297 100755 --- a/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp +++ b/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp @@ -127,12 +127,12 @@ void SoftGate::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/SpatializeDither/SpatializeDitherProc.cpp b/plugins/LinuxVST/src/SpatializeDither/SpatializeDitherProc.cpp index bf9da7ef7..d3e5723be 100755 --- a/plugins/LinuxVST/src/SpatializeDither/SpatializeDitherProc.cpp +++ b/plugins/LinuxVST/src/SpatializeDither/SpatializeDitherProc.cpp @@ -51,7 +51,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -65,7 +65,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -88,6 +88,10 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -142,7 +146,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -156,7 +160,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -179,6 +183,10 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/TPDFDither/TPDFDitherProc.cpp b/plugins/LinuxVST/src/TPDFDither/TPDFDitherProc.cpp index e51504299..f86345088 100755 --- a/plugins/LinuxVST/src/TPDFDither/TPDFDitherProc.cpp +++ b/plugins/LinuxVST/src/TPDFDither/TPDFDitherProc.cpp @@ -42,11 +42,11 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -55,6 +55,10 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -100,11 +104,11 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -113,6 +117,10 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/TPDFWide/TPDFWideProc.cpp b/plugins/LinuxVST/src/TPDFWide/TPDFWideProc.cpp index 45b831dac..2b9232bf0 100644 --- a/plugins/LinuxVST/src/TPDFWide/TPDFWideProc.cpp +++ b/plugins/LinuxVST/src/TPDFWide/TPDFWideProc.cpp @@ -40,31 +40,31 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -73,6 +73,10 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,31 +120,31 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -149,6 +153,10 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/Tape/TapeProc.cpp b/plugins/LinuxVST/src/Tape/TapeProc.cpp index 2f26675ed..ea73fea27 100755 --- a/plugins/LinuxVST/src/Tape/TapeProc.cpp +++ b/plugins/LinuxVST/src/Tape/TapeProc.cpp @@ -553,12 +553,12 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //final iron bar //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/TapeDither/TapeDitherProc.cpp b/plugins/LinuxVST/src/TapeDither/TapeDitherProc.cpp index 4bf9003fd..f67b259b1 100755 --- a/plugins/LinuxVST/src/TapeDither/TapeDitherProc.cpp +++ b/plugins/LinuxVST/src/TapeDither/TapeDitherProc.cpp @@ -41,8 +41,8 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -65,6 +65,10 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -110,8 +114,8 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -134,6 +138,10 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/ToTape5/ToTape5Proc.cpp b/plugins/LinuxVST/src/ToTape5/ToTape5Proc.cpp index 504bbc829..840dbd28c 100755 --- a/plugins/LinuxVST/src/ToTape5/ToTape5Proc.cpp +++ b/plugins/LinuxVST/src/ToTape5/ToTape5Proc.cpp @@ -77,7 +77,7 @@ void ToTape5::processReplacing(float **inputs, float **outputs, VstInt32 sampleF drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; @@ -406,7 +406,7 @@ void ToTape5::processDoubleReplacing(double **inputs, double **outputs, VstInt32 drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp b/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp index f3a052485..3cfc521fd 100755 --- a/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp +++ b/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp @@ -657,12 +657,12 @@ void ToTape6::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp b/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp index ec7d1b27b..574ce7f45 100755 --- a/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp +++ b/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp @@ -127,12 +127,12 @@ void TremoSquare::processDoubleReplacing(double **inputs, double **outputs, VstI } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp b/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp index ef7721197..c04e6dfed 100755 --- a/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp +++ b/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp @@ -627,12 +627,12 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp b/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp index 96ee029c7..5e3a29ced 100755 --- a/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp +++ b/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp @@ -209,12 +209,12 @@ void Ultrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp b/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp index cbce9a998..5c9d08a86 100644 --- a/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp +++ b/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp @@ -91,12 +91,12 @@ void UltrasonicLite::processDoubleReplacing(double **inputs, double **outputs, V biquadA[12] = biquadA[11]; biquadA[11] = inputSampleR; inputSampleR = outSampleR; biquadA[14] = biquadA[13]; biquadA[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp b/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp index 8e3cb8250..cecb2a823 100644 --- a/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp +++ b/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp @@ -129,12 +129,12 @@ void UltrasonicMed::processDoubleReplacing(double **inputs, double **outputs, Vs biquadB[12] = biquadB[11]; biquadB[11] = inputSampleR; inputSampleR = outSampleR; biquadB[14] = biquadB[13]; biquadB[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp b/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp index f196e90e2..ce0795b37 100755 --- a/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp +++ b/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp @@ -185,12 +185,12 @@ void Vibrato::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //Inv/Dry/Wet control //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/VinylDither/VinylDitherProc.cpp b/plugins/LinuxVST/src/VinylDither/VinylDitherProc.cpp index d73eece2d..018cea36a 100755 --- a/plugins/LinuxVST/src/VinylDither/VinylDitherProc.cpp +++ b/plugins/LinuxVST/src/VinylDither/VinylDitherProc.cpp @@ -41,37 +41,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -87,37 +87,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -136,6 +136,10 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -180,37 +184,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -226,37 +230,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -275,6 +279,10 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/LinuxVST/src/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp b/plugins/LinuxVST/src/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp index dda1805dc..fd6e5bdfa 100755 --- a/plugins/LinuxVST/src/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp +++ b/plugins/LinuxVST/src/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp @@ -110,10 +110,10 @@ void VoiceOfTheStarship::processReplacing(float **inputs, float **outputs, VstIn //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) @@ -300,10 +300,10 @@ void VoiceOfTheStarship::processDoubleReplacing(double **inputs, double **output //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp b/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp index 53ecb0fff..97604cacb 100755 --- a/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp +++ b/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp @@ -195,12 +195,12 @@ void VoiceTrick::processDoubleReplacing(double **inputs, double **outputs, VstIn //Thanks to Peter Gabriel for many great examples of hit vocals recorded just like this :) //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/LinuxVST/src/curve/curveProc.cpp b/plugins/LinuxVST/src/curve/curveProc.cpp index 1b607c120..56fdbfd9b 100755 --- a/plugins/LinuxVST/src/curve/curveProc.cpp +++ b/plugins/LinuxVST/src/curve/curveProc.cpp @@ -87,12 +87,12 @@ void curve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s inputSampleR *= 2.0; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser index 941868c0a..36be6d293 100755 --- a/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569587824; - PBXWorkspaceStateSaveDate = 569587824; + PBXPerProjectTemplateStateSaveDate = 667720785; + PBXWorkspaceStateSaveDate = 667720785; }; perUserProjectItems = { - 8B79272821F33919006E9731 /* PBXTextBookmark */ = 8B79272821F33919006E9731 /* PBXTextBookmark */; - 8B79273321F33979006E9731 /* PBXTextBookmark */ = 8B79273321F33979006E9731 /* PBXTextBookmark */; + 8B1A8D4E27CC9C5600649D11 /* PBXTextBookmark */ = 8B1A8D4E27CC9C5600649D11 /* PBXTextBookmark */; + 8B9FE17F27CAD398002EC0AA /* PBXTextBookmark */ = 8B9FE17F27CAD398002EC0AA /* PBXTextBookmark */; 8BAC117C1F8245C00066CBCE /* PlistBookmark */ = 8BAC117C1F8245C00066CBCE /* PlistBookmark */; 8BBB330321C4563C00825986 /* PBXTextBookmark */ = 8BBB330321C4563C00825986 /* PBXTextBookmark */; }; @@ -62,32 +62,32 @@ userBuildSettings = { }; }; - 8B79272821F33919006E9731 /* PBXTextBookmark */ = { + 8B1A8D4E27CC9C5600649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ADClip7.cpp */; name = "ADClip7.cpp: 205"; rLen = 7; rLoc = 9006; rType = 0; - vrLen = 261; - vrLoc = 9866; + vrLen = 60; + vrLoc = 9844; }; - 8B79273321F33979006E9731 /* PBXTextBookmark */ = { + 8B9FE17F27CAD398002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* ADClip7.cpp */; name = "ADClip7.cpp: 205"; rLen = 7; rLoc = 9006; rType = 0; - vrLen = 215; - vrLoc = 9864; + vrLen = 121; + vrLoc = 9844; }; 8BA05A660720730100365D66 /* ADClip7.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {572, 6513}}"; + sepNavIntBoundsRect = "{{0, 0}, {579, 8514}}"; sepNavSelRange = "{9006, 7}"; - sepNavVisRange = "{9864, 215}"; - sepNavWindowFrame = "{{327, 43}, {1027, 835}}"; + sepNavVisRange = "{9844, 60}"; + sepNavWindowFrame = "{{253, 4}, {1027, 694}}"; }; }; 8BA05A690720730100365D66 /* ADClip7Version.h */ = { diff --git a/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 index 186a18816..5d5969330 100755 --- a/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -307,7 +309,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 585}} PBXTopSmartGroupGIDs @@ -317,14 +319,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 603}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 391 159 841 654 0 0 1440 878 + 392 234 841 644 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -352,12 +354,12 @@ _historyCapacity 0 bookmark - 8B79273321F33979006E9731 + 8B1A8D4E27CC9C5600649D11 history 8BAC117C1F8245C00066CBCE 8BBB330321C4563C00825986 - 8B79272821F33919006E9731 + 8B9FE17F27CAD398002EC0AA SplitCount @@ -371,18 +373,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 92}} + {{0, 0}, {531, 54}} RubberWindowFrame - 391 159 841 654 0 0 1440 878 + 392 234 841 644 0 0 1440 878 Module PBXNavigatorGroup Proportion - 92pt + 54pt Proportion - 516pt + 544pt Tabs @@ -396,7 +398,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 489}} + {{10, 27}, {531, 517}} + RubberWindowFrame + 392 234 841 644 0 0 1440 878 Module XCDetailModule @@ -451,8 +455,6 @@ Frame {{10, 27}, {531, 489}} - RubberWindowFrame - 391 159 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -480,11 +482,11 @@ TableOfContents - 8B79273421F33979006E9731 + 8B1A8D4F27CC9C5600649D11 1CA23ED40692098700951B8B - 8B79273521F33979006E9731 + 8B1A8D5027CC9C5600649D11 8BD7274A1D46E5A5000176F0 - 8B79273621F33979006E9731 + 8B1A8D5127CC9C5600649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -657,7 +659,7 @@ StatusbarIsVisible TimeStamp - 569588089.57457805 + 667720790.04876494 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -674,11 +676,10 @@ 5 WindowOrderList - 8B79273721F33979006E9731 - /Users/christopherjohnson/Desktop/MacAU/ADClip7/ADClip7.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ADClip7/ADClip7.xcodeproj WindowString - 391 159 841 654 0 0 1440 878 + 392 234 841 644 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser index 6b9cb482b..3a6f7d32e 100755 --- a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.pbxuser @@ -49,18 +49,18 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 631579871; - PBXWorkspaceStateSaveDate = 631579871; + PBXPerProjectTemplateStateSaveDate = 667720800; + PBXWorkspaceStateSaveDate = 667720800; }; perUserProjectItems = { - 8B2E795625A5250900485B86 /* PlistBookmark */ = 8B2E795625A5250900485B86 /* PlistBookmark */; - 8BA53C0C22217287005CB2C3 /* PlistBookmark */ = 8BA53C0C22217287005CB2C3 /* PlistBookmark */; + 8B1A8D5E27CC9C7200649D11 /* PlistBookmark */ = 8B1A8D5E27CC9C7200649D11 /* PlistBookmark */; + 8B9FE1AE27CAD3BB002EC0AA /* PlistBookmark */ = 8B9FE1AE27CAD3BB002EC0AA /* PlistBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B2E795625A5250900485B86 /* PlistBookmark */ = { + 8B1A8D5E27CC9C7200649D11 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; fallbackIsa = PBXBookmark; @@ -68,16 +68,28 @@ kPath = ( CFBundleName, ); - name = /Users/christopherjohnson/Desktop/Plugins/MacAU/ADT/Info.plist; + name = /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ADT/Info.plist; rLen = 0; rLoc = 9223372036854775807; }; + 8B9FE1AE27CAD3BB002EC0AA /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ADT/Info.plist; + rLen = 0; + rLoc = 9223372036854775808; + }; 8BA05A660720730100365D66 /* ADT.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 5652}}"; + sepNavIntBoundsRect = "{{0, 0}, {1056, 5580}}"; sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{10756, 1548}"; - sepNavWindowFrame = "{{396, 68}, {890, 810}}"; + sepNavVisRange = "{9853, 1058}"; + sepNavWindowFrame = "{{390, 4}, {890, 694}}"; }; }; 8BA05A690720730100365D66 /* ADTVersion.h */ = { @@ -88,18 +100,6 @@ sepNavWindowFrame = "{{15, 63}, {890, 810}}"; }; }; - 8BA53C0C22217287005CB2C3 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - CFBundleName, - ); - name = /Users/christopherjohnson/Desktop/Plugins/MacAU/ADT/Info.plist; - rLen = 0; - rLoc = 0; - }; 8BC6025B073B072D006C4272 /* ADT.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {894, 2028}}"; diff --git a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 index bb219d454..39278bdf5 100755 --- a/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 @@ -326,7 +326,7 @@ 288 RubberWindowFrame - 597 292 653 504 0 0 1440 878 + 597 293 653 504 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,10 +354,10 @@ _historyCapacity 0 bookmark - 8B2E795625A5250900485B86 + 8B1A8D5E27CC9C7200649D11 history - 8BA53C0C22217287005CB2C3 + 8B9FE1AE27CAD3BB002EC0AA SplitCount @@ -373,7 +373,7 @@ Frame {{0, 0}, {343, 0}} RubberWindowFrame - 597 292 653 504 0 0 1440 878 + 597 293 653 504 0 0 1440 878 Module PBXNavigatorGroup @@ -398,7 +398,7 @@ Frame {{10, 27}, {343, 431}} RubberWindowFrame - 597 292 653 504 0 0 1440 878 + 597 293 653 504 0 0 1440 878 Module XCDetailModule @@ -480,11 +480,11 @@ TableOfContents - 8B2E795725A5250900485B86 + 8B1A8D5F27CC9C7200649D11 1CA23ED40692098700951B8B - 8B2E795825A5250900485B86 + 8B1A8D6027CC9C7200649D11 8BD7274A1D46E5A5000176F0 - 8B2E795925A5250900485B86 + 8B1A8D6127CC9C7200649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -657,7 +657,7 @@ StatusbarIsVisible TimeStamp - 631579913.66563702 + 667720818.60424101 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -674,11 +674,11 @@ 5 WindowOrderList - 8B2E795A25A5250900485B86 - /Users/christopherjohnson/Desktop/Plugins/MacAU/ADT/ADT.xcodeproj + 8B1A8D6227CC9C7200649D11 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ADT/ADT.xcodeproj WindowString - 597 292 653 504 0 0 1440 878 + 597 293 653 504 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.cpp b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.cpp index 365c61814..6e8d978e9 100755 --- a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.cpp +++ b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.cpp @@ -385,7 +385,7 @@ void AQuickVoiceClip::AQuickVoiceClipKernel::Process( const Float32 *inSourceP iirSampleD = (iirSampleD * altAmount) + (passThrough * iirAmount); passThrough -= iirSampleD; } - flip = not flip; + flip = !flip; //highpass section diff --git a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.h b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.h index 5cb485a04..8a0fa1ad1 100755 --- a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.h +++ b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.h @@ -159,6 +159,7 @@ public: Float64 iirSampleD; bool flip; Float64 fpNShape; + uint32_t fpd; }; }; diff --git a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser index ec97115b2..80605a6c7 100755 --- a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser @@ -49,17 +49,27 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569588500; - PBXWorkspaceStateSaveDate = 569588500; + PBXPerProjectTemplateStateSaveDate = 667720848; + PBXWorkspaceStateSaveDate = 667720848; }; perUserProjectItems = { + 8B1A8D9927CC9CE500649D11 /* PBXTextBookmark */ = 8B1A8D9927CC9CE500649D11 /* PBXTextBookmark */; 8B79277E21F33BC7006E9731 /* PBXTextBookmark */ = 8B79277E21F33BC7006E9731 /* PBXTextBookmark */; - 8B9D72B61F7F1114007AB60F /* PBXTextBookmark */ = 8B9D72B61F7F1114007AB60F /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B1A8D9927CC9CE500649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A690720730100365D66 /* AQuickVoiceClipVersion.h */; + name = "AQuickVoiceClipVersion.h: 54"; + rLen = 0; + rLoc = 2936; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; 8B79277E21F33BC7006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* AQuickVoiceClipVersion.h */; @@ -70,27 +80,17 @@ vrLen = 0; vrLoc = 0; }; - 8B9D72B61F7F1114007AB60F /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A690720730100365D66 /* AQuickVoiceClipVersion.h */; - name = "AQuickVoiceClipVersion.h: 54"; - rLen = 0; - rLoc = 2936; - rType = 0; - vrLen = 0; - vrLoc = 0; - }; 8BA05A660720730100365D66 /* AQuickVoiceClip.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1104, 6604}}"; - sepNavSelRange = "{16734, 0}"; - sepNavVisRange = "{15329, 1491}"; + sepNavIntBoundsRect = "{{0, 0}, {1884, 7704}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{13441, 1096}"; sepNavWindowFrame = "{{175, 59}, {1151, 803}}"; }; }; 8BA05A690720730100365D66 /* AQuickVoiceClipVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {518, 806}}"; + sepNavIntBoundsRect = "{{0, 0}, {518, 1116}}"; sepNavSelRange = "{2936, 0}"; sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{15, 70}, {1151, 803}}"; @@ -98,9 +98,9 @@ }; 8BC6025B073B072D006C4272 /* AQuickVoiceClip.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1104, 2392}}"; - sepNavSelRange = "{5940, 0}"; - sepNavVisRange = "{4794, 1256}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 3546}}"; + sepNavSelRange = "{5956, 0}"; + sepNavVisRange = "{5227, 833}"; sepNavWindowFrame = "{{16, 57}, {1151, 803}}"; }; }; diff --git a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 index e2f0f9970..6bbb23990 100755 --- a/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -298,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 4 + 3 2 1 0 @@ -350,10 +352,10 @@ _historyCapacity 0 bookmark - 8B79277E21F33BC7006E9731 + 8B1A8D9927CC9CE500649D11 history - 8B9D72B61F7F1114007AB60F + 8B79277E21F33BC7006E9731 SplitCount @@ -476,11 +478,11 @@ TableOfContents - 8B79277F21F33BC7006E9731 + 8B1A8D9A27CC9CE500649D11 1CA23ED40692098700951B8B - 8B79278021F33BC7006E9731 + 8B1A8D9B27CC9CE500649D11 8B81AD171E85459D00889355 - 8B79278121F33BC7006E9731 + 8B1A8D9C27CC9CE500649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -633,7 +635,7 @@ StatusbarIsVisible TimeStamp - 569588679.18826604 + 667720933.95058298 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -650,7 +652,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/AQuickVoiceClip/AQuickVoiceClip.xcodeproj WindowString 218 365 810 487 0 0 1440 878 diff --git a/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser index 9aa0bf4c7..973716c63 100755 --- a/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser @@ -49,43 +49,38 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 651515923; - PBXWorkspaceStateSaveDate = 651515923; + PBXPerProjectTemplateStateSaveDate = 667720762; + PBXWorkspaceStateSaveDate = 667720762; }; perUserProjectItems = { - 8B5158A326D5581D005B9297 /* PBXBookmark */ = 8B5158A326D5581D005B9297 /* PBXBookmark */; - 8B5158A426D55832005B9297 /* PBXTextBookmark */ = 8B5158A426D55832005B9297 /* PBXTextBookmark */; - 8B5158AA26D55832005B9297 /* PBXTextBookmark */ = 8B5158AA26D55832005B9297 /* PBXTextBookmark */; + 8B07A30B27CAB67A005AED0E /* PBXTextBookmark */ = 8B07A30B27CAB67A005AED0E /* PBXTextBookmark */; + 8B1A8D3427CC9C4300649D11 /* PBXTextBookmark */ = 8B1A8D3427CC9C4300649D11 /* PBXTextBookmark */; 8B6FC0BF20114A1C003CA5F7 /* PlistBookmark */ = 8B6FC0BF20114A1C003CA5F7 /* PlistBookmark */; - 8B79271721F3384E006E9731 /* PBXTextBookmark */ = 8B79271721F3384E006E9731 /* PBXTextBookmark */; + 8B9FE21027CAD617002EC0AA /* PBXTextBookmark */ = 8B9FE21027CAD617002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B5158A326D5581D005B9297 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BA05A660720730100365D66 /* Acceleration.cpp */; + 8B07A30B27CAB67A005AED0E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Acceleration.h */; + name = "Acceleration.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 333; + vrLoc = 5180; }; - 8B5158A426D55832005B9297 /* PBXTextBookmark */ = { + 8B1A8D3427CC9C4300649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* Acceleration.cpp */; - name = "Acceleration.cpp: 229"; - rLen = 0; - rLoc = 10378; + name = "Acceleration.cpp: 237"; + rLen = 264; + rLoc = 9838; rType = 0; - vrLen = 160; - vrLoc = 10298; - }; - 8B5158AA26D55832005B9297 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Acceleration.cpp */; - name = "Acceleration.cpp: 207"; - rLen = 0; - rLoc = 9049; - rType = 0; - vrLen = 1782; - vrLoc = 8598; + vrLen = 559; + vrLoc = 9631; }; 8B6FC0BF20114A1C003CA5F7 /* PlistBookmark */ = { isa = PlistBookmark; @@ -99,22 +94,22 @@ rLen = 0; rLoc = 9223372036854775808; }; - 8B79271721F3384E006E9731 /* PBXTextBookmark */ = { + 8B9FE21027CAD617002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* Acceleration.cpp */; - name = "Acceleration.cpp: 234"; - rLen = 0; - rLoc = 10378; + name = "Acceleration.cpp: 237"; + rLen = 264; + rLoc = 9838; rType = 0; - vrLen = 269; - vrLoc = 10290; + vrLen = 530; + vrLoc = 9660; }; 8BA05A660720730100365D66 /* Acceleration.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {867, 5004}}"; - sepNavSelRange = "{10378, 0}"; - sepNavVisRange = "{10298, 160}"; - sepNavWindowFrame = "{{378, 42}, {895, 836}}"; + sepNavIntBoundsRect = "{{0, 0}, {813, 4860}}"; + sepNavSelRange = "{9838, 264}"; + sepNavVisRange = "{9631, 559}"; + sepNavWindowFrame = "{{267, 4}, {895, 694}}"; }; }; 8BA05A690720730100365D66 /* AccelerationVersion.h */ = { @@ -127,9 +122,9 @@ }; 8BC6025B073B072D006C4272 /* Acceleration.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {894, 1872}}"; - sepNavSelRange = "{5413, 0}"; - sepNavVisRange = "{3998, 1517}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 2664}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{5180, 333}"; sepNavWindowFrame = "{{545, 39}, {895, 839}}"; }; }; diff --git a/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 index f4f06987f..2cfd3d51d 100755 --- a/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 @@ -222,48 +222,7 @@ OpenEditors - - - Content - - PBXProjectModuleGUID - 8B5158A826D55832005B9297 - PBXProjectModuleLabel - Acceleration.cpp - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 8B5158A926D55832005B9297 - PBXProjectModuleLabel - Acceleration.cpp - _historyCapacity - 0 - bookmark - 8B5158AA26D55832005B9297 - history - - 8B5158A326D5581D005B9297 - - - SplitCount - 1 - - StatusBarVisibility - - - Geometry - - Frame - {{0, 20}, {895, 739}} - PBXModuleWindowStatusBarHidden2 - - RubberWindowFrame - 378 98 895 780 0 0 1440 878 - - - + PerspectiveWidths 841 @@ -297,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -350,7 +307,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 585}} PBXTopSmartGroupGIDs @@ -360,14 +317,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 603}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 354 224 841 654 0 0 1440 878 + 266 227 841 644 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -378,6 +335,8 @@ Dock + BecomeActive + ContentConfiguration PBXProjectModuleGUID @@ -395,11 +354,12 @@ _historyCapacity 0 bookmark - 8B5158A426D55832005B9297 + 8B1A8D3427CC9C4300649D11 history 8B6FC0BF20114A1C003CA5F7 - 8B79271721F3384E006E9731 + 8B07A30B27CAB67A005AED0E + 8B9FE21027CAD617002EC0AA SplitCount @@ -413,18 +373,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 173}} + {{0, 0}, {531, 387}} RubberWindowFrame - 354 224 841 654 0 0 1440 878 + 266 227 841 644 0 0 1440 878 Module PBXNavigatorGroup Proportion - 173pt + 387pt Proportion - 435pt + 211pt Tabs @@ -438,9 +398,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 408}} + {{10, 27}, {531, 184}} RubberWindowFrame - 354 224 841 654 0 0 1440 878 + 266 227 841 644 0 0 1440 878 Module XCDetailModule @@ -522,11 +482,11 @@ TableOfContents - 8B5158A526D55832005B9297 + 8B1A8D3527CC9C4300649D11 1CA23ED40692098700951B8B - 8B5158A626D55832005B9297 + 8B1A8D3627CC9C4300649D11 8BD7274A1D46E5A5000176F0 - 8B5158A726D55832005B9297 + 8B1A8D3727CC9C4300649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -699,7 +659,7 @@ StatusbarIsVisible TimeStamp - 651515954.46088898 + 667720771.23180103 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -717,10 +677,9 @@ WindowOrderList /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Acceleration/Acceleration.xcodeproj - 8B5158A826D55832005B9297 WindowString - 354 224 841 654 0 0 1440 878 + 266 227 841 644 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser index af2077708..e74c7fb12 100755 --- a/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser @@ -49,18 +49,28 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 630330483; - PBXWorkspaceStateSaveDate = 630330483; + PBXPerProjectTemplateStateSaveDate = 667720776; + PBXWorkspaceStateSaveDate = 667720776; }; perUserProjectItems = { + 8B1A8D4127CC9C4C00649D11 /* PBXTextBookmark */ = 8B1A8D4127CC9C4C00649D11 /* PBXTextBookmark */; 8B3509F725910C3400B30D41 /* PlistBookmark */ = 8B3509F725910C3400B30D41 /* PlistBookmark */; - 8BE1AB982597DB0600E5CF6A /* PBXTextBookmark */ = 8BE1AB982597DB0600E5CF6A /* PBXTextBookmark */; - 8BE1AB992597DB0600E5CF6A /* PBXTextBookmark */ = 8BE1AB992597DB0600E5CF6A /* PBXTextBookmark */; + 8B9FE14E27CAD371002EC0AA /* PBXTextBookmark */ = 8B9FE14E27CAD371002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B1A8D4127CC9C4C00649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Acceleration2.cpp */; + name = "Acceleration2.cpp: 218"; + rLen = 0; + rLoc = 9688; + rType = 0; + vrLen = 718; + vrLoc = 8869; + }; 8B3509F725910C3400B30D41 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -73,12 +83,22 @@ rLen = 0; rLoc = 9223372036854775808; }; + 8B9FE14E27CAD371002EC0AA /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Acceleration2.cpp */; + name = "Acceleration2.cpp: 218"; + rLen = 0; + rLoc = 9688; + rType = 0; + vrLen = 762; + vrLoc = 8825; + }; 8BA05A660720730100365D66 /* Acceleration2.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {993, 4644}}"; + sepNavIntBoundsRect = "{{0, 0}, {1272, 4752}}"; sepNavSelRange = "{9688, 0}"; - sepNavVisRange = "{8567, 350}"; - sepNavWindowFrame = "{{344, 42}, {1065, 836}}"; + sepNavVisRange = "{8869, 718}"; + sepNavWindowFrame = "{{215, 4}, {1065, 694}}"; }; }; 8BA05A690720730100365D66 /* Acceleration2Version.h */ = { @@ -91,10 +111,10 @@ }; 8BC6025B073B072D006C4272 /* Acceleration2.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 2376}}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 2520}}"; sepNavSelRange = "{5243, 121}"; - sepNavVisRange = "{2722, 1078}"; - sepNavWindowFrame = "{{706, 42}, {1065, 836}}"; + sepNavVisRange = "{4787, 692}"; + sepNavWindowFrame = "{{215, 4}, {1065, 694}}"; }; }; 8BD3CCB8148830B20062E48C /* Source Control */ = { @@ -111,26 +131,6 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8BE1AB982597DB0600E5CF6A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Acceleration2.cpp */; - name = "Acceleration2.cpp: 217"; - rLen = 0; - rLoc = 9688; - rType = 0; - vrLen = 350; - vrLoc = 8567; - }; - 8BE1AB992597DB0600E5CF6A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Acceleration2.cpp */; - name = "Acceleration2.cpp: 217"; - rLen = 0; - rLoc = 9688; - rType = 0; - vrLen = 350; - vrLoc = 8567; - }; 8D01CCC60486CAD60068D4B7 /* Acceleration2 */ = { activeExec = 0; }; diff --git a/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 index c69aa736e..00cc8b574 100755 --- a/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 @@ -309,7 +309,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 585}} PBXTopSmartGroupGIDs @@ -319,14 +319,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 603}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 599 190 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,11 +354,11 @@ _historyCapacity 0 bookmark - 8BE1AB992597DB0600E5CF6A + 8B1A8D4127CC9C4C00649D11 history 8B3509F725910C3400B30D41 - 8BE1AB982597DB0600E5CF6A + 8B9FE14E27CAD371002EC0AA SplitCount @@ -372,18 +372,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 229}} + {{0, 0}, {531, 402}} RubberWindowFrame - 599 190 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module PBXNavigatorGroup Proportion - 229pt + 402pt Proportion - 379pt + 196pt Tabs @@ -397,9 +397,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 352}} + {{10, 27}, {531, 169}} RubberWindowFrame - 599 190 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module XCDetailModule @@ -481,11 +481,11 @@ TableOfContents - 8BE1AB9A2597DB0600E5CF6A + 8B1A8D4227CC9C4C00649D11 1CA23ED40692098700951B8B - 8BE1AB9B2597DB0600E5CF6A + 8B1A8D4327CC9C4C00649D11 8BD7274A1D46E5A5000176F0 - 8BE1AB9C2597DB0600E5CF6A + 8B1A8D4427CC9C4C00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -658,7 +658,7 @@ StatusbarIsVisible TimeStamp - 630708998.99625599 + 667720780.98184299 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -675,11 +675,10 @@ 5 WindowOrderList - 8BE1AB9D2597DB0600E5CF6A - /Users/christopherjohnson/Desktop/Plugins/MacAU/Acceleration2/Acceleration2.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Acceleration2/Acceleration2.xcodeproj WindowString - 599 190 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/Air/Air.cpp b/plugins/MacAU/Air/Air.cpp index 02b0f7e24..ee497c4f5 100755 --- a/plugins/MacAU/Air/Air.cpp +++ b/plugins/MacAU/Air/Air.cpp @@ -322,7 +322,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airOddA = (airOddA - ((airOddA - airEvenA)/256.0)) / filterQ; airEvenA = (airEvenA - ((airEvenA - airOddA)/256.0)) / filterQ; airPrevA = inputSample; - flipA = not flipA; + flipA = !flipA; correction = correction + airFactorA; } else @@ -343,7 +343,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airOddB = (airOddB - ((airOddB - airEvenB)/256.0)) / filterQ; airEvenB = (airEvenB - ((airEvenB - airOddB)/256.0)) / filterQ; airPrevB = inputSample; - flipB = not flipB; + flipB = !flipB; correction = correction + airFactorB; } //11K one @@ -367,7 +367,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airEvenC = (airEvenC - ((airEvenC - airOddC)/256.0)) / filterQ; airPrevC = inputSample; correction = correction + airFactorC; - flop = not flop; + flop = !flop; @@ -379,11 +379,11 @@ void Air::AirKernel::Process( const Float32 *inSourceP, //nice little output stage template: if we have another scale of floating point //number, we really don't want to meaninglessly multiply that by 1.0. - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; destP += inNumChannels; diff --git a/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.pbxuser index 19885c4fa..1f85754c2 100755 --- a/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.pbxuser @@ -49,42 +49,38 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 647192672; - PBXWorkspaceStateSaveDate = 647192672; + PBXPerProjectTemplateStateSaveDate = 667720824; + PBXWorkspaceStateSaveDate = 667720824; }; perUserProjectItems = { + 8B1A8D6C27CC9C7A00649D11 /* PBXTextBookmark */ = 8B1A8D6C27CC9C7A00649D11 /* PBXTextBookmark */; 8B5C608426936CE30038F773 /* PBXTextBookmark */ = 8B5C608426936CE30038F773 /* PBXTextBookmark */; - 8B5C608526936CE30038F773 /* PBXBookmark */ = 8B5C608526936CE30038F773 /* PBXBookmark */; - 8B5C608626936CE30038F773 /* PBXTextBookmark */ = 8B5C608626936CE30038F773 /* PBXTextBookmark */; 8B9F0C261EB403E000D3B900 /* PBXTextBookmark */ = 8B9F0C261EB403E000D3B900 /* PBXTextBookmark */; + 8B9FE21E27CAD63B002EC0AA /* PBXTextBookmark */ = 8B9FE21E27CAD63B002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; - 8B5C608426936CE30038F773 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Air.cpp */; - name = "Air.cpp: 401"; - rLen = 0; - rLoc = 15225; - rType = 0; - vrLen = 60; - vrLoc = 3; - }; - 8B5C608526936CE30038F773 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BA05A690720730100365D66 /* AirVersion.h */; - }; - 8B5C608626936CE30038F773 /* PBXTextBookmark */ = { + 8B1A8D6C27CC9C7A00649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A690720730100365D66 /* AirVersion.h */; name = "AirVersion.h: 62"; rLen = 4; rLoc = 3371; rType = 0; - vrLen = 205; - vrLoc = 3174; + vrLen = 102; + vrLoc = 3275; + }; + 8B5C608426936CE30038F773 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Air.cpp */; + name = "Air.cpp: 401"; + rLen = 0; + rLoc = 14510; + rType = 0; + vrLen = 60; + vrLoc = 3; }; 8B9F0C261EB403E000D3B900 /* PBXTextBookmark */ = { isa = PBXTextBookmark; @@ -96,19 +92,29 @@ vrLen = 107; vrLoc = 6071; }; + 8B9FE21E27CAD63B002EC0AA /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A690720730100365D66 /* AirVersion.h */; + name = "AirVersion.h: 62"; + rLen = 4; + rLoc = 3371; + rType = 0; + vrLen = 133; + vrLoc = 3244; + }; 8BA05A660720730100365D66 /* Air.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1236, 7488}}"; - sepNavSelRange = "{12528, 2921}"; - sepNavVisRange = "{14711, 1052}"; - sepNavWindowFrame = "{{246, 65}, {1002, 813}}"; + sepNavIntBoundsRect = "{{0, 0}, {955, 7866}}"; + sepNavSelRange = "{14195, 247}"; + sepNavVisRange = "{13457, 1044}"; + sepNavWindowFrame = "{{387, -52}, {1002, 813}}"; }; }; 8BA05A690720730100365D66 /* AirVersion.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 1278}}"; + sepNavIntBoundsRect = "{{0, 0}, {903, 1404}}"; sepNavSelRange = "{3371, 4}"; - sepNavVisRange = "{3174, 205}"; + sepNavVisRange = "{3275, 102}"; sepNavWindowFrame = "{{15, 39}, {1053, 839}}"; }; }; diff --git a/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.perspectivev3 index 21ebeb9da..6e204197f 100755 --- a/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Air/Air.xcodeproj/christopherjohnson.perspectivev3 @@ -352,12 +352,12 @@ _historyCapacity 0 bookmark - 8B5C608626936CE30038F773 + 8B1A8D6C27CC9C7A00649D11 history 8B9F0C261EB403E000D3B900 8B5C608426936CE30038F773 - 8B5C608526936CE30038F773 + 8B9FE21E27CAD63B002EC0AA SplitCount @@ -371,18 +371,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 86}} RubberWindowFrame 480 387 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 86pt Proportion - 309pt + 355pt Tabs @@ -396,7 +396,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 328}} RubberWindowFrame 480 387 810 487 0 0 1440 878 @@ -452,7 +452,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 401}} + {{10, 27}, {603, 297}} Module PBXBuildResultsModule @@ -480,11 +480,11 @@ TableOfContents - 8B5C608726936CE30038F773 + 8B1A8D6D27CC9C7A00649D11 1CA23ED40692098700951B8B - 8B5C608826936CE30038F773 + 8B1A8D6E27CC9C7A00649D11 8BDB25A91EAA638A001F42B2 - 8B5C608926936CE30038F773 + 8B1A8D6F27CC9C7A00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -637,7 +637,7 @@ StatusbarIsVisible TimeStamp - 647195875.64133406 + 667720826.94207895 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode diff --git a/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.pbxuser index cb3c4a52e..d98d9f90b 100644 --- a/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.pbxuser @@ -49,20 +49,30 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 647806083; - PBXWorkspaceStateSaveDate = 647806083; + PBXPerProjectTemplateStateSaveDate = 667720831; + PBXWorkspaceStateSaveDate = 667720831; }; perUserProjectItems = { + 8B1A8D7927CC9C8300649D11 /* PBXTextBookmark */ = 8B1A8D7927CC9C8300649D11 /* PBXTextBookmark */; 8B5C614E2695D4830038F773 /* PlistBookmark */ = 8B5C614E2695D4830038F773 /* PlistBookmark */; 8B5C614F2695D4830038F773 /* PBXTextBookmark */ = 8B5C614F2695D4830038F773 /* PBXTextBookmark */; 8B5C62CA269880B80038F773 /* PBXTextBookmark */ = 8B5C62CA269880B80038F773 /* PBXTextBookmark */; - 8B6BED8B269CBD4D00F3C78E /* PBXTextBookmark */ = 8B6BED8B269CBD4D00F3C78E /* PBXTextBookmark */; - 8B6BED8C269CBD4D00F3C78E /* PBXTextBookmark */ = 8B6BED8C269CBD4D00F3C78E /* PBXTextBookmark */; + 8B9FE27927CBF4B4002EC0AA /* PBXTextBookmark */ = 8B9FE27927CBF4B4002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B1A8D7927CC9C8300649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Air2.cpp */; + name = "Air2.cpp: 257"; + rLen = 0; + rLoc = 10384; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; 8B5C614E2695D4830038F773 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -95,32 +105,22 @@ vrLen = 220; vrLoc = 2700; }; - 8B6BED8B269CBD4D00F3C78E /* PBXTextBookmark */ = { + 8B9FE27927CBF4B4002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* Air2.cpp */; - name = "Air2.cpp: 256"; + name = "Air2.cpp: 257"; rLen = 0; rLoc = 10384; rType = 0; - vrLen = 17; - vrLoc = 12497; - }; - 8B6BED8C269CBD4D00F3C78E /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Air2.cpp */; - name = "Air2.cpp: 256"; - rLen = 0; - rLoc = 10384; - rType = 0; - vrLen = 17; - vrLoc = 12497; + vrLen = 10; + vrLoc = 12489; }; 8BA05A660720730100365D66 /* Air2.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {678, 7704}}"; + sepNavIntBoundsRect = "{{0, 0}, {482, 7686}}"; sepNavSelRange = "{10384, 0}"; - sepNavVisRange = "{12497, 17}"; - sepNavWindowFrame = "{{119, 46}, {1007, 831}}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{119, 4}, {1007, 694}}"; }; }; 8BA05A690720730100365D66 /* Air2Version.h */ = { diff --git a/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 index 8ac5e1b96..283fa7c11 100644 --- a/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 @@ -309,7 +309,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 585}} PBXTopSmartGroupGIDs @@ -319,14 +319,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 603}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 24 119 841 654 0 0 1440 878 + 35 234 841 644 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,13 +354,13 @@ _historyCapacity 0 bookmark - 8B6BED8C269CBD4D00F3C78E + 8B1A8D7927CC9C8300649D11 history 8B5C614E2695D4830038F773 8B5C614F2695D4830038F773 8B5C62CA269880B80038F773 - 8B6BED8B269CBD4D00F3C78E + 8B9FE27927CBF4B4002EC0AA SplitCount @@ -374,18 +374,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 56}} + {{0, 0}, {531, 16}} RubberWindowFrame - 24 119 841 654 0 0 1440 878 + 35 234 841 644 0 0 1440 878 Module PBXNavigatorGroup Proportion - 56pt + 16pt Proportion - 552pt + 582pt Tabs @@ -399,9 +399,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 525}} + {{10, 27}, {531, 555}} RubberWindowFrame - 24 119 841 654 0 0 1440 878 + 35 234 841 644 0 0 1440 878 Module XCDetailModule @@ -483,11 +483,11 @@ TableOfContents - 8B6BED8D269CBD4D00F3C78E + 8B1A8D7A27CC9C8300649D11 1CA23ED40692098700951B8B - 8B6BED8E269CBD4D00F3C78E + 8B1A8D7B27CC9C8300649D11 8BD7274A1D46E5A5000176F0 - 8B6BED8F269CBD4D00F3C78E + 8B1A8D7C27CC9C8300649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -660,7 +660,7 @@ StatusbarIsVisible TimeStamp - 647806285.43114197 + 667720835.33852506 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -677,11 +677,10 @@ 5 WindowOrderList - 8B6BED90269CBD4D00F3C78E /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Air2/Air2.xcodeproj WindowString - 24 119 841 654 0 0 1440 878 + 35 234 841 644 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/Apicolypse/Apicolypse.cpp b/plugins/MacAU/Apicolypse/Apicolypse.cpp index e19bbb3ab..2a683f56d 100755 --- a/plugins/MacAU/Apicolypse/Apicolypse.cpp +++ b/plugins/MacAU/Apicolypse/Apicolypse.cpp @@ -281,7 +281,7 @@ void Apicolypse::ApicolypseKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser index 4a23e3bd7..c2a5dc85e 100755 --- a/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser @@ -49,20 +49,30 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 603939692; - PBXWorkspaceStateSaveDate = 603939692; + PBXPerProjectTemplateStateSaveDate = 667720840; + PBXWorkspaceStateSaveDate = 667720840; }; perUserProjectItems = { + 8B1A8D8627CC9C8C00649D11 /* PBXTextBookmark */ = 8B1A8D8627CC9C8C00649D11 /* PBXTextBookmark */; 8B88B5F023FF683A0032C1CD /* PlistBookmark */ = 8B88B5F023FF683A0032C1CD /* PlistBookmark */; 8B88B5F123FF683A0032C1CD /* PBXTextBookmark */ = 8B88B5F123FF683A0032C1CD /* PBXTextBookmark */; 8B88B5F223FF683A0032C1CD /* PBXTextBookmark */ = 8B88B5F223FF683A0032C1CD /* PBXTextBookmark */; - 8B88B5F323FF683A0032C1CD /* PBXBookmark */ = 8B88B5F323FF683A0032C1CD /* PBXBookmark */; - 8B88B5F423FF683A0032C1CD /* PBXTextBookmark */ = 8B88B5F423FF683A0032C1CD /* PBXTextBookmark */; + 8B9FE2D227CBF896002EC0AA /* PBXTextBookmark */ = 8B9FE2D227CBF896002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { }; }; + 8B1A8D8627CC9C8C00649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Apicolypse.h */; + name = "Apicolypse.h: 139"; + rLen = 0; + rLoc = 5565; + rType = 0; + vrLen = 332; + vrLoc = 2873; + }; 8B88B5F023FF683A0032C1CD /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -73,7 +83,7 @@ ); name = /Users/christopherjohnson/Desktop/Plugins/MacAU/Apicolypse/Info.plist; rLen = 0; - rLoc = 9223372036854775807; + rLoc = 9223372036854775808; }; 8B88B5F123FF683A0032C1CD /* PBXTextBookmark */ = { isa = PBXTextBookmark; @@ -95,26 +105,22 @@ vrLen = 297; vrLoc = 2667; }; - 8B88B5F323FF683A0032C1CD /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 8BC6025B073B072D006C4272 /* Apicolypse.h */; - }; - 8B88B5F423FF683A0032C1CD /* PBXTextBookmark */ = { + 8B9FE2D227CBF896002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BC6025B073B072D006C4272 /* Apicolypse.h */; name = "Apicolypse.h: 139"; rLen = 0; rLoc = 5565; rType = 0; - vrLen = 438; - vrLoc = 2767; + vrLen = 382; + vrLoc = 2823; }; 8BA05A660720730100365D66 /* Apicolypse.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {936, 3887}}"; - sepNavSelRange = "{10361, 0}"; - sepNavVisRange = "{11666, 3452}"; - sepNavWindowFrame = "{{717, 65}, {870, 813}}"; + sepNavIntBoundsRect = "{{0, 0}, {1200, 5040}}"; + sepNavSelRange = "{14672, 25}"; + sepNavVisRange = "{13729, 1431}"; + sepNavWindowFrame = "{{410, 4}, {870, 694}}"; }; }; 8BA05A690720730100365D66 /* ApicolypseVersion.h */ = { @@ -127,9 +133,9 @@ }; 8BC6025B073B072D006C4272 /* Apicolypse.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {894, 1911}}"; + sepNavIntBoundsRect = "{{0, 0}, {849, 2952}}"; sepNavSelRange = "{5565, 0}"; - sepNavVisRange = "{2767, 438}"; + sepNavVisRange = "{2873, 332}"; sepNavWindowFrame = "{{15, 60}, {870, 813}}"; }; }; diff --git a/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 index 5dc996238..11d6ebe84 100755 --- a/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 @@ -309,7 +309,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {288, 595}} + {{0, 0}, {288, 585}} PBXTopSmartGroupGIDs @@ -319,14 +319,14 @@ GeometryConfiguration Frame - {{0, 0}, {305, 613}} + {{0, 0}, {305, 603}} GroupTreeTableConfiguration MainColumn 288 RubberWindowFrame - 700 143 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -354,13 +354,13 @@ _historyCapacity 0 bookmark - 8B88B5F423FF683A0032C1CD + 8B1A8D8627CC9C8C00649D11 history 8B88B5F023FF683A0032C1CD 8B88B5F123FF683A0032C1CD 8B88B5F223FF683A0032C1CD - 8B88B5F323FF683A0032C1CD + 8B9FE2D227CBF896002EC0AA SplitCount @@ -374,18 +374,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 188}} + {{0, 0}, {531, 155}} RubberWindowFrame - 700 143 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module PBXNavigatorGroup Proportion - 188pt + 155pt Proportion - 420pt + 443pt Tabs @@ -399,9 +399,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 393}} + {{10, 27}, {531, 416}} RubberWindowFrame - 700 143 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 Module XCDetailModule @@ -483,11 +483,11 @@ TableOfContents - 8B88B5F523FF683A0032C1CD + 8B1A8D8727CC9C8C00649D11 1CA23ED40692098700951B8B - 8B88B5F623FF683A0032C1CD + 8B1A8D8827CC9C8C00649D11 8BD7274A1D46E5A5000176F0 - 8B88B5F723FF683A0032C1CD + 8B1A8D8927CC9C8C00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -660,7 +660,7 @@ StatusbarIsVisible TimeStamp - 603940922.15062797 + 667720844.15317202 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -677,10 +677,10 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/Plugins/MacAU/Apicolypse/Apicolypse.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Apicolypse/Apicolypse.xcodeproj WindowString - 700 143 841 654 0 0 1440 878 + 599 234 841 644 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser index d3cdc9f1c..22bb7f638 100755 --- a/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569588700; - PBXWorkspaceStateSaveDate = 569588700; + PBXPerProjectTemplateStateSaveDate = 667720944; + PBXWorkspaceStateSaveDate = 667720944; }; perUserProjectItems = { + 8B1A8DB227CC9D0300649D11 /* PBXTextBookmark */ = 8B1A8DB227CC9D0300649D11 /* PBXTextBookmark */; 8B7927A021F33C4A006E9731 /* PBXTextBookmark */ = 8B7927A021F33C4A006E9731 /* PBXTextBookmark */; - 8B7927A121F33C4A006E9731 /* XCBuildMessageTextBookmark */ = 8B7927A121F33C4A006E9731 /* XCBuildMessageTextBookmark */; 8B7927A221F33C4A006E9731 /* PBXTextBookmark */ = 8B7927A221F33C4A006E9731 /* PBXTextBookmark */; 8B7A85312054728D0074B00C /* PlistBookmark */ = 8B7A85312054728D0074B00C /* PlistBookmark */; }; @@ -62,6 +62,16 @@ userBuildSettings = { }; }; + 8B1A8DB227CC9D0300649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* AtmosphereBuss.cpp */; + name = "AtmosphereBuss.cpp: 204"; + rLen = 0; + rLoc = 8815; + rType = 0; + vrLen = 181; + vrLoc = 8674; + }; 8B7927A021F33C4A006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BC6025B073B072D006C4272 /* AtmosphereBuss.h */; @@ -72,15 +82,6 @@ vrLen = 177; vrLoc = 5070; }; - 8B7927A121F33C4A006E9731 /* XCBuildMessageTextBookmark */ = { - isa = PBXTextBookmark; - comments = "Unused variable 'fpTemp'"; - fRef = 8BA05A660720730100365D66 /* AtmosphereBuss.cpp */; - fallbackIsa = XCBuildMessageTextBookmark; - rLen = 1; - rLoc = 205; - rType = 1; - }; 8B7927A221F33C4A006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* AtmosphereBuss.cpp */; @@ -105,9 +106,9 @@ }; 8BA05A660720730100365D66 /* AtmosphereBuss.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {656, 4667}}"; + sepNavIntBoundsRect = "{{0, 0}, {840, 6138}}"; sepNavSelRange = "{8815, 0}"; - sepNavVisRange = "{8708, 266}"; + sepNavVisRange = "{8674, 181}"; sepNavWindowFrame = "{{378, 46}, {816, 832}}"; }; }; diff --git a/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 index b791cf490..836f55120 100755 --- a/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -349,12 +351,12 @@ _historyCapacity 0 bookmark - 8B7927A221F33C4A006E9731 + 8B1A8DB227CC9D0300649D11 history 8B7A85312054728D0074B00C 8B7927A021F33C4A006E9731 - 8B7927A121F33C4A006E9731 + 8B7927A221F33C4A006E9731 SplitCount @@ -368,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 126}} + {{0, 0}, {531, 109}} RubberWindowFrame 434 184 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 126pt + 109pt Proportion - 482pt + 499pt Tabs @@ -393,7 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 455}} + {{10, 27}, {531, 472}} + RubberWindowFrame + 434 184 841 654 0 0 1440 878 Module XCDetailModule @@ -448,8 +452,6 @@ Frame {{10, 27}, {531, 455}} - RubberWindowFrame - 434 184 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -477,11 +479,11 @@ TableOfContents - 8B7927A321F33C4A006E9731 + 8B1A8DB327CC9D0300649D11 1CA23ED40692098700951B8B - 8B7927A421F33C4A006E9731 + 8B1A8DB427CC9D0300649D11 8BD7274A1D46E5A5000176F0 - 8B7927A521F33C4A006E9731 + 8B1A8DB527CC9D0300649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -654,7 +656,7 @@ StatusbarIsVisible TimeStamp - 569588810.27972102 + 667720963.15178895 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -671,8 +673,7 @@ 5 WindowOrderList - 8B7927A621F33C4A006E9731 - /Users/christopherjohnson/Desktop/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/AtmosphereBuss/AtmosphereBuss.xcodeproj WindowString 434 184 841 654 0 0 1440 878 diff --git a/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser index 64fb8bb50..b124a5153 100755 --- a/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569588835; - PBXWorkspaceStateSaveDate = 569588835; + PBXPerProjectTemplateStateSaveDate = 667720968; + PBXWorkspaceStateSaveDate = 667720968; }; perUserProjectItems = { + 8B1A8DC327CC9D4500649D11 /* PBXTextBookmark */ = 8B1A8DC327CC9D4500649D11 /* PBXTextBookmark */; 8B2BAFD320548396002C5203 /* PlistBookmark */ = 8B2BAFD320548396002C5203 /* PlistBookmark */; - 8B7927B321F33C89006E9731 /* PBXTextBookmark */ = 8B7927B321F33C89006E9731 /* PBXTextBookmark */; 8B7927B821F33C9F006E9731 /* PBXTextBookmark */ = 8B7927B821F33C9F006E9731 /* PBXTextBookmark */; 8BFBE901209D18FF00E1438C /* PBXTextBookmark */ = 8BFBE901209D18FF00E1438C /* PBXTextBookmark */; }; @@ -62,6 +62,16 @@ userBuildSettings = { }; }; + 8B1A8DC327CC9D4500649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* AtmosphereChannel.cpp */; + name = "AtmosphereChannel.cpp: 273"; + rLen = 0; + rLoc = 11355; + rType = 0; + vrLen = 3; + vrLoc = 13563; + }; 8B2BAFD320548396002C5203 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */; @@ -74,16 +84,6 @@ rLen = 0; rLoc = 9223372036854775808; }; - 8B7927B321F33C89006E9731 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* AtmosphereChannel.cpp */; - name = "AtmosphereChannel.cpp: 277"; - rLen = 0; - rLoc = 11355; - rType = 0; - vrLen = 169; - vrLoc = 13693; - }; 8B7927B821F33C9F006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* AtmosphereChannel.cpp */; @@ -91,14 +91,14 @@ rLen = 0; rLoc = 11355; rType = 0; - vrLen = 169; - vrLoc = 13693; + vrLen = 0; + vrLoc = 13566; }; 8BA05A660720730100365D66 /* AtmosphereChannel.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {482, 4654}}"; + sepNavIntBoundsRect = "{{0, 0}, {813, 6210}}"; sepNavSelRange = "{11355, 0}"; - sepNavVisRange = "{13693, 169}"; + sepNavVisRange = "{13563, 3}"; sepNavWindowFrame = "{{566, 46}, {816, 832}}"; }; }; @@ -112,9 +112,9 @@ }; 8BC6025B073B072D006C4272 /* AtmosphereChannel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {894, 2132}}"; - sepNavSelRange = "{5129, 0}"; - sepNavVisRange = "{4652, 1351}"; + sepNavIntBoundsRect = "{{0, 0}, {1146, 2952}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{5094, 771}"; sepNavWindowFrame = "{{624, 39}, {816, 832}}"; }; }; @@ -136,10 +136,10 @@ isa = PBXTextBookmark; fRef = 8BC6025B073B072D006C4272 /* AtmosphereChannel.h */; name = "AtmosphereChannel.h: 131"; - rLen = 713; + rLen = 684; rLoc = 5181; rType = 0; - vrLen = 181; + vrLen = 49; vrLoc = 5816; }; 8D01CCC60486CAD60068D4B7 /* AtmosphereChannel */ = { diff --git a/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 index f684856cd..3d95228cd 100755 --- a/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -352,12 +354,12 @@ _historyCapacity 0 bookmark - 8B7927B821F33C9F006E9731 + 8B1A8DC327CC9D4500649D11 history 8B2BAFD320548396002C5203 8BFBE901209D18FF00E1438C - 8B7927B321F33C89006E9731 + 8B7927B821F33C9F006E9731 SplitCount @@ -371,18 +373,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 92}} + {{0, 0}, {531, 74}} RubberWindowFrame 472 198 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 92pt + 74pt Proportion - 516pt + 534pt Tabs @@ -396,7 +398,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 489}} + {{10, 27}, {531, 507}} + RubberWindowFrame + 472 198 841 654 0 0 1440 878 Module XCDetailModule @@ -451,8 +455,6 @@ Frame {{10, 27}, {531, 489}} - RubberWindowFrame - 472 198 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -480,11 +482,11 @@ TableOfContents - 8B7927B921F33C9F006E9731 + 8B1A8DC427CC9D4500649D11 1CA23ED40692098700951B8B - 8B7927BA21F33C9F006E9731 + 8B1A8DC527CC9D4500649D11 8BD7274A1D46E5A5000176F0 - 8B7927BB21F33C9F006E9731 + 8B1A8DC627CC9D4500649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -657,7 +659,7 @@ StatusbarIsVisible TimeStamp - 569588895.18574297 + 667721029.39562702 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -674,7 +676,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/AtmosphereChannel/AtmosphereChannel.xcodeproj WindowString 472 198 841 654 0 0 1440 878 diff --git a/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.pbxuser index 16877c146..5d966d0ca 100755 --- a/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.pbxuser @@ -49,11 +49,11 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569589029; - PBXWorkspaceStateSaveDate = 569589029; + PBXPerProjectTemplateStateSaveDate = 667721034; + PBXWorkspaceStateSaveDate = 667721034; }; perUserProjectItems = { - 8B7927C921F33D8C006E9731 /* PBXTextBookmark */ = 8B7927C921F33D8C006E9731 /* PBXTextBookmark */; + 8B1A8DD227CC9D6900649D11 /* PBXTextBookmark */ = 8B1A8DD227CC9D6900649D11 /* PBXTextBookmark */; 8B7927CE21F33D9D006E9731 /* PBXTextBookmark */ = 8B7927CE21F33D9D006E9731 /* PBXTextBookmark */; 8BC5CC27208D3AE60058B257 /* PBXTextBookmark */ = 8BC5CC27208D3AE60058B257 /* PBXTextBookmark */; }; @@ -61,10 +61,10 @@ userBuildSettings = { }; }; - 8B7927C921F33D8C006E9731 /* PBXTextBookmark */ = { + 8B1A8DD227CC9D6900649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8BA05A660720730100365D66 /* Aura.cpp */; - name = "Aura.cpp: 196"; + name = "Aura.cpp: 195"; rLen = 0; rLoc = 8658; rType = 0; @@ -83,7 +83,7 @@ }; 8BA05A660720730100365D66 /* Aura.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {554, 4446}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 5508}}"; sepNavSelRange = "{8658, 0}"; sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{5, 63}, {932, 815}}"; diff --git a/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 index 55525f3b3..09af49ddc 100755 --- a/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -350,11 +352,11 @@ _historyCapacity 0 bookmark - 8B7927CE21F33D9D006E9731 + 8B1A8DD227CC9D6900649D11 history 8BC5CC27208D3AE60058B257 - 8B7927C921F33D8C006E9731 + 8B7927CE21F33D9D006E9731 SplitCount @@ -368,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 13}} + {{0, 0}, {603, 0}} RubberWindowFrame 0 312 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 13pt + 0pt Proportion - 428pt + 441pt Tabs @@ -393,7 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 401}} + {{10, 27}, {603, 414}} + RubberWindowFrame + 0 312 810 487 0 0 1440 878 Module XCDetailModule @@ -448,8 +452,6 @@ Frame {{10, 27}, {603, 401}} - RubberWindowFrame - 0 312 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -477,11 +479,11 @@ TableOfContents - 8B7927CF21F33D9D006E9731 + 8B1A8DD327CC9D6900649D11 1CA23ED40692098700951B8B - 8B7927D021F33D9D006E9731 + 8B1A8DD427CC9D6900649D11 8B0C0F5D201157B700BC8782 - 8B7927D121F33D9D006E9731 + 8B1A8DD527CC9D6900649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +636,7 @@ StatusbarIsVisible TimeStamp - 569589149.88835204 + 667721065.253474 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -651,7 +653,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacAU/Aura/Aura.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/Aura/Aura.xcodeproj WindowString 0 312 810 487 0 0 1440 878 diff --git a/plugins/MacAU/BassAmp/BassAmp.cpp b/plugins/MacAU/BassAmp/BassAmp.cpp index 52b974530..2466edef6 100755 --- a/plugins/MacAU/BassAmp/BassAmp.cpp +++ b/plugins/MacAU/BassAmp/BassAmp.cpp @@ -380,7 +380,7 @@ void BassAmp::BassAmpKernel::Process( const Float32 *inSourceP, //set up polarities for sub-bass version - Float64 randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + Float64 randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { diff --git a/plugins/MacAU/BassKit/BassKit.cpp b/plugins/MacAU/BassKit/BassKit.cpp index 89c407be5..ed5b780e3 100755 --- a/plugins/MacAU/BassKit/BassKit.cpp +++ b/plugins/MacAU/BassKit/BassKit.cpp @@ -303,10 +303,10 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags //set up the thing to choke off oscillations- belt and suspenders affair if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacAU/BuildATPDF/BuildATPDF.cpp b/plugins/MacAU/BuildATPDF/BuildATPDF.cpp index 4968a7ebf..69e0bdac2 100755 --- a/plugins/MacAU/BuildATPDF/BuildATPDF.cpp +++ b/plugins/MacAU/BuildATPDF/BuildATPDF.cpp @@ -269,7 +269,7 @@ void BuildATPDF::BuildATPDFKernel::Process( const Float32 *inSourceP, b[9] = b[8]; b[8] = b[7]; b[7] = b[6]; b[6] = b[5]; b[5] = b[4]; b[4] = b[3]; b[3] = b[2]; b[2] = b[1]; - b[1] = b[0]; b[0] = (rand()/(double)RAND_MAX); + b[1] = b[0]; b[0] = (double(fpd)/UINT32_MAX); currentDither = (b[0] * f[0]); currentDither += (b[1] * f[1]); @@ -286,6 +286,10 @@ void BuildATPDF::BuildATPDFKernel::Process( const Float32 *inSourceP, inputSample = floor(inputSample); inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/CStrip/CStrip.cpp b/plugins/MacAU/CStrip/CStrip.cpp index ab77045ad..a21a88104 100755 --- a/plugins/MacAU/CStrip/CStrip.cpp +++ b/plugins/MacAU/CStrip/CStrip.cpp @@ -483,7 +483,7 @@ void CStrip::CStripKernel::Process( const Float32 *inSourceP, } //end Gate, begin antialiasing - flip = not flip; + flip = !flip; flipthree++; if (flipthree < 1 || flipthree > 3) flipthree = 1; //counters diff --git a/plugins/MacAU/Calibre/Calibre.cpp b/plugins/MacAU/Calibre/Calibre.cpp index 35ac93241..70f75f7d7 100755 --- a/plugins/MacAU/Calibre/Calibre.cpp +++ b/plugins/MacAU/Calibre/Calibre.cpp @@ -281,7 +281,7 @@ void Calibre::CalibreKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/Channel4/Channel4.cpp b/plugins/MacAU/Channel4/Channel4.cpp index 3805b057f..c7d788dc4 100755 --- a/plugins/MacAU/Channel4/Channel4.cpp +++ b/plugins/MacAU/Channel4/Channel4.cpp @@ -266,7 +266,7 @@ void Channel4::Channel4Kernel::Process( const Float32 *inSourceP, inputSample += fpNShapeB; } //end noise shaping on 32 bit output - flip = not flip; + flip = !flip; *destP = inputSample; sourceP += inNumChannels; diff --git a/plugins/MacAU/ChromeOxide/ChromeOxide.cpp b/plugins/MacAU/ChromeOxide/ChromeOxide.cpp index 3297ad31d..b62f3d28d 100755 --- a/plugins/MacAU/ChromeOxide/ChromeOxide.cpp +++ b/plugins/MacAU/ChromeOxide/ChromeOxide.cpp @@ -256,7 +256,7 @@ void ChromeOxide::ChromeOxideKernel::Process( const Float32 *inSourceP, bridgerectifier = inputSample; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSample * randy)+(secondSample * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSample * (randy-1.0))+(thirdSample * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSample * (randy-2.0))+(fourthSample * (3.0-randy)); diff --git a/plugins/MacAU/Cider/Cider.cpp b/plugins/MacAU/Cider/Cider.cpp index ba4a2e02c..440d423c0 100755 --- a/plugins/MacAU/Cider/Cider.cpp +++ b/plugins/MacAU/Cider/Cider.cpp @@ -280,7 +280,7 @@ void Cider::CiderKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/Compresaturator/Compresaturator.cpp b/plugins/MacAU/Compresaturator/Compresaturator.cpp index 593b36f74..6513721de 100755 --- a/plugins/MacAU/Compresaturator/Compresaturator.cpp +++ b/plugins/MacAU/Compresaturator/Compresaturator.cpp @@ -270,7 +270,7 @@ void Compresaturator::CompresaturatorKernel::Process( const Float32 *inSourceP dCount--; padFactor += d[dCount]; - Float64 randy = (rand()/(double)RAND_MAX); + Float64 randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidth) { //we are expanding the buffer so we don't remove this trailing sample lastWidth += 1; diff --git a/plugins/MacAU/Crystal/Crystal.cpp b/plugins/MacAU/Crystal/Crystal.cpp index 77e162f04..297959ce0 100755 --- a/plugins/MacAU/Crystal/Crystal.cpp +++ b/plugins/MacAU/Crystal/Crystal.cpp @@ -276,7 +276,7 @@ void Crystal::CrystalKernel::Process( const Float32 *inSourceP, //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; inputSample = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/MacAU/Deckwrecka/Deckwrecka.cpp b/plugins/MacAU/Deckwrecka/Deckwrecka.cpp index 40256b458..31a565e3d 100755 --- a/plugins/MacAU/Deckwrecka/Deckwrecka.cpp +++ b/plugins/MacAU/Deckwrecka/Deckwrecka.cpp @@ -225,12 +225,12 @@ void Deckwrecka::DeckwreckaKernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; - randy = (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); randy /= 6.0; randy *= wreck; //0 to 1 the noise, may not be needed //set up the noise diff --git a/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp b/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp index 1f926a456..7282d2faa 100755 --- a/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp +++ b/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp @@ -330,22 +330,22 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 2: - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 0.5; inputSample = floor(inputSample); //flat dither break; case 3: - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 1.0; inputSample = floor(inputSample); //TPDF dither break; case 4: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= lastSample; inputSample = floor(inputSample); @@ -356,7 +356,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, case 5: ns[9] = ns[8]; ns[8] = ns[7]; ns[7] = ns[6]; ns[6] = ns[5]; ns[5] = ns[4]; ns[4] = ns[3]; ns[3] = ns[2]; ns[2] = ns[1]; - ns[1] = ns[0]; ns[0] = (rand()/(double)RAND_MAX); + ns[1] = ns[0]; ns[0] = (double(fpd)/UINT32_MAX); currentDither = (ns[0] * 0.061); currentDither -= (ns[1] * 0.11); @@ -379,7 +379,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 6: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= ns[4]; inputSample = floor(inputSample); @@ -412,37 +412,37 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -465,7 +465,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -487,7 +487,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -802,6 +802,9 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (dtype == 8) noiseShaping += inputSample - drySample; + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; destP += inNumChannels; } diff --git a/plugins/MacAU/Ditherbox/Ditherbox.cpp b/plugins/MacAU/Ditherbox/Ditherbox.cpp index 1f926a456..7282d2faa 100755 --- a/plugins/MacAU/Ditherbox/Ditherbox.cpp +++ b/plugins/MacAU/Ditherbox/Ditherbox.cpp @@ -330,22 +330,22 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 2: - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 0.5; inputSample = floor(inputSample); //flat dither break; case 3: - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 1.0; inputSample = floor(inputSample); //TPDF dither break; case 4: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= lastSample; inputSample = floor(inputSample); @@ -356,7 +356,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, case 5: ns[9] = ns[8]; ns[8] = ns[7]; ns[7] = ns[6]; ns[6] = ns[5]; ns[5] = ns[4]; ns[4] = ns[3]; ns[3] = ns[2]; ns[2] = ns[1]; - ns[1] = ns[0]; ns[0] = (rand()/(double)RAND_MAX); + ns[1] = ns[0]; ns[0] = (double(fpd)/UINT32_MAX); currentDither = (ns[0] * 0.061); currentDither -= (ns[1] * 0.11); @@ -379,7 +379,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 6: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= ns[4]; inputSample = floor(inputSample); @@ -412,37 +412,37 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -465,7 +465,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -487,7 +487,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -802,6 +802,9 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (dtype == 8) noiseShaping += inputSample - drySample; + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; destP += inNumChannels; } diff --git a/plugins/MacAU/DoublePaul/DoublePaul.cpp b/plugins/MacAU/DoublePaul/DoublePaul.cpp index dcf7b6aab..5754e0df3 100755 --- a/plugins/MacAU/DoublePaul/DoublePaul.cpp +++ b/plugins/MacAU/DoublePaul/DoublePaul.cpp @@ -178,7 +178,7 @@ void DoublePaul::DoublePaulKernel::Process( const Float32 *inSourceP, b[9] = b[8]; b[8] = b[7]; b[7] = b[6]; b[6] = b[5]; b[5] = b[4]; b[4] = b[3]; b[3] = b[2]; b[2] = b[1]; - b[1] = b[0]; b[0] = (rand()/(double)RAND_MAX); + b[1] = b[0]; b[0] = (double(fpd)/UINT32_MAX); currentDither = (b[0] * 0.061); currentDither -= (b[1] * 0.11); @@ -199,6 +199,10 @@ void DoublePaul::DoublePaulKernel::Process( const Float32 *inSourceP, inputSample = floor(inputSample); inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/DubCenter/DubCenter.cpp b/plugins/MacAU/DubCenter/DubCenter.cpp index ff46d51c8..46be1c674 100755 --- a/plugins/MacAU/DubCenter/DubCenter.cpp +++ b/plugins/MacAU/DubCenter/DubCenter.cpp @@ -454,10 +454,10 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla ataLowpass = (ataLowpassL + ataLowpassR) / 2.0; if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacAU/DubSub/DubSub.cpp b/plugins/MacAU/DubSub/DubSub.cpp index 9387314e3..6d13213a3 100755 --- a/plugins/MacAU/DubSub/DubSub.cpp +++ b/plugins/MacAU/DubSub/DubSub.cpp @@ -390,10 +390,10 @@ void DubSub::DubSubKernel::Process( const Float32 *inSourceP, inputSample *= (1.0+out); if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacAU/DustBunny/DustBunny.cpp b/plugins/MacAU/DustBunny/DustBunny.cpp index ab5c187c1..0f10171b6 100755 --- a/plugins/MacAU/DustBunny/DustBunny.cpp +++ b/plugins/MacAU/DustBunny/DustBunny.cpp @@ -202,7 +202,7 @@ void DustBunny::DustBunnyKernel::Process( const Float32 *inSourceP, ataC = ataHalfwaySample - ataHalfDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataHalfDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataHalfDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for halfway sample //begin second half- inputSample and ataDrySample handled separately here @@ -213,7 +213,7 @@ void DustBunny::DustBunnyKernel::Process( const Float32 *inSourceP, ataC = inputSample - ataDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for input sample inputSample = ataDrySample; inputSample += ((ataDiffSample + ataHalfDiffSample + ataPrevDiffSample) / 2.5); ataPrevDiffSample = ataDiffSample / 2.0; diff --git a/plugins/MacAU/Elation/Elation.cpp b/plugins/MacAU/Elation/Elation.cpp index 0009e3282..e2b5b8fb0 100755 --- a/plugins/MacAU/Elation/Elation.cpp +++ b/plugins/MacAU/Elation/Elation.cpp @@ -334,7 +334,7 @@ void Elation::ElationKernel::Process( const Float32 *inSourceP, flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSample*(1-randy))+(lastSample*randy))*wet)+(drySample*(1.0-wet))) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/Energy/Energy.cpp b/plugins/MacAU/Energy/Energy.cpp index 99302f6a9..ca7f94d2d 100755 --- a/plugins/MacAU/Energy/Energy.cpp +++ b/plugins/MacAU/Energy/Energy.cpp @@ -348,7 +348,7 @@ void Energy::EnergyKernel::Process( const Float32 *inSourceP, duoOdd = (duoOdd - ((duoOdd - duoEven)/256.0)) / 2.0; duoEven = (duoEven - ((duoEven - duoOdd)/256.0)) / 2.0; correction = correction + duoFactor; - flip = not flip; + flip = !flip; //finished duo section diff --git a/plugins/MacAU/FromTape/FromTape.cpp b/plugins/MacAU/FromTape/FromTape.cpp index 726cd851c..32f50252b 100755 --- a/plugins/MacAU/FromTape/FromTape.cpp +++ b/plugins/MacAU/FromTape/FromTape.cpp @@ -267,7 +267,7 @@ void FromTape::FromTapeKernel::Process( const Float32 *inSourceP, inputSample *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/MacAU/IronOxide5/IronOxide5.cpp b/plugins/MacAU/IronOxide5/IronOxide5.cpp index b18a72748..89ee595bb 100755 --- a/plugins/MacAU/IronOxide5/IronOxide5.cpp +++ b/plugins/MacAU/IronOxide5/IronOxide5.cpp @@ -291,7 +291,7 @@ void IronOxide5::IronOxide5Kernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; drySample = inputSample; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -440,7 +440,7 @@ void IronOxide5::IronOxide5Kernel::Process( const Float32 *inSourceP, else inputSample = -bridgerectifier; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSample *= (1.0 - randy); inputSample += (prevInputSample*randy); prevInputSample = drySample; diff --git a/plugins/MacAU/Luxor/Luxor.cpp b/plugins/MacAU/Luxor/Luxor.cpp index e14eb9be4..0e98334aa 100755 --- a/plugins/MacAU/Luxor/Luxor.cpp +++ b/plugins/MacAU/Luxor/Luxor.cpp @@ -280,7 +280,7 @@ void Luxor::LuxorKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp b/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp index 351e9caa4..9bd671f4f 100755 --- a/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp +++ b/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp @@ -194,7 +194,7 @@ void NaturalizeDither::NaturalizeDitherKernel::Process( const Float32 *inSourc if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -270,6 +270,10 @@ void NaturalizeDither::NaturalizeDitherKernel::Process( const Float32 *inSourc byn[10] /= 2; //catchall for garbage data inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/Neverland/Neverland.cpp b/plugins/MacAU/Neverland/Neverland.cpp index 48914f1a6..c45484871 100755 --- a/plugins/MacAU/Neverland/Neverland.cpp +++ b/plugins/MacAU/Neverland/Neverland.cpp @@ -282,7 +282,7 @@ void Neverland::NeverlandKernel::Process( const Float32 *inSourceP, inputSample += (b[33] * (0.00555223929714115 - (0.00030319367948553*fabs(b[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/NodeDither/NodeDither.cpp b/plugins/MacAU/NodeDither/NodeDither.cpp index 6e662e863..4280f749d 100755 --- a/plugins/MacAU/NodeDither/NodeDither.cpp +++ b/plugins/MacAU/NodeDither/NodeDither.cpp @@ -224,7 +224,7 @@ void NodeDither::NodeDitherKernel::Process( const Float32 *inSourceP, if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; if (phase == 1) { @@ -242,6 +242,10 @@ void NodeDither::NodeDitherKernel::Process( const Float32 *inSourceP, gcount--; inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/Noise/Noise.cpp b/plugins/MacAU/Noise/Noise.cpp index 1d994c020..2a2507335 100755 --- a/plugins/MacAU/Noise/Noise.cpp +++ b/plugins/MacAU/Noise/Noise.cpp @@ -316,12 +316,12 @@ void Noise::NoiseKernel::Process( const Float32 *inSourceP, if (surge 1.0) surge = 1.0; } else { - surge -= ((rand()/(double)RAND_MAX)*(surge-fabs(inputSample))*decay); + surge -= ((double(fpd)/UINT32_MAX)*(surge-fabs(inputSample))*decay); if (surge < 0.0) surge = 0.0; } @@ -352,8 +352,8 @@ void Noise::NoiseKernel::Process( const Float32 *inSourceP, } - if (flip) noiseA += (rand()/(double)RAND_MAX); - else noiseA -= (rand()/(double)RAND_MAX); + if (flip) noiseA += (double(fpd)/UINT32_MAX); + else noiseA -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/MacAU/PaulDither/PaulDither.cpp b/plugins/MacAU/PaulDither/PaulDither.cpp index 83418cdd6..69075c549 100755 --- a/plugins/MacAU/PaulDither/PaulDither.cpp +++ b/plugins/MacAU/PaulDither/PaulDither.cpp @@ -221,7 +221,7 @@ void PaulDither::PaulDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= previousDither; inputSample = floor(inputSample); @@ -237,6 +237,10 @@ void PaulDither::PaulDitherKernel::Process( const Float32 *inSourceP, inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/PaulWide/PaulWide.cpp b/plugins/MacAU/PaulWide/PaulWide.cpp index 41ff5bc39..5bd647a7c 100644 --- a/plugins/MacAU/PaulWide/PaulWide.cpp +++ b/plugins/MacAU/PaulWide/PaulWide.cpp @@ -247,34 +247,34 @@ OSStatus PaulWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -286,6 +286,10 @@ OSStatus PaulWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *outputL = inputSampleL; *outputR = inputSampleR; //direct stereo out diff --git a/plugins/MacAU/Precious/Precious.cpp b/plugins/MacAU/Precious/Precious.cpp index 115fd8dbc..90dc3aad6 100755 --- a/plugins/MacAU/Precious/Precious.cpp +++ b/plugins/MacAU/Precious/Precious.cpp @@ -280,7 +280,7 @@ void Precious::PreciousKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacAU/Slew2/Slew2.cpp b/plugins/MacAU/Slew2/Slew2.cpp index 62d3de036..a7f7f3451 100755 --- a/plugins/MacAU/Slew2/Slew2.cpp +++ b/plugins/MacAU/Slew2/Slew2.cpp @@ -209,7 +209,7 @@ void Slew2::Slew2Kernel::Process( const Float32 *inSourceP, ataC = ataHalfwaySample - ataHalfDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataHalfDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataHalfDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for halfway sample //begin second half- inputSample and ataDrySample handled separately here @@ -226,7 +226,7 @@ void Slew2::Slew2Kernel::Process( const Float32 *inSourceP, ataC = inputSample - ataDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for input sample inputSample = ataDrySample; inputSample += ((ataDiffSample + ataHalfDiffSample + ataPrevDiffSample) / 0.734); ataPrevDiffSample = ataDiffSample / 2.0; diff --git a/plugins/MacAU/SpatializeDither/SpatializeDither.cpp b/plugins/MacAU/SpatializeDither/SpatializeDither.cpp index 181325898..e29c6cc1c 100755 --- a/plugins/MacAU/SpatializeDither/SpatializeDither.cpp +++ b/plugins/MacAU/SpatializeDither/SpatializeDither.cpp @@ -230,7 +230,7 @@ void SpatializeDither::SpatializeDitherKernel::Process( const Float32 *inSourc if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -249,6 +249,10 @@ void SpatializeDither::SpatializeDitherKernel::Process( const Float32 *inSourc //and does a teeny parallel-compression thing when almost at digital black. inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/TPDFDither/TPDFDither.cpp b/plugins/MacAU/TPDFDither/TPDFDither.cpp index 50ee551c3..ea539e9db 100755 --- a/plugins/MacAU/TPDFDither/TPDFDither.cpp +++ b/plugins/MacAU/TPDFDither/TPDFDither.cpp @@ -220,12 +220,16 @@ void TPDFDither::TPDFDitherKernel::Process( const Float32 *inSourceP, //0-1 is now one bit, now we dither inputSample -= 1.0; - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample = floor(inputSample); //TPDF: two 0-1 random noises inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/TPDFWide/TPDFWide.cpp b/plugins/MacAU/TPDFWide/TPDFWide.cpp index 98d8c32f3..e1f3befd6 100644 --- a/plugins/MacAU/TPDFWide/TPDFWide.cpp +++ b/plugins/MacAU/TPDFWide/TPDFWide.cpp @@ -239,31 +239,31 @@ OSStatus TPDFWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -271,7 +271,11 @@ OSStatus TPDFWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleL /= outScale; inputSampleR /= outScale; - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *outputL = inputSampleL; *outputR = inputSampleR; //direct stereo out diff --git a/plugins/MacAU/TapeDither/TapeDither.cpp b/plugins/MacAU/TapeDither/TapeDither.cpp index 12d5d179d..49a6fee53 100755 --- a/plugins/MacAU/TapeDither/TapeDither.cpp +++ b/plugins/MacAU/TapeDither/TapeDither.cpp @@ -224,7 +224,7 @@ void TapeDither::TapeDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= previousDither4; inputSample = floor(inputSample); @@ -234,6 +234,10 @@ void TapeDither::TapeDitherKernel::Process( const Float32 *inSourceP, previousDither1 = currentDither; inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/ToTape5/ToTape5.cpp b/plugins/MacAU/ToTape5/ToTape5.cpp index b131f2c23..70b120160 100755 --- a/plugins/MacAU/ToTape5/ToTape5.cpp +++ b/plugins/MacAU/ToTape5/ToTape5.cpp @@ -301,7 +301,7 @@ void ToTape5::ToTape5Kernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; drySample = inputSample; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/MacAU/TransDesk/TransDesk.cpp b/plugins/MacAU/TransDesk/TransDesk.cpp index 05f8b1efd..c31aa897d 100755 --- a/plugins/MacAU/TransDesk/TransDesk.cpp +++ b/plugins/MacAU/TransDesk/TransDesk.cpp @@ -269,11 +269,11 @@ void TransDesk::TransDeskKernel::Process( const Float32 *inSourceP, inputSample /= gain; //end of Desk section - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; diff --git a/plugins/MacAU/TubeDesk/TubeDesk.cpp b/plugins/MacAU/TubeDesk/TubeDesk.cpp index 59186882a..b6b52a085 100755 --- a/plugins/MacAU/TubeDesk/TubeDesk.cpp +++ b/plugins/MacAU/TubeDesk/TubeDesk.cpp @@ -267,11 +267,11 @@ void TubeDesk::TubeDeskKernel::Process( const Float32 *inSourceP, inputSample /= gain; //end of Desk section - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; diff --git a/plugins/MacAU/VinylDither/VinylDither.cpp b/plugins/MacAU/VinylDither/VinylDither.cpp index 8c6f8c4cf..757ff04bb 100755 --- a/plugins/MacAU/VinylDither/VinylDither.cpp +++ b/plugins/MacAU/VinylDither/VinylDither.cpp @@ -239,37 +239,37 @@ void VinylDither::VinylDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -288,6 +288,10 @@ void VinylDither::VinylDitherKernel::Process( const Float32 *inSourceP, //TenNines dither inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp b/plugins/MacAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp index 050e91c73..c9fc4cea8 100755 --- a/plugins/MacAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp +++ b/plugins/MacAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp @@ -284,8 +284,8 @@ void VoiceOfTheStarship::VoiceOfTheStarshipKernel::Process( const Float32 *inS //it's a pure random walk that will generate DC. } - if (flip) noiseA += (rand()/(double)RAND_MAX); - else noiseA -= (rand()/(double)RAND_MAX); + if (flip) noiseA += (double(fpd)/UINT32_MAX); + else noiseA -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/MacSignedAU/AQuickVoiceClip/AQuickVoiceClip.cpp b/plugins/MacSignedAU/AQuickVoiceClip/AQuickVoiceClip.cpp index cdd86e866..38fc9eb08 100755 --- a/plugins/MacSignedAU/AQuickVoiceClip/AQuickVoiceClip.cpp +++ b/plugins/MacSignedAU/AQuickVoiceClip/AQuickVoiceClip.cpp @@ -385,7 +385,7 @@ void AQuickVoiceClip::AQuickVoiceClipKernel::Process( const Float32 *inSourceP iirSampleD = (iirSampleD * altAmount) + (passThrough * iirAmount); passThrough -= iirSampleD; } - flip = not flip; + flip = !flip; //highpass section diff --git a/plugins/MacSignedAU/Air/Air.cpp b/plugins/MacSignedAU/Air/Air.cpp index f6ca6a218..cc1cb6fae 100755 --- a/plugins/MacSignedAU/Air/Air.cpp +++ b/plugins/MacSignedAU/Air/Air.cpp @@ -316,7 +316,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airOddA = (airOddA - ((airOddA - airEvenA)/256.0)) / filterQ; airEvenA = (airEvenA - ((airEvenA - airOddA)/256.0)) / filterQ; airPrevA = inputSample; - flipA = not flipA; + flipA = !flipA; correction = correction + airFactorA; } else @@ -337,7 +337,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airOddB = (airOddB - ((airOddB - airEvenB)/256.0)) / filterQ; airEvenB = (airEvenB - ((airEvenB - airOddB)/256.0)) / filterQ; airPrevB = inputSample; - flipB = not flipB; + flipB = !flipB; correction = correction + airFactorB; } //11K one @@ -358,7 +358,7 @@ void Air::AirKernel::Process( const Float32 *inSourceP, airEvenC = (airEvenC - ((airEvenC - airOddC)/256.0)) / filterQ; airPrevC = inputSample; correction = correction + airFactorC; - flop = not flop; + flop = !flop; inputSample += correction; @@ -367,11 +367,11 @@ void Air::AirKernel::Process( const Float32 *inSourceP, //nice little output stage template: if we have another scale of floating point //number, we really don't want to meaninglessly multiply that by 1.0. - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; destP += inNumChannels; diff --git a/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp b/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp index 3a65c66c3..6e6bcabef 100755 --- a/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp +++ b/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp @@ -281,7 +281,7 @@ void Apicolypse::ApicolypseKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/BassAmp/BassAmp.cpp b/plugins/MacSignedAU/BassAmp/BassAmp.cpp index b85fb6a5a..f70222680 100755 --- a/plugins/MacSignedAU/BassAmp/BassAmp.cpp +++ b/plugins/MacSignedAU/BassAmp/BassAmp.cpp @@ -380,7 +380,7 @@ void BassAmp::BassAmpKernel::Process( const Float32 *inSourceP, //set up polarities for sub-bass version - Float64 randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + Float64 randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { diff --git a/plugins/MacSignedAU/BassKit/BassKit.cpp b/plugins/MacSignedAU/BassKit/BassKit.cpp index 2a8a4f99b..36b7aa98c 100755 --- a/plugins/MacSignedAU/BassKit/BassKit.cpp +++ b/plugins/MacSignedAU/BassKit/BassKit.cpp @@ -303,10 +303,10 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags //set up the thing to choke off oscillations- belt and suspenders affair if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacSignedAU/BuildATPDF/BuildATPDF.cpp b/plugins/MacSignedAU/BuildATPDF/BuildATPDF.cpp index fda4b55a8..0cf7d42c1 100755 --- a/plugins/MacSignedAU/BuildATPDF/BuildATPDF.cpp +++ b/plugins/MacSignedAU/BuildATPDF/BuildATPDF.cpp @@ -269,7 +269,7 @@ void BuildATPDF::BuildATPDFKernel::Process( const Float32 *inSourceP, b[9] = b[8]; b[8] = b[7]; b[7] = b[6]; b[6] = b[5]; b[5] = b[4]; b[4] = b[3]; b[3] = b[2]; b[2] = b[1]; - b[1] = b[0]; b[0] = (rand()/(double)RAND_MAX); + b[1] = b[0]; b[0] = (double(fpd)/UINT32_MAX); currentDither = (b[0] * f[0]); currentDither += (b[1] * f[1]); @@ -286,6 +286,10 @@ void BuildATPDF::BuildATPDFKernel::Process( const Float32 *inSourceP, inputSample = floor(inputSample); inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/CStrip/CStrip.cpp b/plugins/MacSignedAU/CStrip/CStrip.cpp index 1348b7cb2..22e1ba848 100755 --- a/plugins/MacSignedAU/CStrip/CStrip.cpp +++ b/plugins/MacSignedAU/CStrip/CStrip.cpp @@ -483,7 +483,7 @@ void CStrip::CStripKernel::Process( const Float32 *inSourceP, } //end Gate, begin antialiasing - flip = not flip; + flip = !flip; flipthree++; if (flipthree < 1 || flipthree > 3) flipthree = 1; //counters diff --git a/plugins/MacSignedAU/Calibre/Calibre.cpp b/plugins/MacSignedAU/Calibre/Calibre.cpp index 027dda492..a5ebd3e8b 100755 --- a/plugins/MacSignedAU/Calibre/Calibre.cpp +++ b/plugins/MacSignedAU/Calibre/Calibre.cpp @@ -281,7 +281,7 @@ void Calibre::CalibreKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/Channel4/Channel4.cpp b/plugins/MacSignedAU/Channel4/Channel4.cpp index 005623364..c4c004690 100755 --- a/plugins/MacSignedAU/Channel4/Channel4.cpp +++ b/plugins/MacSignedAU/Channel4/Channel4.cpp @@ -266,7 +266,7 @@ void Channel4::Channel4Kernel::Process( const Float32 *inSourceP, inputSample += fpNShapeB; } //end noise shaping on 32 bit output - flip = not flip; + flip = !flip; *destP = inputSample; sourceP += inNumChannels; diff --git a/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp b/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp index c5561041b..b8bff8c79 100755 --- a/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp +++ b/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp @@ -256,7 +256,7 @@ void ChromeOxide::ChromeOxideKernel::Process( const Float32 *inSourceP, bridgerectifier = inputSample; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSample * randy)+(secondSample * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSample * (randy-1.0))+(thirdSample * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSample * (randy-2.0))+(fourthSample * (3.0-randy)); diff --git a/plugins/MacSignedAU/Cider/Cider.cpp b/plugins/MacSignedAU/Cider/Cider.cpp index 8a6c15fed..e74a43485 100755 --- a/plugins/MacSignedAU/Cider/Cider.cpp +++ b/plugins/MacSignedAU/Cider/Cider.cpp @@ -280,7 +280,7 @@ void Cider::CiderKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp b/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp index 0b66c3782..706aa13df 100755 --- a/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp +++ b/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp @@ -270,7 +270,7 @@ void Compresaturator::CompresaturatorKernel::Process( const Float32 *inSourceP dCount--; padFactor += d[dCount]; - Float64 randy = (rand()/(double)RAND_MAX); + Float64 randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidth) { //we are expanding the buffer so we don't remove this trailing sample lastWidth += 1; diff --git a/plugins/MacSignedAU/Crystal/Crystal.cpp b/plugins/MacSignedAU/Crystal/Crystal.cpp index 13609dbe4..c7fe06fd5 100755 --- a/plugins/MacSignedAU/Crystal/Crystal.cpp +++ b/plugins/MacSignedAU/Crystal/Crystal.cpp @@ -276,7 +276,7 @@ void Crystal::CrystalKernel::Process( const Float32 *inSourceP, //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; inputSample = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp b/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp index 5f342742e..0305a2916 100755 --- a/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp +++ b/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp @@ -225,12 +225,12 @@ void Deckwrecka::DeckwreckaKernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; - randy = (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); - randy += (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); + randy += (double(fpd)/UINT32_MAX); randy /= 6.0; randy *= wreck; //0 to 1 the noise, may not be needed //set up the noise diff --git a/plugins/MacSignedAU/Distance2/Ditherbox/Ditherbox.cpp b/plugins/MacSignedAU/Distance2/Ditherbox/Ditherbox.cpp index 1bb14cf17..5157a663a 100755 --- a/plugins/MacSignedAU/Distance2/Ditherbox/Ditherbox.cpp +++ b/plugins/MacSignedAU/Distance2/Ditherbox/Ditherbox.cpp @@ -330,22 +330,22 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 2: - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 0.5; inputSample = floor(inputSample); //flat dither break; case 3: - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 1.0; inputSample = floor(inputSample); //TPDF dither break; case 4: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= lastSample; inputSample = floor(inputSample); @@ -356,7 +356,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, case 5: ns[9] = ns[8]; ns[8] = ns[7]; ns[7] = ns[6]; ns[6] = ns[5]; ns[5] = ns[4]; ns[4] = ns[3]; ns[3] = ns[2]; ns[2] = ns[1]; - ns[1] = ns[0]; ns[0] = (rand()/(double)RAND_MAX); + ns[1] = ns[0]; ns[0] = (double(fpd)/UINT32_MAX); currentDither = (ns[0] * 0.061); currentDither -= (ns[1] * 0.11); @@ -379,7 +379,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 6: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= ns[4]; inputSample = floor(inputSample); @@ -412,37 +412,37 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -465,7 +465,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -487,7 +487,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -802,6 +802,9 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (dtype == 8) noiseShaping += inputSample - drySample; + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/Ditherbox/Ditherbox.cpp b/plugins/MacSignedAU/Ditherbox/Ditherbox.cpp index 1bb14cf17..5157a663a 100755 --- a/plugins/MacSignedAU/Ditherbox/Ditherbox.cpp +++ b/plugins/MacSignedAU/Ditherbox/Ditherbox.cpp @@ -330,22 +330,22 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 2: - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 0.5; inputSample = floor(inputSample); //flat dither break; case 3: - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample -= 1.0; inputSample = floor(inputSample); //TPDF dither break; case 4: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= lastSample; inputSample = floor(inputSample); @@ -356,7 +356,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, case 5: ns[9] = ns[8]; ns[8] = ns[7]; ns[7] = ns[6]; ns[6] = ns[5]; ns[5] = ns[4]; ns[4] = ns[3]; ns[3] = ns[2]; ns[2] = ns[1]; - ns[1] = ns[0]; ns[0] = (rand()/(double)RAND_MAX); + ns[1] = ns[0]; ns[0] = (double(fpd)/UINT32_MAX); currentDither = (ns[0] * 0.061); currentDither -= (ns[1] * 0.11); @@ -379,7 +379,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 6: - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= ns[4]; inputSample = floor(inputSample); @@ -412,37 +412,37 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -465,7 +465,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -487,7 +487,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -802,6 +802,9 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP, if (dtype == 8) noiseShaping += inputSample - drySample; + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/DoublePaul/DoublePaul.cpp b/plugins/MacSignedAU/DoublePaul/DoublePaul.cpp index 9f5361729..d7a803c34 100755 --- a/plugins/MacSignedAU/DoublePaul/DoublePaul.cpp +++ b/plugins/MacSignedAU/DoublePaul/DoublePaul.cpp @@ -178,7 +178,7 @@ void DoublePaul::DoublePaulKernel::Process( const Float32 *inSourceP, b[9] = b[8]; b[8] = b[7]; b[7] = b[6]; b[6] = b[5]; b[5] = b[4]; b[4] = b[3]; b[3] = b[2]; b[2] = b[1]; - b[1] = b[0]; b[0] = (rand()/(double)RAND_MAX); + b[1] = b[0]; b[0] = (double(fpd)/UINT32_MAX); currentDither = (b[0] * 0.061); currentDither -= (b[1] * 0.11); @@ -199,6 +199,10 @@ void DoublePaul::DoublePaulKernel::Process( const Float32 *inSourceP, inputSample = floor(inputSample); inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/DubCenter/DubCenter.cpp b/plugins/MacSignedAU/DubCenter/DubCenter.cpp index 694f64b75..b9cd2786f 100755 --- a/plugins/MacSignedAU/DubCenter/DubCenter.cpp +++ b/plugins/MacSignedAU/DubCenter/DubCenter.cpp @@ -454,10 +454,10 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla ataLowpass = (ataLowpassL + ataLowpassR) / 2.0; if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacSignedAU/DubSub/DubSub.cpp b/plugins/MacSignedAU/DubSub/DubSub.cpp index 0c9f40830..1fe13aeb4 100755 --- a/plugins/MacSignedAU/DubSub/DubSub.cpp +++ b/plugins/MacSignedAU/DubSub/DubSub.cpp @@ -390,10 +390,10 @@ void DubSub::DubSubKernel::Process( const Float32 *inSourceP, inputSample *= (1.0+out); if (ataLowpass > 0) - {if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;} + {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacSignedAU/DustBunny/DustBunny.cpp b/plugins/MacSignedAU/DustBunny/DustBunny.cpp index f4f26ef61..b2c69c0df 100755 --- a/plugins/MacSignedAU/DustBunny/DustBunny.cpp +++ b/plugins/MacSignedAU/DustBunny/DustBunny.cpp @@ -202,7 +202,7 @@ void DustBunny::DustBunnyKernel::Process( const Float32 *inSourceP, ataC = ataHalfwaySample - ataHalfDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataHalfDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataHalfDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for halfway sample //begin second half- inputSample and ataDrySample handled separately here @@ -213,7 +213,7 @@ void DustBunny::DustBunnyKernel::Process( const Float32 *inSourceP, ataC = inputSample - ataDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for input sample inputSample = ataDrySample; inputSample += ((ataDiffSample + ataHalfDiffSample + ataPrevDiffSample) / 2.5); ataPrevDiffSample = ataDiffSample / 2.0; diff --git a/plugins/MacSignedAU/Elation/Elation.cpp b/plugins/MacSignedAU/Elation/Elation.cpp index d482ba768..3c3e60dc4 100755 --- a/plugins/MacSignedAU/Elation/Elation.cpp +++ b/plugins/MacSignedAU/Elation/Elation.cpp @@ -334,7 +334,7 @@ void Elation::ElationKernel::Process( const Float32 *inSourceP, flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSample*(1-randy))+(lastSample*randy))*wet)+(drySample*(1.0-wet))) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/Energy/Energy.cpp b/plugins/MacSignedAU/Energy/Energy.cpp index b44293437..79eea1009 100755 --- a/plugins/MacSignedAU/Energy/Energy.cpp +++ b/plugins/MacSignedAU/Energy/Energy.cpp @@ -348,7 +348,7 @@ void Energy::EnergyKernel::Process( const Float32 *inSourceP, duoOdd = (duoOdd - ((duoOdd - duoEven)/256.0)) / 2.0; duoEven = (duoEven - ((duoEven - duoOdd)/256.0)) / 2.0; correction = correction + duoFactor; - flip = not flip; + flip = !flip; //finished duo section diff --git a/plugins/MacSignedAU/FromTape/FromTape.cpp b/plugins/MacSignedAU/FromTape/FromTape.cpp index 116d0adec..c2845e573 100755 --- a/plugins/MacSignedAU/FromTape/FromTape.cpp +++ b/plugins/MacSignedAU/FromTape/FromTape.cpp @@ -267,7 +267,7 @@ void FromTape::FromTapeKernel::Process( const Float32 *inSourceP, inputSample *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/MacSignedAU/IronOxide5/IronOxide5.cpp b/plugins/MacSignedAU/IronOxide5/IronOxide5.cpp index cb4ca6160..20f88c554 100755 --- a/plugins/MacSignedAU/IronOxide5/IronOxide5.cpp +++ b/plugins/MacSignedAU/IronOxide5/IronOxide5.cpp @@ -291,7 +291,7 @@ void IronOxide5::IronOxide5Kernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; drySample = inputSample; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -440,7 +440,7 @@ void IronOxide5::IronOxide5Kernel::Process( const Float32 *inSourceP, else inputSample = -bridgerectifier; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSample *= (1.0 - randy); inputSample += (prevInputSample*randy); prevInputSample = drySample; diff --git a/plugins/MacSignedAU/Luxor/Luxor.cpp b/plugins/MacSignedAU/Luxor/Luxor.cpp index 139f5e7af..0591f7aa0 100755 --- a/plugins/MacSignedAU/Luxor/Luxor.cpp +++ b/plugins/MacSignedAU/Luxor/Luxor.cpp @@ -280,7 +280,7 @@ void Luxor::LuxorKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/NaturalizeDither/NaturalizeDither.cpp b/plugins/MacSignedAU/NaturalizeDither/NaturalizeDither.cpp index 34f3d16ca..b0520f4c1 100755 --- a/plugins/MacSignedAU/NaturalizeDither/NaturalizeDither.cpp +++ b/plugins/MacSignedAU/NaturalizeDither/NaturalizeDither.cpp @@ -194,7 +194,7 @@ void NaturalizeDither::NaturalizeDitherKernel::Process( const Float32 *inSourc if (inputSample > 0) inputSample += (0.3333333333); if (inputSample < 0) inputSample -= (0.3333333333); - inputSample += (rand()/(double)RAND_MAX)*0.6666666666; + inputSample += (double(fpd)/UINT32_MAX)*0.6666666666; benfordize = floor(inputSample); while (benfordize >= 1.0) {benfordize /= 10;} @@ -270,6 +270,10 @@ void NaturalizeDither::NaturalizeDitherKernel::Process( const Float32 *inSourc byn[10] /= 2; //catchall for garbage data inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/Neverland/Neverland.cpp b/plugins/MacSignedAU/Neverland/Neverland.cpp index bd2311e08..df48033e7 100755 --- a/plugins/MacSignedAU/Neverland/Neverland.cpp +++ b/plugins/MacSignedAU/Neverland/Neverland.cpp @@ -282,7 +282,7 @@ void Neverland::NeverlandKernel::Process( const Float32 *inSourceP, inputSample += (b[33] * (0.00555223929714115 - (0.00030319367948553*fabs(b[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/NodeDither/NodeDither.cpp b/plugins/MacSignedAU/NodeDither/NodeDither.cpp index 841b14f9e..fc2875782 100755 --- a/plugins/MacSignedAU/NodeDither/NodeDither.cpp +++ b/plugins/MacSignedAU/NodeDither/NodeDither.cpp @@ -224,7 +224,7 @@ void NodeDither::NodeDitherKernel::Process( const Float32 *inSourceP, if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; if (phase == 1) { @@ -242,6 +242,10 @@ void NodeDither::NodeDitherKernel::Process( const Float32 *inSourceP, gcount--; inputSample /= 8388608.0; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/Noise/Noise.cpp b/plugins/MacSignedAU/Noise/Noise.cpp index 7f80dd976..14939c929 100755 --- a/plugins/MacSignedAU/Noise/Noise.cpp +++ b/plugins/MacSignedAU/Noise/Noise.cpp @@ -316,12 +316,12 @@ void Noise::NoiseKernel::Process( const Float32 *inSourceP, if (surge 1.0) surge = 1.0; } else { - surge -= ((rand()/(double)RAND_MAX)*(surge-fabs(inputSample))*decay); + surge -= ((double(fpd)/UINT32_MAX)*(surge-fabs(inputSample))*decay); if (surge < 0.0) surge = 0.0; } @@ -352,8 +352,8 @@ void Noise::NoiseKernel::Process( const Float32 *inSourceP, } - if (flip) noiseA += (rand()/(double)RAND_MAX); - else noiseA -= (rand()/(double)RAND_MAX); + if (flip) noiseA += (double(fpd)/UINT32_MAX); + else noiseA -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/MacSignedAU/PaulDither/PaulDither.cpp b/plugins/MacSignedAU/PaulDither/PaulDither.cpp index 45a524a81..16f615924 100755 --- a/plugins/MacSignedAU/PaulDither/PaulDither.cpp +++ b/plugins/MacSignedAU/PaulDither/PaulDither.cpp @@ -221,7 +221,7 @@ void PaulDither::PaulDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= previousDither; inputSample = floor(inputSample); @@ -237,6 +237,10 @@ void PaulDither::PaulDitherKernel::Process( const Float32 *inSourceP, inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/PaulWide/PaulWide.cpp b/plugins/MacSignedAU/PaulWide/PaulWide.cpp index 63d927861..cc52f1e40 100644 --- a/plugins/MacSignedAU/PaulWide/PaulWide.cpp +++ b/plugins/MacSignedAU/PaulWide/PaulWide.cpp @@ -247,34 +247,34 @@ OSStatus PaulWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -285,7 +285,11 @@ OSStatus PaulWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleL /= outScale; inputSampleR /= outScale; - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *outputL = inputSampleL; *outputR = inputSampleR; //direct stereo out diff --git a/plugins/MacSignedAU/Precious/Precious.cpp b/plugins/MacSignedAU/Precious/Precious.cpp index 1b859ba29..b5ac6218a 100755 --- a/plugins/MacSignedAU/Precious/Precious.cpp +++ b/plugins/MacSignedAU/Precious/Precious.cpp @@ -280,7 +280,7 @@ void Precious::PreciousKernel::Process( const Float32 *inSourceP, else inputSample = -(bridgerectifier+threshold); } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSample = ((inputSample*(1-randy))+(lastSample*randy)) * outlevel; lastSample = inputSample; diff --git a/plugins/MacSignedAU/Slew2/Slew2.cpp b/plugins/MacSignedAU/Slew2/Slew2.cpp index 32d96a5cd..c07e6d855 100755 --- a/plugins/MacSignedAU/Slew2/Slew2.cpp +++ b/plugins/MacSignedAU/Slew2/Slew2.cpp @@ -209,7 +209,7 @@ void Slew2::Slew2Kernel::Process( const Float32 *inSourceP, ataC = ataHalfwaySample - ataHalfDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataHalfDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataHalfDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for halfway sample //begin second half- inputSample and ataDrySample handled separately here @@ -226,7 +226,7 @@ void Slew2::Slew2Kernel::Process( const Float32 *inSourceP, ataC = inputSample - ataDrySample; if (ataFlip) {ataA *= ataDecay; ataB *= ataDecay; ataA += ataC; ataB -= ataC; ataC = ataA;} else {ataB *= ataDecay; ataA *= ataDecay; ataB += ataC; ataA -= ataC; ataC = ataB;} - ataDiffSample = (ataC * ataDecay); ataFlip = not ataFlip; + ataDiffSample = (ataC * ataDecay); ataFlip = !ataFlip; //end antialiasing section for input sample inputSample = ataDrySample; inputSample += ((ataDiffSample + ataHalfDiffSample + ataPrevDiffSample) / 0.734); ataPrevDiffSample = ataDiffSample / 2.0; diff --git a/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp b/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp index 6b1dcd87d..7c1162121 100755 --- a/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp +++ b/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp @@ -230,7 +230,7 @@ void SpatializeDither::SpatializeDitherKernel::Process( const Float32 *inSourc if (inputSample > 0) inputSample += 0.383; if (inputSample < 0) inputSample -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErr*omegaConstant; //include err absSample = fabs(inputSample); contingentErr = absSample - floor(absSample); //get next err @@ -249,6 +249,10 @@ void SpatializeDither::SpatializeDitherKernel::Process( const Float32 *inSourc //and does a teeny parallel-compression thing when almost at digital black. inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp b/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp index ea6df6b3b..3830596f3 100755 --- a/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp +++ b/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp @@ -220,12 +220,16 @@ void TPDFDither::TPDFDitherKernel::Process( const Float32 *inSourceP, //0-1 is now one bit, now we dither inputSample -= 1.0; - inputSample += (rand()/(double)RAND_MAX); - inputSample += (rand()/(double)RAND_MAX); + inputSample += (double(fpd)/UINT32_MAX); + inputSample += (double(fpd)/UINT32_MAX); inputSample = floor(inputSample); //TPDF: two 0-1 random noises inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/TPDFWide/TPDFWide.cpp b/plugins/MacSignedAU/TPDFWide/TPDFWide.cpp index 1bba410f4..96e53500e 100644 --- a/plugins/MacSignedAU/TPDFWide/TPDFWide.cpp +++ b/plugins/MacSignedAU/TPDFWide/TPDFWide.cpp @@ -239,31 +239,31 @@ OSStatus TPDFWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -272,6 +272,10 @@ OSStatus TPDFWide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *outputL = inputSampleL; *outputR = inputSampleR; //direct stereo out diff --git a/plugins/MacSignedAU/TapeDither/TapeDither.cpp b/plugins/MacSignedAU/TapeDither/TapeDither.cpp index f35146e03..36432251e 100755 --- a/plugins/MacSignedAU/TapeDither/TapeDither.cpp +++ b/plugins/MacSignedAU/TapeDither/TapeDither.cpp @@ -224,7 +224,7 @@ void TapeDither::TapeDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); inputSample += currentDither; inputSample -= previousDither4; inputSample = floor(inputSample); @@ -234,6 +234,10 @@ void TapeDither::TapeDitherKernel::Process( const Float32 *inSourceP, previousDither1 = currentDither; inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/ToTape5/ToTape5.cpp b/plugins/MacSignedAU/ToTape5/ToTape5.cpp index 00e22d7ce..822bd3706 100755 --- a/plugins/MacSignedAU/ToTape5/ToTape5.cpp +++ b/plugins/MacSignedAU/ToTape5/ToTape5.cpp @@ -301,7 +301,7 @@ void ToTape5::ToTape5Kernel::Process( const Float32 *inSourceP, if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17; drySample = inputSample; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/MacSignedAU/TransDesk/TransDesk.cpp b/plugins/MacSignedAU/TransDesk/TransDesk.cpp index f90d82441..ce741a578 100755 --- a/plugins/MacSignedAU/TransDesk/TransDesk.cpp +++ b/plugins/MacSignedAU/TransDesk/TransDesk.cpp @@ -269,11 +269,11 @@ void TransDesk::TransDeskKernel::Process( const Float32 *inSourceP, inputSample /= gain; //end of Desk section - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; diff --git a/plugins/MacSignedAU/TubeDesk/TubeDesk.cpp b/plugins/MacSignedAU/TubeDesk/TubeDesk.cpp index e04e599dc..83ab33d9e 100755 --- a/plugins/MacSignedAU/TubeDesk/TubeDesk.cpp +++ b/plugins/MacSignedAU/TubeDesk/TubeDesk.cpp @@ -267,11 +267,11 @@ void TubeDesk::TubeDeskKernel::Process( const Float32 *inSourceP, inputSample /= gain; //end of Desk section - //32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSample, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSample += (dither-fpNShape); fpNShape = dither; - //end 32 bit dither + //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; diff --git a/plugins/MacSignedAU/VinylDither/VinylDither.cpp b/plugins/MacSignedAU/VinylDither/VinylDither.cpp index 05e8a7a4c..672263302 100755 --- a/plugins/MacSignedAU/VinylDither/VinylDither.cpp +++ b/plugins/MacSignedAU/VinylDither/VinylDither.cpp @@ -239,37 +239,37 @@ void VinylDither::VinylDitherKernel::Process( const Float32 *inSourceP, inputSample *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); ns[0] += absSample; ns[0] /= 2; absSample -= ns[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[1] += absSample; ns[1] /= 2; absSample -= ns[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[2] += absSample; ns[2] /= 2; absSample -= ns[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[3] += absSample; ns[3] /= 2; absSample -= ns[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[4] += absSample; ns[4] /= 2; absSample -= ns[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[5] += absSample; ns[5] /= 2; absSample -= ns[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[6] += absSample; ns[6] /= 2; absSample -= ns[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[7] += absSample; ns[7] /= 2; absSample -= ns[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[8] += absSample; ns[8] /= 2; absSample -= ns[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[9] += absSample; ns[9] /= 2; absSample -= ns[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[10] += absSample; ns[10] /= 2; absSample -= ns[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[11] += absSample; ns[11] /= 2; absSample -= ns[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[12] += absSample; ns[12] /= 2; absSample -= ns[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[13] += absSample; ns[13] /= 2; absSample -= ns[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[14] += absSample; ns[14] /= 2; absSample -= ns[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); ns[15] += absSample; ns[15] /= 2; absSample -= ns[15]; //install noise and then shape it absSample += inputSample; @@ -288,6 +288,10 @@ void VinylDither::VinylDitherKernel::Process( const Float32 *inSourceP, //TenNines dither inputSample /= outScale; + + fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; + //pseudorandom number updater + *destP = inputSample; sourceP += inNumChannels; destP += inNumChannels; } diff --git a/plugins/MacSignedAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp b/plugins/MacSignedAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp index 706da8d5f..c122eed97 100755 --- a/plugins/MacSignedAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp +++ b/plugins/MacSignedAU/VoiceOfTheStarship/VoiceOfTheStarship.cpp @@ -284,8 +284,8 @@ void VoiceOfTheStarship::VoiceOfTheStarshipKernel::Process( const Float32 *inS //it's a pure random walk that will generate DC. } - if (flip) noiseA += (rand()/(double)RAND_MAX); - else noiseA -= (rand()/(double)RAND_MAX); + if (flip) noiseA += (double(fpd)/UINT32_MAX); + else noiseA -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp b/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp index c0b954717..f72f53455 100755 --- a/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp +++ b/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp @@ -155,11 +155,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -331,22 +331,22 @@ void Apicolypse::processDoubleReplacing(double **inputs, double **outputs, VstIn } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp b/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp index 3887a51d7..0d50b6348 100755 --- a/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp +++ b/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp @@ -172,12 +172,12 @@ void AverMatrix::processDoubleReplacing(double **inputs, double **outputs, VstIn //wet can be negative, in which case dry is always full volume and they cancel //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BassAmp/source/BassAmpProc.cpp b/plugins/MacSignedVST/BassAmp/source/BassAmpProc.cpp index 025fa038a..5412acbd7 100755 --- a/plugins/MacSignedVST/BassAmp/source/BassAmpProc.cpp +++ b/plugins/MacSignedVST/BassAmp/source/BassAmpProc.cpp @@ -195,7 +195,7 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -362,11 +362,11 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + LinputSample += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); frexpf((float)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + RinputSample += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); //end 32 bit stereo floating point dither *out1 = LinputSample; @@ -567,7 +567,7 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -733,12 +733,12 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //apply stored up tiny corrections //begin 64 bit stereo floating point dither - int expon; frexp((double)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //int expon; frexp((double)LinputSample, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)RinputSample, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); //end 64 bit stereo floating point dither *out1 = LinputSample; diff --git a/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp b/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp index 8575a9e62..d289cdb77 100755 --- a/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp +++ b/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp @@ -637,12 +637,12 @@ void BassDrive::processDoubleReplacing(double **inputs, double **outputs, VstInt flip = !flip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp b/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp index 620b4449d..b4621d946 100755 --- a/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp +++ b/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp @@ -57,7 +57,7 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -239,7 +239,7 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp b/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp index 772a7cadc..4590b6f3f 100755 --- a/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp +++ b/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp @@ -263,12 +263,12 @@ void Baxandall::processDoubleReplacing(double **inputs, double **outputs, VstInt //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp b/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp index f872c60ca..5faae53f4 100755 --- a/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp +++ b/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp @@ -303,12 +303,12 @@ void Biquad::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp b/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp index db8d29571..64369d6a9 100755 --- a/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp +++ b/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp @@ -413,12 +413,12 @@ void Biquad2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp b/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp index a0a47f4f4..55512a0ca 100755 --- a/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp +++ b/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp @@ -286,12 +286,12 @@ void BiquadDouble::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp index 001a00ee1..d2e75159c 100755 --- a/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp +++ b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp @@ -294,12 +294,12 @@ void BiquadOneHalf::processDoubleReplacing(double **inputs, double **outputs, Vs } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp b/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp index 84b05ed53..0db6bc66a 100755 --- a/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp +++ b/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp @@ -309,12 +309,12 @@ void BiquadTriple::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp b/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp index b53db95e5..66b5c75e5 100755 --- a/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp +++ b/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp @@ -205,12 +205,12 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (drySampleR * clamp * wet * 16.0); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp index 69a6193b7..be5ab28ea 100755 --- a/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp +++ b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp @@ -653,12 +653,12 @@ void BrightAmbience::processDoubleReplacing(double **inputs, double **outputs, V gcount--; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp index 1e9b85c8b..506eeccc4 100755 --- a/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp +++ b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp @@ -125,12 +125,12 @@ void BrightAmbience2::processDoubleReplacing(double **inputs, double **outputs, //Dry/Wet control, defaults to the last slider //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/BuildATPDF/source/BuildATPDFProc.cpp b/plugins/MacSignedVST/BuildATPDF/source/BuildATPDFProc.cpp index 0b61354b3..08459f2a1 100755 --- a/plugins/MacSignedVST/BuildATPDF/source/BuildATPDFProc.cpp +++ b/plugins/MacSignedVST/BuildATPDF/source/BuildATPDFProc.cpp @@ -41,7 +41,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -58,7 +58,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -77,7 +77,11 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -122,7 +126,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -139,7 +143,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -158,7 +162,11 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp b/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp index b51ae2d14..e146b3cfe 100755 --- a/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp +++ b/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp @@ -160,11 +160,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Calibre::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp b/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp index 5bd961e2d..5d2537a67 100755 --- a/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp +++ b/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp @@ -315,12 +315,12 @@ void Capacitor2::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (inputSampleR * nonLinTrim * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp b/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp index bb42ba20a..9620c3b75 100755 --- a/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp +++ b/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp @@ -201,12 +201,12 @@ void Channel7::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp b/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp index f62bed44f..2c0b5ac3d 100755 --- a/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp +++ b/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp @@ -249,12 +249,12 @@ void Channel8::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp index 873c535f1..662e103f2 100755 --- a/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp +++ b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp @@ -96,7 +96,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -112,7 +112,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -257,7 +257,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -273,7 +273,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -312,12 +312,12 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI //that simple. //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Cider/source/CiderProc.cpp b/plugins/MacSignedVST/Cider/source/CiderProc.cpp index 31be7279f..114cb1b45 100755 --- a/plugins/MacSignedVST/Cider/source/CiderProc.cpp +++ b/plugins/MacSignedVST/Cider/source/CiderProc.cpp @@ -158,11 +158,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Cider::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Coils/source/CoilsProc.cpp b/plugins/MacSignedVST/Coils/source/CoilsProc.cpp index 278f0690d..f6a0fcb3d 100755 --- a/plugins/MacSignedVST/Coils/source/CoilsProc.cpp +++ b/plugins/MacSignedVST/Coils/source/CoilsProc.cpp @@ -157,12 +157,12 @@ void Coils::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp b/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp index 9a70ac814..3a6f7ae1b 100755 --- a/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp +++ b/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp @@ -119,7 +119,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad L padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -140,7 +140,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad R padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -258,7 +258,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -319,7 +319,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -351,12 +351,12 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); + //int expon; frexp((double)inputSampleL, &expon); fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); - frexp((double)inputSampleR, &expon); + //inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //frexp((double)inputSampleR, &expon); fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); //end 64 bit stereo floating point dither *out1 = inputSampleL; diff --git a/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp b/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp index 6e25bd3a3..02799869f 100755 --- a/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp +++ b/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp @@ -103,12 +103,12 @@ void Console6Buss::processDoubleReplacing(double **inputs, double **outputs, Vst //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp b/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp index a72e3b8f0..d73c63139 100755 --- a/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp +++ b/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp @@ -103,12 +103,12 @@ void Console6Channel::processDoubleReplacing(double **inputs, double **outputs, //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp b/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp index d5eef67c8..5e90250eb 100755 --- a/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp +++ b/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp @@ -143,12 +143,12 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. @@ -312,12 +312,12 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp b/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp index f868c8284..f70dbc417 100755 --- a/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp +++ b/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp @@ -193,12 +193,12 @@ void DeBess::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //sense monitoring //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp b/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp index 88547ff75..16c9324b1 100755 --- a/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp +++ b/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp @@ -251,12 +251,12 @@ void DeHiss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp b/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp index 4ff6cf82d..0581d7162 100755 --- a/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp +++ b/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp @@ -345,12 +345,12 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 lastSampleR = drySampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp b/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp index 1e59e635c..fb9b670f0 100755 --- a/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp +++ b/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp @@ -41,22 +41,22 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -226,22 +226,22 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -359,12 +359,12 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR += (HeadBumpR * wreck); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp index efd520f21..f84078ef5 100755 --- a/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp +++ b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp @@ -191,12 +191,12 @@ void DigitalBlack::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp b/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp index 17240d1cf..66d7a78cd 100755 --- a/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp +++ b/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp @@ -231,12 +231,12 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Ditherbox/source/DitherboxProc.cpp b/plugins/MacSignedVST/Ditherbox/source/DitherboxProc.cpp index 8851aeaa0..1acc7a63e 100755 --- a/plugins/MacSignedVST/Ditherbox/source/DitherboxProc.cpp +++ b/plugins/MacSignedVST/Ditherbox/source/DitherboxProc.cpp @@ -70,34 +70,34 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -108,7 +108,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -131,7 +131,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -156,8 +156,8 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -202,37 +202,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -249,37 +249,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -303,7 +303,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -317,7 +317,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -339,11 +339,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -965,7 +965,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl noiseShapingL += inputSampleL - drySampleL; noiseShapingR += inputSampleR - drySampleR; } - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -1039,34 +1043,34 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -1077,7 +1081,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -1100,7 +1104,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -1124,8 +1128,8 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -1170,37 +1174,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -1217,37 +1221,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -1271,7 +1275,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -1285,7 +1289,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -1307,11 +1311,11 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -1933,7 +1937,11 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt noiseShapingL += inputSampleL - drySampleL; noiseShapingR += inputSampleR - drySampleR; } - + + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/DoublePaul/source/DoublePaulProc.cpp b/plugins/MacSignedVST/DoublePaul/source/DoublePaulProc.cpp index 0ba4cae2b..cd11d65ea 100755 --- a/plugins/MacSignedVST/DoublePaul/source/DoublePaulProc.cpp +++ b/plugins/MacSignedVST/DoublePaul/source/DoublePaulProc.cpp @@ -33,7 +33,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -56,7 +56,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -80,6 +80,10 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,7 +120,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -139,7 +143,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -163,6 +167,10 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp b/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp index 197309401..b51207b1d 100755 --- a/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp +++ b/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp @@ -155,7 +155,7 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -438,7 +438,7 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacSignedVST/DubSub/source/DubSubProc.cpp b/plugins/MacSignedVST/DubSub/source/DubSubProc.cpp index 81acffd7a..bdc30447d 100755 --- a/plugins/MacSignedVST/DubSub/source/DubSubProc.cpp +++ b/plugins/MacSignedVST/DubSub/source/DubSubProc.cpp @@ -194,11 +194,11 @@ void DubSub::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise @@ -597,11 +597,11 @@ void DubSub::processDoubleReplacing(double **inputs, double **outputs, VstInt32 else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise diff --git a/plugins/MacSignedVST/Dyno/source/DynoProc.cpp b/plugins/MacSignedVST/Dyno/source/DynoProc.cpp index c2db122db..b6c6d71f6 100755 --- a/plugins/MacSignedVST/Dyno/source/DynoProc.cpp +++ b/plugins/MacSignedVST/Dyno/source/DynoProc.cpp @@ -83,12 +83,12 @@ void Dyno::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //dyno is the one that tries to raise peak energy //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Elation/source/ElationProc.cpp b/plugins/MacSignedVST/Elation/source/ElationProc.cpp index 8df4ce867..d0e0ad4ce 100755 --- a/plugins/MacSignedVST/Elation/source/ElationProc.cpp +++ b/plugins/MacSignedVST/Elation/source/ElationProc.cpp @@ -258,12 +258,12 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; @@ -538,23 +538,23 @@ void Elation::processDoubleReplacing(double **inputs, double **outputs, VstInt32 flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Facet/source/FacetProc.cpp b/plugins/MacSignedVST/Facet/source/FacetProc.cpp index 85af36f42..e237d9252 100755 --- a/plugins/MacSignedVST/Facet/source/FacetProc.cpp +++ b/plugins/MacSignedVST/Facet/source/FacetProc.cpp @@ -103,12 +103,12 @@ void Facet::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Focus/source/FocusProc.cpp b/plugins/MacSignedVST/Focus/source/FocusProc.cpp index fd7624e72..a5f0ead84 100755 --- a/plugins/MacSignedVST/Focus/source/FocusProc.cpp +++ b/plugins/MacSignedVST/Focus/source/FocusProc.cpp @@ -265,12 +265,12 @@ void Focus::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/FromTape/source/FromTapeProc.cpp b/plugins/MacSignedVST/FromTape/source/FromTapeProc.cpp index 5e8aca68a..46bc5759b 100755 --- a/plugins/MacSignedVST/FromTape/source/FromTapeProc.cpp +++ b/plugins/MacSignedVST/FromTape/source/FromTapeProc.cpp @@ -55,7 +55,7 @@ void FromTape::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section @@ -252,7 +252,7 @@ void FromTape::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp index 06ebe4bae..d5d446136 100755 --- a/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp +++ b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp @@ -623,12 +623,12 @@ void GlitchShifter::processDoubleReplacing(double **inputs, double **outputs, Vs //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Gringer/source/GringerProc.cpp b/plugins/MacSignedVST/Gringer/source/GringerProc.cpp index b59800001..2dc2a26fe 100755 --- a/plugins/MacSignedVST/Gringer/source/GringerProc.cpp +++ b/plugins/MacSignedVST/Gringer/source/GringerProc.cpp @@ -219,12 +219,12 @@ void Gringer::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp b/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp index e87194339..b66aa6d31 100755 --- a/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp +++ b/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp @@ -261,12 +261,12 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp b/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp index 653fac502..a530eeb65 100755 --- a/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp +++ b/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp @@ -209,12 +209,12 @@ void Infrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp b/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp index 2707bd744..ab0efc435 100755 --- a/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp +++ b/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp @@ -163,12 +163,12 @@ void Interstage::processDoubleReplacing(double **inputs, double **outputs, VstIn lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/IronOxide5/source/IronOxide5Proc.cpp b/plugins/MacSignedVST/IronOxide5/source/IronOxide5Proc.cpp index a79d2d315..ebffe6e53 100755 --- a/plugins/MacSignedVST/IronOxide5/source/IronOxide5Proc.cpp +++ b/plugins/MacSignedVST/IronOxide5/source/IronOxide5Proc.cpp @@ -76,7 +76,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -347,7 +347,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); @@ -471,7 +471,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -742,7 +742,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); diff --git a/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp b/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp index 4f7178a86..0f756ee6e 100755 --- a/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp +++ b/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp @@ -229,12 +229,12 @@ void Isolator::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp b/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp index 1bed77696..8e27a2379 100755 --- a/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp +++ b/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp @@ -262,12 +262,12 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp b/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp index 89c8487ba..f6ef00f03 100755 --- a/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp +++ b/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp @@ -160,11 +160,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Luxor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp b/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp index c7835d557..a1ca2768d 100755 --- a/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp +++ b/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp @@ -91,12 +91,12 @@ void MoNoam::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (processing == kBYPASS) {inputSampleL = *in1; inputSampleR = *in2;} //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Mojo/source/MojoProc.cpp b/plugins/MacSignedVST/Mojo/source/MojoProc.cpp index 2597aae9e..e29ef01b9 100755 --- a/plugins/MacSignedVST/Mojo/source/MojoProc.cpp +++ b/plugins/MacSignedVST/Mojo/source/MojoProc.cpp @@ -83,12 +83,12 @@ void Mojo::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //mojo is the one that flattens WAAAAY out very softly before wavefolding //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/NaturalizeDither/source/NaturalizeDitherProc.cpp b/plugins/MacSignedVST/NaturalizeDither/source/NaturalizeDitherProc.cpp index ffc731e21..6228d9601 100755 --- a/plugins/MacSignedVST/NaturalizeDither/source/NaturalizeDitherProc.cpp +++ b/plugins/MacSignedVST/NaturalizeDither/source/NaturalizeDitherProc.cpp @@ -36,11 +36,11 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -195,6 +195,10 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -234,11 +238,11 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -393,6 +397,10 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp b/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp index 02dcb04b7..babded715 100755 --- a/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp +++ b/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp @@ -156,11 +156,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -332,22 +332,22 @@ void Neverland::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp b/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp index 3c049ce59..86e5285a6 100755 --- a/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp +++ b/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp @@ -2028,12 +2028,12 @@ void Nikola::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/NodeDither/source/NodeDitherProc.cpp b/plugins/MacSignedVST/NodeDither/source/NodeDitherProc.cpp index 50f3e85f9..cf4d3c51d 100755 --- a/plugins/MacSignedVST/NodeDither/source/NodeDitherProc.cpp +++ b/plugins/MacSignedVST/NodeDither/source/NodeDitherProc.cpp @@ -43,10 +43,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -71,6 +71,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -117,10 +121,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -145,6 +149,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/Noise/source/NoiseProc.cpp b/plugins/MacSignedVST/Noise/source/NoiseProc.cpp index 82d67fde1..bc268c0ff 100755 --- a/plugins/MacSignedVST/Noise/source/NoiseProc.cpp +++ b/plugins/MacSignedVST/Noise/source/NoiseProc.cpp @@ -118,12 +118,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -134,12 +134,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -173,10 +173,10 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { @@ -388,12 +388,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -404,12 +404,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -443,10 +443,10 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/MacSignedVST/PaulDither/source/PaulDitherProc.cpp b/plugins/MacSignedVST/PaulDither/source/PaulDitherProc.cpp index 476bfd332..6495542ba 100755 --- a/plugins/MacSignedVST/PaulDither/source/PaulDitherProc.cpp +++ b/plugins/MacSignedVST/PaulDither/source/PaulDitherProc.cpp @@ -42,8 +42,8 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -69,6 +69,10 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -114,8 +118,8 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -141,6 +145,10 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/PaulWide/source/PaulWideProc.cpp b/plugins/MacSignedVST/PaulWide/source/PaulWideProc.cpp index 13cd58f79..ecdae8a30 100755 --- a/plugins/MacSignedVST/PaulWide/source/PaulWideProc.cpp +++ b/plugins/MacSignedVST/PaulWide/source/PaulWideProc.cpp @@ -46,34 +46,34 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -85,6 +85,10 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -134,34 +138,34 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -173,6 +177,10 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp index d7d4af84c..794da2b65 100755 --- a/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp +++ b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp @@ -267,12 +267,12 @@ void PeaksOnly::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR *= 0.63679; //scale it to 0dB output at full blast //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp index 5d8a7d157..3865d3bfc 100755 --- a/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp +++ b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp @@ -18339,12 +18339,12 @@ void PocketVerbs::processDoubleReplacing(double **inputs, double **outputs, VstI //here we combine the tanks with the dry signal //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp b/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp index a6bd88d45..48f864776 100755 --- a/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp +++ b/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp @@ -307,12 +307,12 @@ void Podcast::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (inputSampleR < -0.999) inputSampleR = -0.999; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp index 2f306c079..c13b4ef04 100755 --- a/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp +++ b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp @@ -640,12 +640,12 @@ void PodcastDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vs //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp b/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp index 4b637c3ff..88eb14def 100755 --- a/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp +++ b/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp @@ -127,12 +127,12 @@ void PowerSag2::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR = drySampleR - (difference * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Precious/source/PreciousProc.cpp b/plugins/MacSignedVST/Precious/source/PreciousProc.cpp index a2de05c32..189a324a9 100755 --- a/plugins/MacSignedVST/Precious/source/PreciousProc.cpp +++ b/plugins/MacSignedVST/Precious/source/PreciousProc.cpp @@ -158,11 +158,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Precious::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp b/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp index d2df18951..a4efee935 100755 --- a/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp +++ b/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp @@ -199,12 +199,12 @@ void PurestAir::processDoubleReplacing(double **inputs, double **outputs, VstInt } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp b/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp index 1b56af4a1..376e84f7f 100755 --- a/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp +++ b/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp @@ -99,12 +99,12 @@ void Recurve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //iron bar so people can play with this as a loudenator //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Remap/source/RemapProc.cpp b/plugins/MacSignedVST/Remap/source/RemapProc.cpp index 32bb5b9e6..f715824c8 100755 --- a/plugins/MacSignedVST/Remap/source/RemapProc.cpp +++ b/plugins/MacSignedVST/Remap/source/RemapProc.cpp @@ -137,12 +137,12 @@ void Remap::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp b/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp index 22c389843..e11603657 100755 --- a/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp +++ b/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp @@ -579,12 +579,12 @@ void ResEQ::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp b/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp index 297a4f6e3..295ab21c6 100755 --- a/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp +++ b/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp @@ -135,12 +135,12 @@ void Slew3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //end R //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp b/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp index 9d532987c..24d9c46f1 100755 --- a/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp +++ b/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp @@ -293,12 +293,12 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp b/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp index f08b9563c..9d97f9297 100755 --- a/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp +++ b/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp @@ -127,12 +127,12 @@ void SoftGate::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/SpatializeDither/source/SpatializeDitherProc.cpp b/plugins/MacSignedVST/SpatializeDither/source/SpatializeDitherProc.cpp index bf9da7ef7..d3e5723be 100755 --- a/plugins/MacSignedVST/SpatializeDither/source/SpatializeDitherProc.cpp +++ b/plugins/MacSignedVST/SpatializeDither/source/SpatializeDitherProc.cpp @@ -51,7 +51,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -65,7 +65,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -88,6 +88,10 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -142,7 +146,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -156,7 +160,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -179,6 +183,10 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/TPDFDither/source/TPDFDitherProc.cpp b/plugins/MacSignedVST/TPDFDither/source/TPDFDitherProc.cpp index e51504299..f86345088 100755 --- a/plugins/MacSignedVST/TPDFDither/source/TPDFDitherProc.cpp +++ b/plugins/MacSignedVST/TPDFDither/source/TPDFDitherProc.cpp @@ -42,11 +42,11 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -55,6 +55,10 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -100,11 +104,11 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -113,6 +117,10 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/TPDFWide/source/TPDFWideProc.cpp b/plugins/MacSignedVST/TPDFWide/source/TPDFWideProc.cpp index 45b831dac..2b9232bf0 100755 --- a/plugins/MacSignedVST/TPDFWide/source/TPDFWideProc.cpp +++ b/plugins/MacSignedVST/TPDFWide/source/TPDFWideProc.cpp @@ -40,31 +40,31 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -73,6 +73,10 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,31 +120,31 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -149,6 +153,10 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/Tape/source/TapeProc.cpp b/plugins/MacSignedVST/Tape/source/TapeProc.cpp index 2f26675ed..ea73fea27 100755 --- a/plugins/MacSignedVST/Tape/source/TapeProc.cpp +++ b/plugins/MacSignedVST/Tape/source/TapeProc.cpp @@ -553,12 +553,12 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //final iron bar //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/TapeDither/source/TapeDitherProc.cpp b/plugins/MacSignedVST/TapeDither/source/TapeDitherProc.cpp index 4bf9003fd..f67b259b1 100755 --- a/plugins/MacSignedVST/TapeDither/source/TapeDitherProc.cpp +++ b/plugins/MacSignedVST/TapeDither/source/TapeDitherProc.cpp @@ -41,8 +41,8 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -65,6 +65,10 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -110,8 +114,8 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -134,6 +138,10 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/ToTape5/source/ToTape5Proc.cpp b/plugins/MacSignedVST/ToTape5/source/ToTape5Proc.cpp index 504bbc829..840dbd28c 100755 --- a/plugins/MacSignedVST/ToTape5/source/ToTape5Proc.cpp +++ b/plugins/MacSignedVST/ToTape5/source/ToTape5Proc.cpp @@ -77,7 +77,7 @@ void ToTape5::processReplacing(float **inputs, float **outputs, VstInt32 sampleF drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; @@ -406,7 +406,7 @@ void ToTape5::processDoubleReplacing(double **inputs, double **outputs, VstInt32 drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp b/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp index f3a052485..3cfc521fd 100755 --- a/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp +++ b/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp @@ -657,12 +657,12 @@ void ToTape6::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp b/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp index ec7d1b27b..574ce7f45 100755 --- a/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp +++ b/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp @@ -127,12 +127,12 @@ void TremoSquare::processDoubleReplacing(double **inputs, double **outputs, VstI } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp b/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp index ef7721197..c04e6dfed 100755 --- a/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp +++ b/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp @@ -627,12 +627,12 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp b/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp index 96ee029c7..5e3a29ced 100755 --- a/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp +++ b/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp @@ -209,12 +209,12 @@ void Ultrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp b/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp index cbce9a998..5c9d08a86 100755 --- a/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp +++ b/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp @@ -91,12 +91,12 @@ void UltrasonicLite::processDoubleReplacing(double **inputs, double **outputs, V biquadA[12] = biquadA[11]; biquadA[11] = inputSampleR; inputSampleR = outSampleR; biquadA[14] = biquadA[13]; biquadA[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp b/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp index 8e3cb8250..cecb2a823 100755 --- a/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp +++ b/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp @@ -129,12 +129,12 @@ void UltrasonicMed::processDoubleReplacing(double **inputs, double **outputs, Vs biquadB[12] = biquadB[11]; biquadB[11] = inputSampleR; inputSampleR = outSampleR; biquadB[14] = biquadB[13]; biquadB[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp b/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp index f196e90e2..ce0795b37 100755 --- a/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp +++ b/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp @@ -185,12 +185,12 @@ void Vibrato::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //Inv/Dry/Wet control //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/VinylDither/source/VinylDitherProc.cpp b/plugins/MacSignedVST/VinylDither/source/VinylDitherProc.cpp index d73eece2d..018cea36a 100755 --- a/plugins/MacSignedVST/VinylDither/source/VinylDitherProc.cpp +++ b/plugins/MacSignedVST/VinylDither/source/VinylDitherProc.cpp @@ -41,37 +41,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -87,37 +87,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -136,6 +136,10 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -180,37 +184,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -226,37 +230,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -275,6 +279,10 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacSignedVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp b/plugins/MacSignedVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp index dda1805dc..fd6e5bdfa 100755 --- a/plugins/MacSignedVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp +++ b/plugins/MacSignedVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp @@ -110,10 +110,10 @@ void VoiceOfTheStarship::processReplacing(float **inputs, float **outputs, VstIn //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) @@ -300,10 +300,10 @@ void VoiceOfTheStarship::processDoubleReplacing(double **inputs, double **output //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp index 53ecb0fff..97604cacb 100755 --- a/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp +++ b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp @@ -195,12 +195,12 @@ void VoiceTrick::processDoubleReplacing(double **inputs, double **outputs, VstIn //Thanks to Peter Gabriel for many great examples of hit vocals recorded just like this :) //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacSignedVST/curve/source/curveProc.cpp b/plugins/MacSignedVST/curve/source/curveProc.cpp index 1b607c120..56fdbfd9b 100755 --- a/plugins/MacSignedVST/curve/source/curveProc.cpp +++ b/plugins/MacSignedVST/curve/source/curveProc.cpp @@ -87,12 +87,12 @@ void curve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s inputSampleR *= 2.0; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser index f40af8a43..0f22f4b8a 100755 --- a/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 653274464; - PBXWorkspaceStateSaveDate = 653274464; + PBXPerProjectTemplateStateSaveDate = 667721114; + PBXWorkspaceStateSaveDate = 667721114; }; perUserProjectItems = { - 8BCBAE0726F02D9F00E491F2 /* PBXTextBookmark */ = 8BCBAE0726F02D9F00E491F2 /* PBXTextBookmark */; - 8BCBAE0826F02D9F00E491F2 /* PBXTextBookmark */ = 8BCBAE0826F02D9F00E491F2 /* PBXTextBookmark */; + 8B1A8E2227CC9D9D00649D11 /* PBXTextBookmark */ = 8B1A8E2227CC9D9D00649D11 /* PBXTextBookmark */; + 8B9FE19527CAD3A2002EC0AA /* PBXTextBookmark */ = 8B9FE19527CAD3A2002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -86,9 +86,9 @@ }; 24D8286F09A914000093AEF8 /* ADClip7Proc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1146, 16542}}"; - sepNavSelRange = "{31114, 0}"; - sepNavVisRange = "{16210, 148}"; + sepNavIntBoundsRect = "{{0, 0}, {849, 15678}}"; + sepNavSelRange = "{28505, 0}"; + sepNavVisRange = "{16240, 99}"; sepNavWindowFrame = "{{361, 47}, {895, 831}}"; }; }; @@ -106,24 +106,24 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8BCBAE0726F02D9F00E491F2 /* PBXTextBookmark */ = { + 8B1A8E2227CC9D9D00649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ADClip7Proc.cpp */; - name = "ADClip7Proc.cpp: 900"; + name = "ADClip7Proc.cpp: 855"; rLen = 0; - rLoc = 31114; + rLoc = 28505; rType = 0; - vrLen = 148; - vrLoc = 16210; + vrLen = 99; + vrLoc = 16240; }; - 8BCBAE0826F02D9F00E491F2 /* PBXTextBookmark */ = { + 8B9FE19527CAD3A2002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ADClip7Proc.cpp */; - name = "ADClip7Proc.cpp: 900"; + name = "ADClip7Proc.cpp: 855"; rLen = 0; - rLoc = 31114; + rLoc = 28505; rType = 0; - vrLen = 148; + vrLen = 129; vrLoc = 16210; }; 8D01CCC60486CAD60068D4B7 /* ADClip7 */ = { diff --git a/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 index 034df74d1..38e31b4f3 100755 --- a/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ADClip7/ADClip7.xcodeproj/christopherjohnson.perspectivev3 @@ -351,10 +351,10 @@ _historyCapacity 0 bookmark - 8BCBAE0826F02D9F00E491F2 + 8B1A8E2227CC9D9D00649D11 history - 8BCBAE0726F02D9F00E491F2 + 8B9FE19527CAD3A2002EC0AA SplitCount @@ -368,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 102}} RubberWindowFrame 96 265 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 102pt Proportion - 309pt + 339pt Tabs @@ -393,7 +393,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 312}} RubberWindowFrame 96 265 810 487 0 0 1440 878 @@ -477,11 +477,11 @@ TableOfContents - 8BCBAE0926F02D9F00E491F2 + 8B1A8E2327CC9D9D00649D11 1CA23ED40692098700951B8B - 8BCBAE0A26F02D9F00E491F2 + 8B1A8E2427CC9D9D00649D11 8B0237581D42B1C400E1E8C8 - 8BCBAE0B26F02D9F00E491F2 + 8B1A8E2527CC9D9D00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +634,7 @@ StatusbarIsVisible TimeStamp - 653274527.50258505 + 667721117.45770895 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode diff --git a/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.pbxuser index 3c4fed05d..d79469a90 100755 --- a/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 631580828; - PBXWorkspaceStateSaveDate = 631580828; + PBXPerProjectTemplateStateSaveDate = 667721121; + PBXWorkspaceStateSaveDate = 667721121; }; perUserProjectItems = { - 8B2E7A5B25A528A700485B86 /* PBXTextBookmark */ = 8B2E7A5B25A528A700485B86 /* PBXTextBookmark */; + 8B1A8E4027CC9DA600649D11 /* PBXTextBookmark */ = 8B1A8E4027CC9DA600649D11 /* PBXTextBookmark */; 8B79334D21F50CB2006E9731 /* PBXTextBookmark */ = 8B79334D21F50CB2006E9731 /* PBXTextBookmark */; - 8BA544DF2221FB88005CB2C3 /* PBXTextBookmark */ = 8BA544DF2221FB88005CB2C3 /* PBXTextBookmark */; + 8B9FE1D627CAD499002EC0AA /* PBXTextBookmark */ = 8B9FE1D627CAD499002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -63,17 +63,17 @@ }; 2407DEB6089929BA00EB68BF /* ADT.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {691, 2002}}"; - sepNavSelRange = "{4290, 0}"; - sepNavVisRange = "{4100, 345}"; + sepNavIntBoundsRect = "{{0, 0}, {885, 3096}}"; + sepNavSelRange = "{821, 0}"; + sepNavVisRange = "{44, 1336}"; sepNavWindowFrame = "{{735, 48}, {705, 830}}"; }; }; 245463B80991757100464AD3 /* ADT.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {866, 1040}}"; - sepNavSelRange = "{2492, 0}"; - sepNavVisRange = "{458, 2203}"; + sepNavIntBoundsRect = "{{0, 0}, {1110, 1440}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{926, 1719}"; sepNavWindowFrame = "{{20, 47}, {895, 831}}"; }; }; @@ -87,9 +87,9 @@ }; 24D8286F09A914000093AEF8 /* ADTProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1056, 5112}}"; - sepNavSelRange = "{7166, 0}"; - sepNavVisRange = "{5603, 556}"; + sepNavIntBoundsRect = "{{0, 0}, {1056, 5004}}"; + sepNavSelRange = "{7176, 0}"; + sepNavVisRange = "{9295, 564}"; sepNavWindowFrame = "{{129, 47}, {895, 831}}"; }; }; @@ -107,35 +107,35 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B2E7A5B25A528A700485B86 /* PBXTextBookmark */ = { + 8B1A8E4027CC9DA600649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ADTProc.cpp */; name = "ADTProc.cpp: 210"; rLen = 0; - rLoc = 7166; + rLoc = 7176; rType = 0; - vrLen = 556; - vrLoc = 5603; + vrLen = 564; + vrLoc = 9295; }; 8B79334D21F50CB2006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* ADT.cpp */; name = "ADT.cpp: 121"; rLen = 0; - rLoc = 4290; + rLoc = 4352; rType = 0; vrLen = 345; vrLoc = 4100; }; - 8BA544DF2221FB88005CB2C3 /* PBXTextBookmark */ = { + 8B9FE1D627CAD499002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ADTProc.cpp */; - name = "ADTProc.cpp: 212"; + name = "ADTProc.cpp: 210"; rLen = 0; - rLoc = 7166; + rLoc = 7176; rType = 0; - vrLen = 855; - vrLoc = 5269; + vrLen = 575; + vrLoc = 9295; }; 8D01CCC60486CAD60068D4B7 /* ADT */ = { activeExec = 0; diff --git a/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 index aeb677da8..12a9e7af3 100755 --- a/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/ADT/ADT.xcodeproj/christopherjohnson.perspectivev3 @@ -351,11 +351,11 @@ _historyCapacity 0 bookmark - 8B2E7A5B25A528A700485B86 + 8B1A8E4027CC9DA600649D11 history 8B79334D21F50CB2006E9731 - 8BA544DF2221FB88005CB2C3 + 8B9FE1D627CAD499002EC0AA SplitCount @@ -369,18 +369,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 310}} + {{0, 0}, {603, 297}} RubberWindowFrame 162 338 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 310pt + 297pt Proportion - 131pt + 144pt Tabs @@ -394,7 +394,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 104}} + {{10, 27}, {603, 117}} RubberWindowFrame 162 338 810 487 0 0 1440 878 @@ -450,7 +450,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 110}} Module PBXBuildResultsModule @@ -478,11 +478,11 @@ TableOfContents - 8B2E7A5C25A528A700485B86 + 8B1A8E4127CC9DA600649D11 1CA23ED40692098700951B8B - 8B2E7A5D25A528A700485B86 + 8B1A8E4227CC9DA600649D11 8B0237581D42B1C400E1E8C8 - 8B2E7A5E25A528A700485B86 + 8B1A8E4327CC9DA600649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -635,7 +635,7 @@ StatusbarIsVisible TimeStamp - 631580839.18515396 + 667721126.62533998 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -652,7 +652,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/Plugins/MacVST/ADT/ADT.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/ADT/ADT.xcodeproj WindowString 162 338 810 487 0 0 1440 878 diff --git a/plugins/MacVST/ADT/source/ADT.cpp b/plugins/MacVST/ADT/source/ADT.cpp index 34db6d535..ea5906c22 100755 --- a/plugins/MacVST/ADT/source/ADT.cpp +++ b/plugins/MacVST/ADT/source/ADT.cpp @@ -24,7 +24,8 @@ ADT::ADT(audioMasterCallback audioMaster) : offsetB = 9001; // :D gcount = 0; - fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; + 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. diff --git a/plugins/MacVST/ADT/source/ADTProc.cpp b/plugins/MacVST/ADT/source/ADTProc.cpp index 1d113ad8e..9ed2f4762 100755 --- a/plugins/MacVST/ADT/source/ADTProc.cpp +++ b/plugins/MacVST/ADT/source/ADTProc.cpp @@ -125,11 +125,11 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + 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); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + 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; @@ -167,8 +167,8 @@ void ADT::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sam double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-43) inputSampleL = fpd * 1.18e-43; - if (fabs(inputSampleR)<1.18e-43) inputSampleR = fpd * 1.18e-43; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fabs(offsetA - targetA) > 1000) offsetA = targetA; @@ -259,12 +259,12 @@ void ADT::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sam if (output < 1.0) {inputSampleL *= output; inputSampleR *= output;} //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //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; diff --git a/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser index 56e51e728..5acd3f4f1 100755 --- a/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569707744; - PBXWorkspaceStateSaveDate = 569707744; + PBXPerProjectTemplateStateSaveDate = 667721278; + PBXWorkspaceStateSaveDate = 667721278; }; perUserProjectItems = { + 8B1A8ED027CC9E4400649D11 /* PBXTextBookmark */ = 8B1A8ED027CC9E4400649D11 /* PBXTextBookmark */; 8B79338421F50CE8006E9731 /* PBXTextBookmark */ = 8B79338421F50CE8006E9731 /* PBXTextBookmark */; - 8B9D774E1F7FA54A007AB60F /* PBXTextBookmark */ = 8B9D774E1F7FA54A007AB60F /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -70,7 +70,7 @@ }; 245463B80991757100464AD3 /* AQuickVoiceClip.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {554, 1690}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 2340}}"; sepNavSelRange = "{3742, 0}"; sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{514, 47}, {895, 831}}"; @@ -106,7 +106,7 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B79338421F50CE8006E9731 /* PBXTextBookmark */ = { + 8B1A8ED027CC9E4400649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 245463B80991757100464AD3 /* AQuickVoiceClip.h */; name = "AQuickVoiceClip.h: 117"; @@ -116,7 +116,7 @@ vrLen = 0; vrLoc = 0; }; - 8B9D774E1F7FA54A007AB60F /* PBXTextBookmark */ = { + 8B79338421F50CE8006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 245463B80991757100464AD3 /* AQuickVoiceClip.h */; name = "AQuickVoiceClip.h: 117"; diff --git a/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 index ce9534039..eaea14492 100755 --- a/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -349,10 +351,10 @@ _historyCapacity 0 bookmark - 8B79338421F50CE8006E9731 + 8B1A8ED027CC9E4400649D11 history - 8B9D774E1F7FA54A007AB60F + 8B79338421F50CE8006E9731 SplitCount @@ -392,6 +394,8 @@ Frame {{10, 27}, {603, 414}} + RubberWindowFrame + 384 225 810 487 0 0 1440 878 Module XCDetailModule @@ -446,8 +450,6 @@ Frame {{10, 27}, {603, 414}} - RubberWindowFrame - 384 225 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -475,11 +477,11 @@ TableOfContents - 8B79338521F50CE8006E9731 + 8B1A8ED127CC9E4400649D11 1CA23ED40692098700951B8B - 8B79338621F50CE8006E9731 + 8B1A8ED227CC9E4400649D11 8B0237581D42B1C400E1E8C8 - 8B79338721F50CE8006E9731 + 8B1A8ED327CC9E4400649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -632,7 +634,7 @@ StatusbarIsVisible TimeStamp - 569707752.54956698 + 667721284.23146498 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -649,7 +651,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/AQuickVoiceClip/AQuickVoiceClip.xcodeproj WindowString 384 225 810 487 0 0 1440 878 diff --git a/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser index de2e9ea47..4c8362220 100755 --- a/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.pbxuser @@ -10,7 +10,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 364, + 823, 20, 48, 43, @@ -49,12 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569706438; - PBXWorkspaceStateSaveDate = 569706438; + PBXPerProjectTemplateStateSaveDate = 667721095; + PBXWorkspaceStateSaveDate = 667721095; }; perUserProjectItems = { - 8B7932FD21F507DF006E9731 /* XCBuildMessageTextBookmark */ = 8B7932FD21F507DF006E9731 /* XCBuildMessageTextBookmark */; - 8B79330721F50B3A006E9731 /* PBXTextBookmark */ = 8B79330721F50B3A006E9731 /* PBXTextBookmark */; + 8B1A8DE627CC9D8C00649D11 /* PBXTextBookmark */ = 8B1A8DE627CC9D8C00649D11 /* PBXTextBookmark */; + 8B9FE1F527CAD5DE002EC0AA /* PBXTextBookmark */ = 8B9FE1F527CAD5DE002EC0AA /* PBXTextBookmark */; + 8B9FE1F727CAD5DE002EC0AA /* PBXTextBookmark */ = 8B9FE1F727CAD5DE002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -62,9 +63,9 @@ }; 2407DEB6089929BA00EB68BF /* Acceleration.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {848, 1820}}"; + sepNavIntBoundsRect = "{{0, 0}, {1013, 2502}}"; sepNavSelRange = "{681, 92}"; - sepNavVisRange = "{0, 2007}"; + sepNavVisRange = "{493, 688}"; sepNavWindowFrame = "{{12, 47}, {895, 831}}"; }; }; @@ -86,9 +87,9 @@ }; 24D8286F09A914000093AEF8 /* AccelerationProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {621, 3822}}"; - sepNavSelRange = "{9506, 0}"; - sepNavVisRange = "{4212, 165}"; + sepNavIntBoundsRect = "{{0, 0}, {1013, 4014}}"; + sepNavSelRange = "{5982, 0}"; + sepNavVisRange = "{425, 401}"; sepNavWindowFrame = "{{25, 47}, {895, 831}}"; }; }; @@ -106,24 +107,35 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B7932FD21F507DF006E9731 /* XCBuildMessageTextBookmark */ = { + 8B1A8DE627CC9D8C00649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - comments = "'Float32' was not declared in this scope"; - fRef = 24D8286F09A914000093AEF8 /* AccelerationProc.cpp */; - fallbackIsa = XCBuildMessageTextBookmark; - rLen = 1; - rLoc = 135; - rType = 1; - }; - 8B79330721F50B3A006E9731 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 24D8286F09A914000093AEF8 /* AccelerationProc.cpp */; - name = "AccelerationProc.cpp: 298"; - rLen = 0; - rLoc = 9506; + fRef = 2407DEB6089929BA00EB68BF /* Acceleration.cpp */; + name = "Acceleration.cpp: 26"; + rLen = 92; + rLoc = 681; rType = 0; - vrLen = 165; - vrLoc = 4212; + vrLen = 688; + vrLoc = 493; + }; + 8B9FE1F527CAD5DE002EC0AA /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* AccelerationProc.cpp */; + name = "AccelerationProc.cpp: 224"; + rLen = 0; + rLoc = 5982; + rType = 0; + vrLen = 401; + vrLoc = 425; + }; + 8B9FE1F727CAD5DE002EC0AA /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2407DEB6089929BA00EB68BF /* Acceleration.cpp */; + name = "Acceleration.cpp: 26"; + rLen = 92; + rLoc = 681; + rType = 0; + vrLen = 748; + vrLoc = 493; }; 8D01CCC60486CAD60068D4B7 /* Acceleration */ = { activeExec = 0; diff --git a/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 index 6330e85e0..5c5e82952 100755 --- a/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Acceleration/Acceleration.xcodeproj/christopherjohnson.perspectivev3 @@ -300,13 +300,13 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 6 + 5 4 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {185, 428}} + {{0, 0}, {185, 521}} PBXTopSmartGroupGIDs @@ -316,14 +316,14 @@ GeometryConfiguration Frame - {{0, 0}, {202, 446}} + {{0, 0}, {202, 539}} GroupTreeTableConfiguration MainColumn 185 RubberWindowFrame - 7 375 810 487 0 0 1440 878 + 7 282 1269 580 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -339,7 +339,7 @@ PBXProjectModuleGUID 8B0237581D42B1C400E1E8C8 PBXProjectModuleLabel - AccelerationProc.cpp + Acceleration.cpp PBXSplitModuleInNavigatorKey Split0 @@ -347,14 +347,15 @@ PBXProjectModuleGUID 8B0237591D42B1C400E1E8C8 PBXProjectModuleLabel - AccelerationProc.cpp + Acceleration.cpp _historyCapacity 0 bookmark - 8B79330721F50B3A006E9731 + 8B1A8DE627CC9D8C00649D11 history - 8B7932FD21F507DF006E9731 + 8B9FE1F527CAD5DE002EC0AA + 8B9FE1F727CAD5DE002EC0AA SplitCount @@ -368,18 +369,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 86}} + {{0, 0}, {1062, 371}} RubberWindowFrame - 7 375 810 487 0 0 1440 878 + 7 282 1269 580 0 0 1440 878 Module PBXNavigatorGroup Proportion - 86pt + 371pt Proportion - 355pt + 163pt Tabs @@ -393,7 +394,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 328}} + {{10, 27}, {1062, 136}} + RubberWindowFrame + 7 282 1269 580 0 0 1440 878 Module XCDetailModule @@ -448,8 +451,6 @@ Frame {{10, 27}, {603, 328}} - RubberWindowFrame - 7 375 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -458,7 +459,7 @@ Proportion - 603pt + 1062pt Name @@ -477,11 +478,11 @@ TableOfContents - 8B7932EA21F507C8006E9731 + 8B1A8DE727CC9D8C00649D11 1CA23ED40692098700951B8B - 8B7932EB21F507C8006E9731 + 8B1A8DE827CC9D8C00649D11 8B0237581D42B1C400E1E8C8 - 8B7932EC21F507C8006E9731 + 8B1A8DE927CC9D8C00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +635,7 @@ StatusbarIsVisible TimeStamp - 569707322.35574102 + 667721100.98200905 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -651,11 +652,10 @@ 5 WindowOrderList - 8B79330821F50B3A006E9731 - /Users/christopherjohnson/Desktop/MacVST/Acceleration/Acceleration.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/Acceleration/Acceleration.xcodeproj WindowString - 7 375 810 487 0 0 1440 878 + 7 282 1269 580 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser index b5f0f5fad..f5461a4dc 100755 --- a/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 630330371; - PBXWorkspaceStateSaveDate = 630330371; + PBXPerProjectTemplateStateSaveDate = 667721106; + PBXWorkspaceStateSaveDate = 667721106; }; perUserProjectItems = { - 8BE1ABC82597E7EC00E5CF6A /* XCBuildMessageTextBookmark */ = 8BE1ABC82597E7EC00E5CF6A /* XCBuildMessageTextBookmark */; - 8BE1ABC92597E7EC00E5CF6A /* PBXTextBookmark */ = 8BE1ABC92597E7EC00E5CF6A /* PBXTextBookmark */; + 8B1A8E0427CC9D9600649D11 /* PBXTextBookmark */ = 8B1A8E0427CC9D9600649D11 /* PBXTextBookmark */; + 8B9FE16627CAD380002EC0AA /* PBXTextBookmark */ = 8B9FE16627CAD380002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -78,9 +78,9 @@ }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1074, 27360}}"; + sepNavIntBoundsRect = "{{0, 0}, {1074, 27504}}"; sepNavSelRange = "{10616, 0}"; - sepNavVisRange = "{10459, 280}"; + sepNavVisRange = "{10579, 114}"; sepNavWindowFrame = "{{15, 42}, {895, 831}}"; }; }; @@ -106,24 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8BE1ABC82597E7EC00E5CF6A /* XCBuildMessageTextBookmark */ = { - isa = PBXTextBookmark; - comments = "Deprecated conversion from string constant to 'char*'"; - fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */; - fallbackIsa = XCBuildMessageTextBookmark; - rLen = 1; - rLoc = 306; - rType = 1; - }; - 8BE1ABC92597E7EC00E5CF6A /* PBXTextBookmark */ = { + 8B1A8E0427CC9D9600649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */; name = "audioeffectx.cpp: 307"; rLen = 0; rLoc = 10616; rType = 0; - vrLen = 277; - vrLoc = 10459; + vrLen = 114; + vrLoc = 10579; + }; + 8B9FE16627CAD380002EC0AA /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */; + name = "audioeffectx.cpp: 307"; + rLen = 0; + rLoc = 10616; + rType = 0; + vrLen = 114; + vrLoc = 10579; }; 8D01CCC60486CAD60068D4B7 /* Acceleration2 */ = { activeExec = 0; diff --git a/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 index 7a319186b..14e07feec 100755 --- a/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -349,10 +351,10 @@ _historyCapacity 0 bookmark - 8BE1ABC92597E7EC00E5CF6A + 8B1A8E0427CC9D9600649D11 history - 8BE1ABC82597E7EC00E5CF6A + 8B9FE16627CAD380002EC0AA SplitCount @@ -366,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 102}} RubberWindowFrame 34 365 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 102pt Proportion - 309pt + 339pt Tabs @@ -391,7 +393,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 312}} + RubberWindowFrame + 34 365 810 487 0 0 1440 878 Module XCDetailModule @@ -446,8 +450,6 @@ Frame {{10, 27}, {603, 282}} - RubberWindowFrame - 34 365 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -475,11 +477,11 @@ TableOfContents - 8BE1ABCA2597E7EC00E5CF6A + 8B1A8E0527CC9D9600649D11 1CA23ED40692098700951B8B - 8BE1ABCB2597E7EC00E5CF6A + 8B1A8E0627CC9D9600649D11 8B0237581D42B1C400E1E8C8 - 8BE1ABCC2597E7EC00E5CF6A + 8B1A8E0727CC9D9600649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -632,7 +634,7 @@ StatusbarIsVisible TimeStamp - 630712300.994259 + 667721110.36415899 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -649,7 +651,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/Acceleration2/Acceleration2.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/Acceleration2/Acceleration2.xcodeproj WindowString 34 365 810 487 0 0 1440 878 diff --git a/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.pbxuser index 0ebab5877..e553273dc 100755 --- a/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 647480157; - PBXWorkspaceStateSaveDate = 647480157; + PBXPerProjectTemplateStateSaveDate = 667721131; + PBXWorkspaceStateSaveDate = 667721131; }; perUserProjectItems = { - 8B5C61AF2697C4280038F773 /* PBXTextBookmark */ = 8B5C61AF2697C4280038F773 /* PBXTextBookmark */; - 8B5C61B02697C4280038F773 /* PBXTextBookmark */ = 8B5C61B02697C4280038F773 /* PBXTextBookmark */; + 8B1A8E5E27CC9DB000649D11 /* PBXTextBookmark */ = 8B1A8E5E27CC9DB000649D11 /* PBXTextBookmark */; + 8B9FE23427CAD647002EC0AA /* PBXTextBookmark */ = 8B9FE23427CAD647002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -86,9 +86,9 @@ }; 24D8286F09A914000093AEF8 /* AirProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {885, 9036}}"; + sepNavIntBoundsRect = "{{0, 0}, {705, 8658}}"; sepNavSelRange = "{9841, 0}"; - sepNavVisRange = "{3057, 149}"; + sepNavVisRange = "{3110, 107}"; sepNavWindowFrame = "{{545, 42}, {895, 831}}"; }; }; @@ -106,25 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B5C61AF2697C4280038F773 /* PBXTextBookmark */ = { + 8B1A8E5E27CC9DB000649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* AirProc.cpp */; - name = "AirProc.cpp: 317"; + name = "AirProc.cpp: 357"; rLen = 0; rLoc = 9841; rType = 0; - vrLen = 149; - vrLoc = 3057; + vrLen = 107; + vrLoc = 3110; }; - 8B5C61B02697C4280038F773 /* PBXTextBookmark */ = { + 8B9FE23427CAD647002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* AirProc.cpp */; - name = "AirProc.cpp: 317"; + name = "AirProc.cpp: 357"; rLen = 0; rLoc = 9841; rType = 0; - vrLen = 149; - vrLoc = 3057; + vrLen = 115; + vrLoc = 3102; }; 8D01CCC60486CAD60068D4B7 /* Air */ = { activeExec = 0; diff --git a/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.perspectivev3 index a6a9ea6a9..b46ba7d3d 100755 --- a/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Air/Air.xcodeproj/christopherjohnson.perspectivev3 @@ -351,10 +351,10 @@ _historyCapacity 0 bookmark - 8B5C61B02697C4280038F773 + 8B1A8E5E27CC9DB000649D11 history - 8B5C61AF2697C4280038F773 + 8B9FE23427CAD647002EC0AA SplitCount @@ -368,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 102}} RubberWindowFrame 605 231 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 102pt Proportion - 309pt + 339pt Tabs @@ -393,7 +393,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 312}} RubberWindowFrame 605 231 810 487 0 0 1440 878 @@ -477,11 +477,11 @@ TableOfContents - 8B5C61B12697C4280038F773 + 8B1A8E5F27CC9DB000649D11 1CA23ED40692098700951B8B - 8B5C61B22697C4280038F773 + 8B1A8E6027CC9DB000649D11 8B0237581D42B1C400E1E8C8 - 8B5C61B32697C4280038F773 + 8B1A8E6127CC9DB000649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +634,7 @@ StatusbarIsVisible TimeStamp - 647480360.23042202 + 667721136.40750694 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode diff --git a/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.pbxuser index 3ee4d6a3a..2f4b3fbb4 100644 --- a/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.pbxuser @@ -49,14 +49,14 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 647806304; - PBXWorkspaceStateSaveDate = 647806304; + PBXPerProjectTemplateStateSaveDate = 667721140; + PBXWorkspaceStateSaveDate = 667721140; }; perUserProjectItems = { + 8B1A8E7C27CC9DB800649D11 /* PBXTextBookmark */ = 8B1A8E7C27CC9DB800649D11 /* PBXTextBookmark */; 8B5C63A1269922860038F773 /* PBXTextBookmark */ = 8B5C63A1269922860038F773 /* PBXTextBookmark */; 8B6BEDA5269CBD7D00F3C78E /* PBXTextBookmark */ = 8B6BEDA5269CBD7D00F3C78E /* PBXTextBookmark */; - 8B6BEDA6269CBD7D00F3C78E /* PBXBookmark */ = 8B6BEDA6269CBD7D00F3C78E /* PBXBookmark */; - 8B6BEDC1269CBDD800F3C78E /* PBXTextBookmark */ = 8B6BEDC1269CBDD800F3C78E /* PBXTextBookmark */; + 8B9FE29727CBF4E6002EC0AA /* PBXTextBookmark */ = 8B9FE29727CBF4E6002EC0AA /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -72,9 +72,9 @@ }; 245463B80991757100464AD3 /* Air2.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1101, 2070}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 2322}}"; sepNavSelRange = "{2461, 56}"; - sepNavVisRange = "{2459, 59}"; + sepNavVisRange = "{2461, 56}"; sepNavWindowFrame = "{{20, 47}, {895, 831}}"; }; }; @@ -88,10 +88,10 @@ }; 24D8286F09A914000093AEF8 /* Air2Proc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {848, 10692}}"; - sepNavSelRange = "{7578, 2719}"; - sepNavVisRange = "{9978, 1300}"; - sepNavWindowFrame = "{{44, 47}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {849, 10440}}"; + sepNavSelRange = "{10439, 0}"; + sepNavVisRange = "{20703, 1043}"; + sepNavWindowFrame = "{{44, 4}, {895, 694}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -108,6 +108,16 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B1A8E7C27CC9DB800649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 245463B80991757100464AD3 /* Air2.h */; + name = "Air2.h: 63"; + rLen = 56; + rLoc = 2461; + rType = 0; + vrLen = 56; + vrLoc = 2461; + }; 8B5C63A1269922860038F773 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* Air2.cpp */; @@ -128,19 +138,15 @@ vrLen = 138; vrLoc = 62; }; - 8B6BEDA6269CBD7D00F3C78E /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 245463B80991757100464AD3 /* Air2.h */; - }; - 8B6BEDC1269CBDD800F3C78E /* PBXTextBookmark */ = { + 8B9FE29727CBF4E6002EC0AA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 245463B80991757100464AD3 /* Air2.h */; name = "Air2.h: 63"; rLen = 56; rLoc = 2461; rType = 0; - vrLen = 59; - vrLoc = 2459; + vrLen = 56; + vrLoc = 2461; }; 8D01CCC60486CAD60068D4B7 /* Air2 */ = { activeExec = 0; diff --git a/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 index 6f714ffe3..5157f840d 100644 --- a/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Air2/Air2.xcodeproj/christopherjohnson.perspectivev3 @@ -323,7 +323,7 @@ 185 RubberWindowFrame - 75 221 810 487 0 0 1440 878 + 613 391 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -351,12 +351,12 @@ _historyCapacity 0 bookmark - 8B6BEDC1269CBDD800F3C78E + 8B1A8E7C27CC9DB800649D11 history 8B5C63A1269922860038F773 8B6BEDA5269CBD7D00F3C78E - 8B6BEDA6269CBD7D00F3C78E + 8B9FE29727CBF4E6002EC0AA SplitCount @@ -370,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 117}} + {{0, 0}, {603, 69}} RubberWindowFrame - 75 221 810 487 0 0 1440 878 + 613 391 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 117pt + 69pt Proportion - 324pt + 372pt Tabs @@ -395,9 +395,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 297}} + {{10, 27}, {603, 345}} RubberWindowFrame - 75 221 810 487 0 0 1440 878 + 613 391 810 487 0 0 1440 878 Module XCDetailModule @@ -479,11 +479,11 @@ TableOfContents - 8B6BEDA8269CBD7D00F3C78E + 8B1A8E7D27CC9DB800649D11 1CA23ED40692098700951B8B - 8B6BEDA9269CBD7D00F3C78E + 8B1A8E7E27CC9DB800649D11 8B0237581D42B1C400E1E8C8 - 8B6BEDAA269CBD7D00F3C78E + 8B1A8E7F27CC9DB800649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -636,7 +636,7 @@ StatusbarIsVisible TimeStamp - 647806424.85955703 + 667721144.70527399 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -653,11 +653,10 @@ 5 WindowOrderList - 8B6BEDC2269CBDD800F3C78E /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/Air2/Air2.xcodeproj WindowString - 75 221 810 487 0 0 1440 878 + 613 391 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser index f1adbdd04..98a4d4788 100755 --- a/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 604006512; - PBXWorkspaceStateSaveDate = 604006512; + PBXPerProjectTemplateStateSaveDate = 667721149; + PBXWorkspaceStateSaveDate = 667721149; }; perUserProjectItems = { - 8B88B64B240068790032C1CD /* PBXTextBookmark */ = 8B88B64B240068790032C1CD /* PBXTextBookmark */; - 8B88B64C240068790032C1CD /* PBXTextBookmark */ = 8B88B64C240068790032C1CD /* PBXTextBookmark */; + 8B1A8EB327CC9E2900649D11 /* PBXTextBookmark */ = 8B1A8EB327CC9E2900649D11 /* PBXTextBookmark */; + 8B1A8EBD27CC9E3900649D11 /* PBXTextBookmark */ = 8B1A8EBD27CC9E3900649D11 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -62,17 +62,17 @@ }; 2407DEB6089929BA00EB68BF /* Apicolypse.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {848, 1898}}"; - sepNavSelRange = "{4891, 0}"; - sepNavVisRange = "{0, 2023}"; + sepNavIntBoundsRect = "{{0, 0}, {948, 2682}}"; + sepNavSelRange = "{721, 0}"; + sepNavVisRange = "{337, 1644}"; sepNavWindowFrame = "{{12, 57}, {895, 821}}"; }; }; 245463B80991757100464AD3 /* Apicolypse.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {866, 949}}"; - sepNavSelRange = "{2596, 0}"; - sepNavVisRange = "{373, 2228}"; + sepNavIntBoundsRect = "{{0, 0}, {1110, 1332}}"; + sepNavSelRange = "{2542, 0}"; + sepNavVisRange = "{687, 1939}"; sepNavWindowFrame = "{{20, 57}, {895, 821}}"; }; }; @@ -86,9 +86,9 @@ }; 24D8286F09A914000093AEF8 /* ApicolypseProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {754, 5083}}"; - sepNavSelRange = "{21209, 0}"; - sepNavVisRange = "{21052, 393}"; + sepNavIntBoundsRect = "{{0, 0}, {912, 6570}}"; + sepNavSelRange = "{21215, 0}"; + sepNavVisRange = "{19428, 203}"; sepNavWindowFrame = "{{318, 57}, {895, 821}}"; }; }; @@ -106,25 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B88B64B240068790032C1CD /* PBXTextBookmark */ = { + 8B1A8EB327CC9E2900649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ApicolypseProc.cpp */; name = "ApicolypseProc.cpp: 343"; rLen = 0; - rLoc = 21209; + rLoc = 21215; rType = 0; - vrLen = 393; - vrLoc = 21052; + vrLen = 203; + vrLoc = 19424; }; - 8B88B64C240068790032C1CD /* PBXTextBookmark */ = { + 8B1A8EBD27CC9E3900649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* ApicolypseProc.cpp */; name = "ApicolypseProc.cpp: 343"; rLen = 0; - rLoc = 21209; + rLoc = 21215; rType = 0; - vrLen = 393; - vrLoc = 21052; + vrLen = 203; + vrLoc = 19428; }; 8D01CCC60486CAD60068D4B7 /* Apicolypse */ = { activeExec = 0; diff --git a/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 index 7565d1099..f29fa51fc 100755 --- a/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -300,7 +298,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 5 + 7 4 0 @@ -351,10 +349,10 @@ _historyCapacity 0 bookmark - 8B88B64C240068790032C1CD + 8B1A8EBD27CC9E3900649D11 history - 8B88B64B240068790032C1CD + 8B1A8EB327CC9E2900649D11 SplitCount @@ -368,18 +366,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 132}} + {{0, 0}, {603, 117}} RubberWindowFrame 42 355 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 132pt + 117pt Proportion - 309pt + 324pt Tabs @@ -393,9 +391,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} - RubberWindowFrame - 42 355 810 487 0 0 1440 878 + {{10, 27}, {603, 297}} Module XCDetailModule @@ -449,7 +445,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 297}} + RubberWindowFrame + 42 355 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -477,11 +475,11 @@ TableOfContents - 8B88B64D240068790032C1CD + 8B1A8EB527CC9E2900649D11 1CA23ED40692098700951B8B - 8B88B64E240068790032C1CD + 8B1A8EB627CC9E2900649D11 8B0237581D42B1C400E1E8C8 - 8B88B64F240068790032C1CD + 8B1A8EB727CC9E2900649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +632,7 @@ StatusbarIsVisible TimeStamp - 604006521.27609801 + 667721273.01473904 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -651,8 +649,7 @@ 5 WindowOrderList - 8B88B650240068790032C1CD - /Users/christopherjohnson/Desktop/Plugins/MacVST/Apicolypse/Apicolypse.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/Apicolypse/Apicolypse.xcodeproj WindowString 42 355 810 487 0 0 1440 878 diff --git a/plugins/MacVST/Apicolypse/source/Apicolypse.cpp b/plugins/MacVST/Apicolypse/source/Apicolypse.cpp index 8c9d15ec5..f86eaa223 100755 --- a/plugins/MacVST/Apicolypse/source/Apicolypse.cpp +++ b/plugins/MacVST/Apicolypse/source/Apicolypse.cpp @@ -19,7 +19,8 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; + 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. diff --git a/plugins/MacVST/Apicolypse/source/Apicolypse.h b/plugins/MacVST/Apicolypse/source/Apicolypse.h index 66c3f4640..030e910fc 100755 --- a/plugins/MacVST/Apicolypse/source/Apicolypse.h +++ b/plugins/MacVST/Apicolypse/source/Apicolypse.h @@ -59,7 +59,8 @@ private: double lastSampleR; double bL[35]; double lastSampleL; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp b/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp index c0b954717..564b8c5b1 100755 --- a/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp +++ b/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp @@ -155,11 +155,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpdL)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpdR)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -215,8 +215,8 @@ void Apicolypse::processDoubleReplacing(double **inputs, double **outputs, VstIn { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-43) inputSampleL = fpd * 1.18e-43; - if (fabs(inputSampleR)<1.18e-43) inputSampleR = fpd * 1.18e-43; + if (fabs(inputSampleL)<1.18e-43) inputSampleL = fpdL * 1.18e-43; + if (fabs(inputSampleR)<1.18e-43) inputSampleR = fpdR * 1.18e-43; inputSampleL *= indrive; inputSampleR *= indrive; @@ -331,22 +331,22 @@ void Apicolypse::processDoubleReplacing(double **inputs, double **outputs, VstIn } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpdL)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpdR)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser index 564074273..2c25cbd9d 100755 --- a/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569718087; - PBXWorkspaceStateSaveDate = 569718087; + PBXPerProjectTemplateStateSaveDate = 667721288; + PBXWorkspaceStateSaveDate = 667721288; }; perUserProjectItems = { - 8B7933A421F53550006E9731 /* PBXTextBookmark */ = 8B7933A421F53550006E9731 /* PBXTextBookmark */; + 8B1A8EEE27CC9E4A00649D11 /* PBXTextBookmark */ = 8B1A8EEE27CC9E4A00649D11 /* PBXTextBookmark */; + 8B1A8EFD27CC9EA300649D11 /* PBXTextBookmark */ = 8B1A8EFD27CC9EA300649D11 /* PBXTextBookmark */; 8BC5CF342093F49F0058B257 /* PBXTextBookmark */ = 8BC5CF342093F49F0058B257 /* PBXTextBookmark */; - 8BC5CF6A2093F4CF0058B257 /* PBXTextBookmark */ = 8BC5CF6A2093F4CF0058B257 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -71,10 +71,10 @@ }; 245463B80991757100464AD3 /* AtmosphereBuss.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {866, 1209}}"; - sepNavSelRange = "{3568, 0}"; - sepNavVisRange = "{0, 2443}"; - sepNavWindowFrame = "{{275, 41}, {895, 831}}"; + sepNavIntBoundsRect = "{{0, 0}, {1110, 1782}}"; + sepNavSelRange = "{2520, 0}"; + sepNavVisRange = "{2085, 1004}"; + sepNavWindowFrame = "{{540, -28}, {895, 831}}"; }; }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { @@ -87,9 +87,9 @@ }; 24D8286F09A914000093AEF8 /* AtmosphereBussProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {554, 6929}}"; + sepNavIntBoundsRect = "{{0, 0}, {678, 8460}}"; sepNavSelRange = "{13569, 0}"; - sepNavVisRange = "{1538, 131}"; + sepNavVisRange = "{1569, 137}"; sepNavWindowFrame = "{{15, 47}, {895, 831}}"; }; }; @@ -107,15 +107,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B7933A421F53550006E9731 /* PBXTextBookmark */ = { + 8B1A8EEE27CC9E4A00649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* AtmosphereBussProc.cpp */; - name = "AtmosphereBussProc.cpp: 378"; + name = "AtmosphereBussProc.cpp: 369"; rLen = 0; rLoc = 13569; rType = 0; - vrLen = 131; - vrLoc = 1538; + vrLen = 137; + vrLoc = 1569; + }; + 8B1A8EFD27CC9EA300649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* AtmosphereBussProc.cpp */; + name = "AtmosphereBussProc.cpp: 369"; + rLen = 0; + rLoc = 13569; + rType = 0; + vrLen = 137; + vrLoc = 1569; }; 8BC5CF342093F49F0058B257 /* PBXTextBookmark */ = { isa = PBXTextBookmark; @@ -127,16 +137,6 @@ vrLen = 421; vrLoc = 2085; }; - 8BC5CF6A2093F4CF0058B257 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 24D8286F09A914000093AEF8 /* AtmosphereBussProc.cpp */; - name = "AtmosphereBussProc.cpp: 379"; - rLen = 0; - rLoc = 13569; - rType = 0; - vrLen = 154; - vrLoc = 1515; - }; 8D01CCC60486CAD60068D4B7 /* AtmosphereBuss */ = { activeExec = 0; }; diff --git a/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 index 16bcc2b86..aa68ba2cb 100755 --- a/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj/christopherjohnson.perspectivev3 @@ -256,6 +256,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -349,11 +351,11 @@ _historyCapacity 0 bookmark - 8B7933A421F53550006E9731 + 8B1A8EFD27CC9EA300649D11 history 8BC5CF342093F49F0058B257 - 8BC5CF6A2093F4CF0058B257 + 8B1A8EEE27CC9E4A00649D11 SplitCount @@ -367,23 +369,21 @@ GeometryConfiguration Frame - {{0, 0}, {603, 102}} + {{0, 0}, {603, 86}} RubberWindowFrame 11 221 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 102pt + 86pt Proportion - 339pt + 355pt Tabs - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -394,9 +394,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 312}} - RubberWindowFrame - 11 221 810 487 0 0 1440 878 + {{10, 27}, {603, 328}} Module XCDetailModule @@ -450,7 +448,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 282}} + {{10, 27}, {603, 328}} + RubberWindowFrame + 11 221 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -478,11 +478,11 @@ TableOfContents - 8B7933A521F53550006E9731 + 8B1A8EFE27CC9EA300649D11 1CA23ED40692098700951B8B - 8B7933A621F53550006E9731 + 8B1A8EFF27CC9EA300649D11 8B0237581D42B1C400E1E8C8 - 8B7933A721F53550006E9731 + 8B1A8F0027CC9EA300649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -635,7 +635,7 @@ StatusbarIsVisible TimeStamp - 569718096.20929098 + 667721379.40893102 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -652,7 +652,8 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj + 8B1A8F0127CC9EA300649D11 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/AtmosphereBuss/AtmosphereBuss.xcodeproj WindowString 11 221 810 487 0 0 1440 878 diff --git a/plugins/MacVST/AtmosphereBuss/source/AtmosphereBuss.h b/plugins/MacVST/AtmosphereBuss/source/AtmosphereBuss.h index ebaf0919c..375f70022 100755 --- a/plugins/MacVST/AtmosphereBuss/source/AtmosphereBuss.h +++ b/plugins/MacVST/AtmosphereBuss/source/AtmosphereBuss.h @@ -56,6 +56,8 @@ private: double settingchase; double chasespeed; + uint32_t fpdL; + uint32_t fpdR; double fpNShapeL; double lastSampleAL; double lastSampleBL; diff --git a/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser index 2f7369053..67dc177ee 100755 --- a/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,13 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569718117; - PBXWorkspaceStateSaveDate = 569718117; + PBXPerProjectTemplateStateSaveDate = 667721384; + PBXWorkspaceStateSaveDate = 667721384; }; perUserProjectItems = { - 8B7933C421F5356E006E9731 /* PBXTextBookmark */ = 8B7933C421F5356E006E9731 /* PBXTextBookmark */; + 8B1A8F1227CC9EAA00649D11 /* PBXTextBookmark */ = 8B1A8F1227CC9EAA00649D11 /* PBXTextBookmark */; + 8B1A8F1627CC9EC300649D11 /* PBXTextBookmark */ = 8B1A8F1627CC9EC300649D11 /* PBXTextBookmark */; 8B904B70209D2FF5008CBAD8 /* PBXTextBookmark */ = 8B904B70209D2FF5008CBAD8 /* PBXTextBookmark */; - 8B904BB3209D3409008CBAD8 /* PBXTextBookmark */ = 8B904BB3209D3409008CBAD8 /* PBXTextBookmark */; 8BFBE952209D206700E1438C /* PBXTextBookmark */ = 8BFBE952209D206700E1438C /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; @@ -72,9 +72,9 @@ }; 245463B80991757100464AD3 /* AtmosphereChannel.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {817, 1378}}"; - sepNavSelRange = "{2886, 0}"; - sepNavVisRange = "{2348, 116}"; + sepNavIntBoundsRect = "{{0, 0}, {1110, 1782}}"; + sepNavSelRange = "{2541, 0}"; + sepNavVisRange = "{2197, 935}"; sepNavWindowFrame = "{{20, 47}, {895, 831}}"; }; }; @@ -88,9 +88,9 @@ }; 24D8286F09A914000093AEF8 /* AtmosphereChannelProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {747, 6825}}"; + sepNavIntBoundsRect = "{{0, 0}, {554, 8136}}"; sepNavSelRange = "{9679, 0}"; - sepNavVisRange = "{9613, 109}"; + sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{545, 45}, {895, 831}}"; }; }; @@ -108,36 +108,36 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B7933C421F5356E006E9731 /* PBXTextBookmark */ = { + 8B1A8F1227CC9EAA00649D11 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* AtmosphereChannelProc.cpp */; - name = "AtmosphereChannelProc.cpp: 266"; + name = "AtmosphereChannelProc.cpp: 268"; rLen = 0; rLoc = 9679; rType = 0; - vrLen = 109; - vrLoc = 9613; + vrLen = 0; + vrLoc = 0; + }; + 8B1A8F1627CC9EC300649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* AtmosphereChannelProc.cpp */; + name = "AtmosphereChannelProc.cpp: 268"; + rLen = 0; + rLoc = 9679; + rType = 0; + vrLen = 0; + vrLoc = 0; }; 8B904B70209D2FF5008CBAD8 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 245463B80991757100464AD3 /* AtmosphereChannel.h */; name = "AtmosphereChannel.h: 73"; rLen = 0; - rLoc = 2886; + rLoc = 2918; rType = 0; vrLen = 116; vrLoc = 2348; }; - 8B904BB3209D3409008CBAD8 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 24D8286F09A914000093AEF8 /* AtmosphereChannelProc.cpp */; - name = "AtmosphereChannelProc.cpp: 262"; - rLen = 0; - rLoc = 9679; - rType = 0; - vrLen = 52; - vrLoc = 9647; - }; 8BFBE952209D206700E1438C /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2407DEB6089929BA00EB68BF /* AtmosphereChannel.cpp */; diff --git a/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 index 75a73d98c..14cd26699 100755 --- a/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj/christopherjohnson.perspectivev3 @@ -300,7 +300,7 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 6 + 7 4 0 @@ -351,12 +351,12 @@ _historyCapacity 0 bookmark - 8B7933C421F5356E006E9731 + 8B1A8F1627CC9EC300649D11 history 8BFBE952209D206700E1438C 8B904B70209D2FF5008CBAD8 - 8B904BB3209D3409008CBAD8 + 8B1A8F1227CC9EAA00649D11 SplitCount @@ -370,18 +370,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 51}} + {{0, 0}, {603, 32}} RubberWindowFrame 630 297 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 51pt + 32pt Proportion - 390pt + 409pt Tabs @@ -395,9 +395,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 363}} - RubberWindowFrame - 630 297 810 487 0 0 1440 878 + {{10, 27}, {603, 382}} Module XCDetailModule @@ -451,7 +449,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 297}} + {{10, 27}, {603, 382}} + RubberWindowFrame + 630 297 810 487 0 0 1440 878 Module PBXBuildResultsModule @@ -479,11 +479,11 @@ TableOfContents - 8B7933C521F5356E006E9731 + 8B1A8F1727CC9EC300649D11 1CA23ED40692098700951B8B - 8B7933C621F5356E006E9731 + 8B1A8F1827CC9EC300649D11 8B0237581D42B1C400E1E8C8 - 8B7933C721F5356E006E9731 + 8B1A8F1927CC9EC300649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -636,7 +636,7 @@ StatusbarIsVisible TimeStamp - 569718126.81761706 + 667721411.52165794 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -653,7 +653,8 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj + 8B1A8F1A27CC9EC300649D11 + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/AtmosphereChannel/AtmosphereChannel.xcodeproj WindowString 630 297 810 487 0 0 1440 878 diff --git a/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannel.h b/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannel.h index 4ed29b1c1..7bc3ff2fd 100755 --- a/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannel.h +++ b/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannel.h @@ -56,6 +56,8 @@ private: double settingchase; double chasespeed; + uint32_t fpdL; + uint32_t fpdR; double fpNShapeL; double lastSampleAL; double lastSampleBL; diff --git a/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.pbxuser index ae8beb8d1..f78a2163a 100755 --- a/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 569718158; - PBXWorkspaceStateSaveDate = 569718158; + PBXPerProjectTemplateStateSaveDate = 667721416; + PBXWorkspaceStateSaveDate = 667721416; }; perUserProjectItems = { + 8B1A8F3727CC9ECF00649D11 /* PBXTextBookmark */ = 8B1A8F3727CC9ECF00649D11 /* PBXTextBookmark */; 8B7933E421F53595006E9731 /* PBXTextBookmark */ = 8B7933E421F53595006E9731 /* PBXTextBookmark */; - 8BC5CEBA208D734A0058B257 /* PBXTextBookmark */ = 8BC5CEBA208D734A0058B257 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -86,9 +86,9 @@ }; 24D8286F09A914000093AEF8 /* AuraProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {621, 5967}}"; - sepNavSelRange = "{17733, 0}"; - sepNavVisRange = "{17681, 52}"; + sepNavIntBoundsRect = "{{0, 0}, {849, 6804}}"; + sepNavSelRange = "{14209, 0}"; + sepNavVisRange = "{14180, 29}"; sepNavWindowFrame = "{{7, 47}, {877, 831}}"; }; }; @@ -106,25 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8B1A8F3727CC9ECF00649D11 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 24D8286F09A914000093AEF8 /* AuraProc.cpp */; + name = "AuraProc.cpp: 376"; + rLen = 0; + rLoc = 14209; + rType = 0; + vrLen = 29; + vrLoc = 14180; + }; 8B7933E421F53595006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* AuraProc.cpp */; name = "AuraProc.cpp: 450"; rLen = 0; - rLoc = 17733; + rLoc = 14209; rType = 0; - vrLen = 52; - vrLoc = 17681; - }; - 8BC5CEBA208D734A0058B257 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 24D8286F09A914000093AEF8 /* AuraProc.cpp */; - name = "AuraProc.cpp: 475"; - rLen = 0; - rLoc = 17733; - rType = 0; - vrLen = 13; - vrLoc = 17720; + vrLen = 0; + vrLoc = 14209; }; 8D01CCC60486CAD60068D4B7 /* Aura */ = { activeExec = 0; diff --git a/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 index 7f62a6db4..ad0fbde70 100755 --- a/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Aura/Aura.xcodeproj/christopherjohnson.perspectivev3 @@ -351,10 +351,10 @@ _historyCapacity 0 bookmark - 8B7933E421F53595006E9731 + 8B1A8F3727CC9ECF00649D11 history - 8BC5CEBA208D734A0058B257 + 8B7933E421F53595006E9731 SplitCount @@ -368,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 117}} + {{0, 0}, {603, 102}} RubberWindowFrame 36 294 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 117pt + 102pt Proportion - 324pt + 339pt Tabs @@ -393,7 +393,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 297}} + {{10, 27}, {603, 312}} RubberWindowFrame 36 294 810 487 0 0 1440 878 @@ -477,11 +477,11 @@ TableOfContents - 8B7933E521F53595006E9731 + 8B1A8F3827CC9ECF00649D11 1CA23ED40692098700951B8B - 8B7933E621F53595006E9731 + 8B1A8F3927CC9ECF00649D11 8B0237581D42B1C400E1E8C8 - 8B7933E721F53595006E9731 + 8B1A8F3A27CC9ECF00649D11 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -634,7 +634,7 @@ StatusbarIsVisible TimeStamp - 569718165.96792996 + 667721423.96999204 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -651,7 +651,7 @@ 5 WindowOrderList - /Users/christopherjohnson/Desktop/MacVST/Aura/Aura.xcodeproj + /Users/christopherjohnson/Desktop/airwindows/plugins/MacVST/Aura/Aura.xcodeproj WindowString 36 294 810 487 0 0 1440 878 diff --git a/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp b/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp index 3887a51d7..0d50b6348 100755 --- a/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp +++ b/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp @@ -172,12 +172,12 @@ void AverMatrix::processDoubleReplacing(double **inputs, double **outputs, VstIn //wet can be negative, in which case dry is always full volume and they cancel //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BassAmp/source/BassAmpProc.cpp b/plugins/MacVST/BassAmp/source/BassAmpProc.cpp index 025fa038a..22a12feaa 100755 --- a/plugins/MacVST/BassAmp/source/BassAmpProc.cpp +++ b/plugins/MacVST/BassAmp/source/BassAmpProc.cpp @@ -195,7 +195,7 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -362,11 +362,11 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + LinputSample += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); frexpf((float)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + RinputSample += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); //end 32 bit stereo floating point dither *out1 = LinputSample; @@ -567,7 +567,7 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -733,12 +733,12 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //apply stored up tiny corrections //begin 64 bit stereo floating point dither - int expon; frexp((double)LinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)RinputSample, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //int expon; frexp((double)LinputSample, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //LinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)RinputSample, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //RinputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); //end 64 bit stereo floating point dither *out1 = LinputSample; diff --git a/plugins/MacVST/BassDrive/source/BassDriveProc.cpp b/plugins/MacVST/BassDrive/source/BassDriveProc.cpp index 8575a9e62..d289cdb77 100755 --- a/plugins/MacVST/BassDrive/source/BassDriveProc.cpp +++ b/plugins/MacVST/BassDrive/source/BassDriveProc.cpp @@ -637,12 +637,12 @@ void BassDrive::processDoubleReplacing(double **inputs, double **outputs, VstInt flip = !flip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BassKit/source/BassKitProc.cpp b/plugins/MacVST/BassKit/source/BassKitProc.cpp index 620b4449d..b4621d946 100755 --- a/plugins/MacVST/BassKit/source/BassKitProc.cpp +++ b/plugins/MacVST/BassKit/source/BassKitProc.cpp @@ -57,7 +57,7 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -239,7 +239,7 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacVST/Baxandall/source/BaxandallProc.cpp b/plugins/MacVST/Baxandall/source/BaxandallProc.cpp index 772a7cadc..4590b6f3f 100755 --- a/plugins/MacVST/Baxandall/source/BaxandallProc.cpp +++ b/plugins/MacVST/Baxandall/source/BaxandallProc.cpp @@ -263,12 +263,12 @@ void Baxandall::processDoubleReplacing(double **inputs, double **outputs, VstInt //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Biquad/source/BiquadProc.cpp b/plugins/MacVST/Biquad/source/BiquadProc.cpp index f872c60ca..5faae53f4 100755 --- a/plugins/MacVST/Biquad/source/BiquadProc.cpp +++ b/plugins/MacVST/Biquad/source/BiquadProc.cpp @@ -303,12 +303,12 @@ void Biquad::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp b/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp index db8d29571..64369d6a9 100755 --- a/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp +++ b/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp @@ -413,12 +413,12 @@ void Biquad2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp b/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp index a0a47f4f4..55512a0ca 100755 --- a/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp +++ b/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp @@ -286,12 +286,12 @@ void BiquadDouble::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp index 001a00ee1..d2e75159c 100755 --- a/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp +++ b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp @@ -294,12 +294,12 @@ void BiquadOneHalf::processDoubleReplacing(double **inputs, double **outputs, Vs } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp b/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp index 84b05ed53..0db6bc66a 100755 --- a/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp +++ b/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp @@ -309,12 +309,12 @@ void BiquadTriple::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp b/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp index b53db95e5..66b5c75e5 100755 --- a/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp +++ b/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp @@ -205,12 +205,12 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (drySampleR * clamp * wet * 16.0); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp b/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp index 69a6193b7..be5ab28ea 100755 --- a/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp +++ b/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp @@ -653,12 +653,12 @@ void BrightAmbience::processDoubleReplacing(double **inputs, double **outputs, V gcount--; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp index 1e9b85c8b..506eeccc4 100755 --- a/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp +++ b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp @@ -125,12 +125,12 @@ void BrightAmbience2::processDoubleReplacing(double **inputs, double **outputs, //Dry/Wet control, defaults to the last slider //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/BuildATPDF/source/BuildATPDFProc.cpp b/plugins/MacVST/BuildATPDF/source/BuildATPDFProc.cpp index 0b61354b3..06948a378 100755 --- a/plugins/MacVST/BuildATPDF/source/BuildATPDFProc.cpp +++ b/plugins/MacVST/BuildATPDF/source/BuildATPDFProc.cpp @@ -41,7 +41,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -58,7 +58,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -78,6 +78,10 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -122,7 +126,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -139,7 +143,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -159,6 +163,10 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/Calibre/source/CalibreProc.cpp b/plugins/MacVST/Calibre/source/CalibreProc.cpp index b51ae2d14..e146b3cfe 100755 --- a/plugins/MacVST/Calibre/source/CalibreProc.cpp +++ b/plugins/MacVST/Calibre/source/CalibreProc.cpp @@ -160,11 +160,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Calibre::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp b/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp index 5bd961e2d..5d2537a67 100755 --- a/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp +++ b/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp @@ -315,12 +315,12 @@ void Capacitor2::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (inputSampleR * nonLinTrim * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Channel7/source/Channel7Proc.cpp b/plugins/MacVST/Channel7/source/Channel7Proc.cpp index bb42ba20a..9620c3b75 100755 --- a/plugins/MacVST/Channel7/source/Channel7Proc.cpp +++ b/plugins/MacVST/Channel7/source/Channel7Proc.cpp @@ -201,12 +201,12 @@ void Channel7::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Channel8/source/Channel8Proc.cpp b/plugins/MacVST/Channel8/source/Channel8Proc.cpp index f62bed44f..2c0b5ac3d 100755 --- a/plugins/MacVST/Channel8/source/Channel8Proc.cpp +++ b/plugins/MacVST/Channel8/source/Channel8Proc.cpp @@ -249,12 +249,12 @@ void Channel8::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp b/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp index 873c535f1..662e103f2 100755 --- a/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp +++ b/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp @@ -96,7 +96,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -112,7 +112,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -257,7 +257,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -273,7 +273,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -312,12 +312,12 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI //that simple. //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Cider/source/CiderProc.cpp b/plugins/MacVST/Cider/source/CiderProc.cpp index 31be7279f..114cb1b45 100755 --- a/plugins/MacVST/Cider/source/CiderProc.cpp +++ b/plugins/MacVST/Cider/source/CiderProc.cpp @@ -158,11 +158,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Cider::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Coils/source/CoilsProc.cpp b/plugins/MacVST/Coils/source/CoilsProc.cpp index 278f0690d..f6a0fcb3d 100755 --- a/plugins/MacVST/Coils/source/CoilsProc.cpp +++ b/plugins/MacVST/Coils/source/CoilsProc.cpp @@ -157,12 +157,12 @@ void Coils::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp b/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp index 9a70ac814..cd2ccfb29 100755 --- a/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp +++ b/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp @@ -119,7 +119,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad L padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -140,7 +140,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad R padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -171,11 +171,11 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += static_cast(fpdL) * 5.960464655174751e-36L * pow(2,expon+62); frexpf((float)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 5.960464655174751e-36L * pow(2,expon+62); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += static_cast(fpdR) * 5.960464655174751e-36L * pow(2,expon+62); //end 32 bit stereo floating point dither *out1 = inputSampleL; @@ -258,7 +258,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -319,7 +319,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -351,12 +351,12 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += static_cast(fpd) * 1.110223024625156e-44L * pow(2,expon+62); //end 64 bit stereo floating point dither *out1 = inputSampleL; diff --git a/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp b/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp index 6e25bd3a3..02799869f 100755 --- a/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp +++ b/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp @@ -103,12 +103,12 @@ void Console6Buss::processDoubleReplacing(double **inputs, double **outputs, Vst //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp b/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp index a72e3b8f0..d73c63139 100755 --- a/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp +++ b/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp @@ -103,12 +103,12 @@ void Console6Channel::processDoubleReplacing(double **inputs, double **outputs, //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Crystal/source/CrystalProc.cpp b/plugins/MacVST/Crystal/source/CrystalProc.cpp index d5eef67c8..5e90250eb 100755 --- a/plugins/MacVST/Crystal/source/CrystalProc.cpp +++ b/plugins/MacVST/Crystal/source/CrystalProc.cpp @@ -143,12 +143,12 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. @@ -312,12 +312,12 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/MacVST/DeBess/source/DeBessProc.cpp b/plugins/MacVST/DeBess/source/DeBessProc.cpp index f868c8284..f70dbc417 100755 --- a/plugins/MacVST/DeBess/source/DeBessProc.cpp +++ b/plugins/MacVST/DeBess/source/DeBessProc.cpp @@ -193,12 +193,12 @@ void DeBess::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //sense monitoring //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/DeHiss/source/DeHissProc.cpp b/plugins/MacVST/DeHiss/source/DeHissProc.cpp index 88547ff75..16c9324b1 100755 --- a/plugins/MacVST/DeHiss/source/DeHissProc.cpp +++ b/plugins/MacVST/DeHiss/source/DeHissProc.cpp @@ -251,12 +251,12 @@ void DeHiss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp b/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp index 4ff6cf82d..0581d7162 100755 --- a/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp +++ b/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp @@ -345,12 +345,12 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 lastSampleR = drySampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp b/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp index 1e59e635c..fb9b670f0 100755 --- a/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp +++ b/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp @@ -41,22 +41,22 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -226,22 +226,22 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -359,12 +359,12 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR += (HeadBumpR * wreck); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp b/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp index efd520f21..f84078ef5 100755 --- a/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp +++ b/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp @@ -191,12 +191,12 @@ void DigitalBlack::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Distortion/source/DistortionProc.cpp b/plugins/MacVST/Distortion/source/DistortionProc.cpp index 17240d1cf..66d7a78cd 100755 --- a/plugins/MacVST/Distortion/source/DistortionProc.cpp +++ b/plugins/MacVST/Distortion/source/DistortionProc.cpp @@ -231,12 +231,12 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Ditherbox/source/DitherboxProc.cpp b/plugins/MacVST/Ditherbox/source/DitherboxProc.cpp index 8851aeaa0..8daa9d0bb 100755 --- a/plugins/MacVST/Ditherbox/source/DitherboxProc.cpp +++ b/plugins/MacVST/Ditherbox/source/DitherboxProc.cpp @@ -70,34 +70,34 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -108,7 +108,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -131,7 +131,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -156,8 +156,8 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -202,37 +202,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -249,37 +249,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -303,7 +303,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -317,7 +317,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -339,11 +339,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -966,6 +966,10 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl noiseShapingR += inputSampleR - drySampleR; } + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -1039,34 +1043,34 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -1077,7 +1081,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -1100,7 +1104,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -1124,8 +1128,8 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -1170,37 +1174,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -1217,37 +1221,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -1271,7 +1275,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -1285,7 +1289,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -1307,11 +1311,11 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -1934,6 +1938,10 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt noiseShapingR += inputSampleR - drySampleR; } + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/DoublePaul/source/DoublePaulProc.cpp b/plugins/MacVST/DoublePaul/source/DoublePaulProc.cpp index 0ba4cae2b..cd11d65ea 100755 --- a/plugins/MacVST/DoublePaul/source/DoublePaulProc.cpp +++ b/plugins/MacVST/DoublePaul/source/DoublePaulProc.cpp @@ -33,7 +33,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -56,7 +56,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -80,6 +80,10 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,7 +120,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -139,7 +143,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -163,6 +167,10 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/DubCenter/source/DubCenterProc.cpp b/plugins/MacVST/DubCenter/source/DubCenterProc.cpp index 197309401..b51207b1d 100755 --- a/plugins/MacVST/DubCenter/source/DubCenterProc.cpp +++ b/plugins/MacVST/DubCenter/source/DubCenterProc.cpp @@ -155,7 +155,7 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -438,7 +438,7 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/MacVST/DubSub/source/DubSubProc.cpp b/plugins/MacVST/DubSub/source/DubSubProc.cpp index 81acffd7a..bdc30447d 100755 --- a/plugins/MacVST/DubSub/source/DubSubProc.cpp +++ b/plugins/MacVST/DubSub/source/DubSubProc.cpp @@ -194,11 +194,11 @@ void DubSub::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise @@ -597,11 +597,11 @@ void DubSub::processDoubleReplacing(double **inputs, double **outputs, VstInt32 else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise diff --git a/plugins/MacVST/Dyno/source/DynoProc.cpp b/plugins/MacVST/Dyno/source/DynoProc.cpp index c2db122db..b6c6d71f6 100755 --- a/plugins/MacVST/Dyno/source/DynoProc.cpp +++ b/plugins/MacVST/Dyno/source/DynoProc.cpp @@ -83,12 +83,12 @@ void Dyno::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //dyno is the one that tries to raise peak energy //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Elation/source/ElationProc.cpp b/plugins/MacVST/Elation/source/ElationProc.cpp index 8df4ce867..d0e0ad4ce 100755 --- a/plugins/MacVST/Elation/source/ElationProc.cpp +++ b/plugins/MacVST/Elation/source/ElationProc.cpp @@ -258,12 +258,12 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; @@ -538,23 +538,23 @@ void Elation::processDoubleReplacing(double **inputs, double **outputs, VstInt32 flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Facet/source/FacetProc.cpp b/plugins/MacVST/Facet/source/FacetProc.cpp index 85af36f42..e237d9252 100755 --- a/plugins/MacVST/Facet/source/FacetProc.cpp +++ b/plugins/MacVST/Facet/source/FacetProc.cpp @@ -103,12 +103,12 @@ void Facet::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Focus/source/FocusProc.cpp b/plugins/MacVST/Focus/source/FocusProc.cpp index fd7624e72..a5f0ead84 100755 --- a/plugins/MacVST/Focus/source/FocusProc.cpp +++ b/plugins/MacVST/Focus/source/FocusProc.cpp @@ -265,12 +265,12 @@ void Focus::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/FromTape/source/FromTapeProc.cpp b/plugins/MacVST/FromTape/source/FromTapeProc.cpp index 5e8aca68a..46bc5759b 100755 --- a/plugins/MacVST/FromTape/source/FromTapeProc.cpp +++ b/plugins/MacVST/FromTape/source/FromTapeProc.cpp @@ -55,7 +55,7 @@ void FromTape::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section @@ -252,7 +252,7 @@ void FromTape::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp b/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp index 06ebe4bae..d5d446136 100755 --- a/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp +++ b/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp @@ -623,12 +623,12 @@ void GlitchShifter::processDoubleReplacing(double **inputs, double **outputs, Vs //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Gringer/source/GringerProc.cpp b/plugins/MacVST/Gringer/source/GringerProc.cpp index b59800001..2dc2a26fe 100755 --- a/plugins/MacVST/Gringer/source/GringerProc.cpp +++ b/plugins/MacVST/Gringer/source/GringerProc.cpp @@ -219,12 +219,12 @@ void Gringer::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp b/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp index e87194339..b66aa6d31 100755 --- a/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp +++ b/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp @@ -261,12 +261,12 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp b/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp index 653fac502..a530eeb65 100755 --- a/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp +++ b/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp @@ -209,12 +209,12 @@ void Infrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Interstage/source/InterstageProc.cpp b/plugins/MacVST/Interstage/source/InterstageProc.cpp index 2707bd744..ab0efc435 100755 --- a/plugins/MacVST/Interstage/source/InterstageProc.cpp +++ b/plugins/MacVST/Interstage/source/InterstageProc.cpp @@ -163,12 +163,12 @@ void Interstage::processDoubleReplacing(double **inputs, double **outputs, VstIn lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/IronOxide5/source/IronOxide5Proc.cpp b/plugins/MacVST/IronOxide5/source/IronOxide5Proc.cpp index a79d2d315..ebffe6e53 100755 --- a/plugins/MacVST/IronOxide5/source/IronOxide5Proc.cpp +++ b/plugins/MacVST/IronOxide5/source/IronOxide5Proc.cpp @@ -76,7 +76,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -347,7 +347,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); @@ -471,7 +471,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -742,7 +742,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); diff --git a/plugins/MacVST/Isolator/source/IsolatorProc.cpp b/plugins/MacVST/Isolator/source/IsolatorProc.cpp index 4f7178a86..0f756ee6e 100755 --- a/plugins/MacVST/Isolator/source/IsolatorProc.cpp +++ b/plugins/MacVST/Isolator/source/IsolatorProc.cpp @@ -229,12 +229,12 @@ void Isolator::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp b/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp index 1bed77696..8e27a2379 100755 --- a/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp +++ b/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp @@ -262,12 +262,12 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Luxor/source/LuxorProc.cpp b/plugins/MacVST/Luxor/source/LuxorProc.cpp index 89c8487ba..f6ef00f03 100755 --- a/plugins/MacVST/Luxor/source/LuxorProc.cpp +++ b/plugins/MacVST/Luxor/source/LuxorProc.cpp @@ -160,11 +160,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Luxor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/MoNoam/source/MoNoamProc.cpp b/plugins/MacVST/MoNoam/source/MoNoamProc.cpp index c7835d557..a1ca2768d 100755 --- a/plugins/MacVST/MoNoam/source/MoNoamProc.cpp +++ b/plugins/MacVST/MoNoam/source/MoNoamProc.cpp @@ -91,12 +91,12 @@ void MoNoam::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (processing == kBYPASS) {inputSampleL = *in1; inputSampleR = *in2;} //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Mojo/source/MojoProc.cpp b/plugins/MacVST/Mojo/source/MojoProc.cpp index 2597aae9e..e29ef01b9 100755 --- a/plugins/MacVST/Mojo/source/MojoProc.cpp +++ b/plugins/MacVST/Mojo/source/MojoProc.cpp @@ -83,12 +83,12 @@ void Mojo::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //mojo is the one that flattens WAAAAY out very softly before wavefolding //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/NaturalizeDither/source/NaturalizeDitherProc.cpp b/plugins/MacVST/NaturalizeDither/source/NaturalizeDitherProc.cpp index ffc731e21..6228d9601 100755 --- a/plugins/MacVST/NaturalizeDither/source/NaturalizeDitherProc.cpp +++ b/plugins/MacVST/NaturalizeDither/source/NaturalizeDitherProc.cpp @@ -36,11 +36,11 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -195,6 +195,10 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -234,11 +238,11 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -393,6 +397,10 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/Neverland/source/NeverlandProc.cpp b/plugins/MacVST/Neverland/source/NeverlandProc.cpp index 02dcb04b7..babded715 100755 --- a/plugins/MacVST/Neverland/source/NeverlandProc.cpp +++ b/plugins/MacVST/Neverland/source/NeverlandProc.cpp @@ -156,11 +156,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -332,22 +332,22 @@ void Neverland::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Nikola/source/NikolaProc.cpp b/plugins/MacVST/Nikola/source/NikolaProc.cpp index 3c049ce59..86e5285a6 100755 --- a/plugins/MacVST/Nikola/source/NikolaProc.cpp +++ b/plugins/MacVST/Nikola/source/NikolaProc.cpp @@ -2028,12 +2028,12 @@ void Nikola::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/NodeDither/source/NodeDitherProc.cpp b/plugins/MacVST/NodeDither/source/NodeDitherProc.cpp index 50f3e85f9..cf4d3c51d 100755 --- a/plugins/MacVST/NodeDither/source/NodeDitherProc.cpp +++ b/plugins/MacVST/NodeDither/source/NodeDitherProc.cpp @@ -43,10 +43,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -71,6 +71,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -117,10 +121,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -145,6 +149,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= 8388608.0; inputSampleR /= 8388608.0; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/Noise/source/NoiseProc.cpp b/plugins/MacVST/Noise/source/NoiseProc.cpp index 82d67fde1..bc268c0ff 100755 --- a/plugins/MacVST/Noise/source/NoiseProc.cpp +++ b/plugins/MacVST/Noise/source/NoiseProc.cpp @@ -118,12 +118,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -134,12 +134,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -173,10 +173,10 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { @@ -388,12 +388,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -404,12 +404,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -443,10 +443,10 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/MacVST/PaulDither/source/PaulDitherProc.cpp b/plugins/MacVST/PaulDither/source/PaulDitherProc.cpp index 476bfd332..b7e2b2fb9 100755 --- a/plugins/MacVST/PaulDither/source/PaulDitherProc.cpp +++ b/plugins/MacVST/PaulDither/source/PaulDitherProc.cpp @@ -42,8 +42,8 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -114,8 +114,8 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; diff --git a/plugins/MacVST/PaulWide/source/PaulWideProc.cpp b/plugins/MacVST/PaulWide/source/PaulWideProc.cpp index 13cd58f79..ecdae8a30 100755 --- a/plugins/MacVST/PaulWide/source/PaulWideProc.cpp +++ b/plugins/MacVST/PaulWide/source/PaulWideProc.cpp @@ -46,34 +46,34 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -85,6 +85,10 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -134,34 +138,34 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -173,6 +177,10 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp b/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp index d7d4af84c..794da2b65 100755 --- a/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp +++ b/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp @@ -267,12 +267,12 @@ void PeaksOnly::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR *= 0.63679; //scale it to 0dB output at full blast //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp b/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp index 5d8a7d157..3865d3bfc 100755 --- a/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp +++ b/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp @@ -18339,12 +18339,12 @@ void PocketVerbs::processDoubleReplacing(double **inputs, double **outputs, VstI //here we combine the tanks with the dry signal //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Podcast/source/PodcastProc.cpp b/plugins/MacVST/Podcast/source/PodcastProc.cpp index a6bd88d45..48f864776 100755 --- a/plugins/MacVST/Podcast/source/PodcastProc.cpp +++ b/plugins/MacVST/Podcast/source/PodcastProc.cpp @@ -307,12 +307,12 @@ void Podcast::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (inputSampleR < -0.999) inputSampleR = -0.999; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp index 2f306c079..c13b4ef04 100755 --- a/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp +++ b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp @@ -640,12 +640,12 @@ void PodcastDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vs //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp b/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp index 4b637c3ff..88eb14def 100755 --- a/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp +++ b/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp @@ -127,12 +127,12 @@ void PowerSag2::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR = drySampleR - (difference * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Precious/source/PreciousProc.cpp b/plugins/MacVST/Precious/source/PreciousProc.cpp index a2de05c32..189a324a9 100755 --- a/plugins/MacVST/Precious/source/PreciousProc.cpp +++ b/plugins/MacVST/Precious/source/PreciousProc.cpp @@ -158,11 +158,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Precious::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/PurestAir/source/PurestAirProc.cpp b/plugins/MacVST/PurestAir/source/PurestAirProc.cpp index d2df18951..a4efee935 100755 --- a/plugins/MacVST/PurestAir/source/PurestAirProc.cpp +++ b/plugins/MacVST/PurestAir/source/PurestAirProc.cpp @@ -199,12 +199,12 @@ void PurestAir::processDoubleReplacing(double **inputs, double **outputs, VstInt } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Recurve/source/RecurveProc.cpp b/plugins/MacVST/Recurve/source/RecurveProc.cpp index 1b56af4a1..376e84f7f 100755 --- a/plugins/MacVST/Recurve/source/RecurveProc.cpp +++ b/plugins/MacVST/Recurve/source/RecurveProc.cpp @@ -99,12 +99,12 @@ void Recurve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //iron bar so people can play with this as a loudenator //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Remap/source/RemapProc.cpp b/plugins/MacVST/Remap/source/RemapProc.cpp index 32bb5b9e6..f715824c8 100755 --- a/plugins/MacVST/Remap/source/RemapProc.cpp +++ b/plugins/MacVST/Remap/source/RemapProc.cpp @@ -137,12 +137,12 @@ void Remap::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/ResEQ/source/ResEQProc.cpp b/plugins/MacVST/ResEQ/source/ResEQProc.cpp index 22c389843..e11603657 100755 --- a/plugins/MacVST/ResEQ/source/ResEQProc.cpp +++ b/plugins/MacVST/ResEQ/source/ResEQProc.cpp @@ -579,12 +579,12 @@ void ResEQ::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Slew3/source/Slew3Proc.cpp b/plugins/MacVST/Slew3/source/Slew3Proc.cpp index 297a4f6e3..295ab21c6 100755 --- a/plugins/MacVST/Slew3/source/Slew3Proc.cpp +++ b/plugins/MacVST/Slew3/source/Slew3Proc.cpp @@ -135,12 +135,12 @@ void Slew3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //end R //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Smooth/source/SmoothProc.cpp b/plugins/MacVST/Smooth/source/SmoothProc.cpp index 9d532987c..24d9c46f1 100755 --- a/plugins/MacVST/Smooth/source/SmoothProc.cpp +++ b/plugins/MacVST/Smooth/source/SmoothProc.cpp @@ -293,12 +293,12 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/SoftGate/source/SoftGateProc.cpp b/plugins/MacVST/SoftGate/source/SoftGateProc.cpp index f08b9563c..9d97f9297 100755 --- a/plugins/MacVST/SoftGate/source/SoftGateProc.cpp +++ b/plugins/MacVST/SoftGate/source/SoftGateProc.cpp @@ -127,12 +127,12 @@ void SoftGate::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/SpatializeDither/source/SpatializeDitherProc.cpp b/plugins/MacVST/SpatializeDither/source/SpatializeDitherProc.cpp index bf9da7ef7..d3e5723be 100755 --- a/plugins/MacVST/SpatializeDither/source/SpatializeDitherProc.cpp +++ b/plugins/MacVST/SpatializeDither/source/SpatializeDitherProc.cpp @@ -51,7 +51,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -65,7 +65,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -88,6 +88,10 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -142,7 +146,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -156,7 +160,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -179,6 +183,10 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/TPDFDither/source/TPDFDitherProc.cpp b/plugins/MacVST/TPDFDither/source/TPDFDitherProc.cpp index e51504299..f86345088 100755 --- a/plugins/MacVST/TPDFDither/source/TPDFDitherProc.cpp +++ b/plugins/MacVST/TPDFDither/source/TPDFDitherProc.cpp @@ -42,11 +42,11 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -55,6 +55,10 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -100,11 +104,11 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -113,6 +117,10 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/TPDFWide/source/TPDFWideProc.cpp b/plugins/MacVST/TPDFWide/source/TPDFWideProc.cpp index 45b831dac..2b9232bf0 100755 --- a/plugins/MacVST/TPDFWide/source/TPDFWideProc.cpp +++ b/plugins/MacVST/TPDFWide/source/TPDFWideProc.cpp @@ -40,31 +40,31 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -73,6 +73,10 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -116,31 +120,31 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -149,6 +153,10 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/Tape/source/TapeProc.cpp b/plugins/MacVST/Tape/source/TapeProc.cpp index 2f26675ed..ea73fea27 100755 --- a/plugins/MacVST/Tape/source/TapeProc.cpp +++ b/plugins/MacVST/Tape/source/TapeProc.cpp @@ -553,12 +553,12 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //final iron bar //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/TapeDither/source/TapeDitherProc.cpp b/plugins/MacVST/TapeDither/source/TapeDitherProc.cpp index 4bf9003fd..f67b259b1 100755 --- a/plugins/MacVST/TapeDither/source/TapeDitherProc.cpp +++ b/plugins/MacVST/TapeDither/source/TapeDitherProc.cpp @@ -41,8 +41,8 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -65,6 +65,10 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -110,8 +114,8 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -134,6 +138,10 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/ToTape5/source/ToTape5Proc.cpp b/plugins/MacVST/ToTape5/source/ToTape5Proc.cpp index 504bbc829..840dbd28c 100755 --- a/plugins/MacVST/ToTape5/source/ToTape5Proc.cpp +++ b/plugins/MacVST/ToTape5/source/ToTape5Proc.cpp @@ -77,7 +77,7 @@ void ToTape5::processReplacing(float **inputs, float **outputs, VstInt32 sampleF drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; @@ -406,7 +406,7 @@ void ToTape5::processDoubleReplacing(double **inputs, double **outputs, VstInt32 drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp b/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp index f3a052485..3cfc521fd 100755 --- a/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp +++ b/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp @@ -657,12 +657,12 @@ void ToTape6::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp b/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp index ec7d1b27b..574ce7f45 100755 --- a/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp +++ b/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp @@ -127,12 +127,12 @@ void TremoSquare::processDoubleReplacing(double **inputs, double **outputs, VstI } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp b/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp index ef7721197..c04e6dfed 100755 --- a/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp +++ b/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp @@ -627,12 +627,12 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp b/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp index 96ee029c7..5e3a29ced 100755 --- a/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp +++ b/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp @@ -209,12 +209,12 @@ void Ultrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp b/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp index cbce9a998..5c9d08a86 100755 --- a/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp +++ b/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp @@ -91,12 +91,12 @@ void UltrasonicLite::processDoubleReplacing(double **inputs, double **outputs, V biquadA[12] = biquadA[11]; biquadA[11] = inputSampleR; inputSampleR = outSampleR; biquadA[14] = biquadA[13]; biquadA[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp b/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp index 8e3cb8250..cecb2a823 100755 --- a/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp +++ b/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp @@ -129,12 +129,12 @@ void UltrasonicMed::processDoubleReplacing(double **inputs, double **outputs, Vs biquadB[12] = biquadB[11]; biquadB[11] = inputSampleR; inputSampleR = outSampleR; biquadB[14] = biquadB[13]; biquadB[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/Vibrato/source/VibratoProc.cpp b/plugins/MacVST/Vibrato/source/VibratoProc.cpp index f196e90e2..ce0795b37 100755 --- a/plugins/MacVST/Vibrato/source/VibratoProc.cpp +++ b/plugins/MacVST/Vibrato/source/VibratoProc.cpp @@ -185,12 +185,12 @@ void Vibrato::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //Inv/Dry/Wet control //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/VinylDither/source/VinylDitherProc.cpp b/plugins/MacVST/VinylDither/source/VinylDitherProc.cpp index d73eece2d..018cea36a 100755 --- a/plugins/MacVST/VinylDither/source/VinylDitherProc.cpp +++ b/plugins/MacVST/VinylDither/source/VinylDitherProc.cpp @@ -41,37 +41,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -87,37 +87,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -136,6 +136,10 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; @@ -180,37 +184,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -226,37 +230,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -275,6 +279,10 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL /= outScale; inputSampleR /= outScale; + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //pseudorandom number updater + *out1 = inputSampleL; *out2 = inputSampleR; diff --git a/plugins/MacVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp b/plugins/MacVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp index dda1805dc..fd6e5bdfa 100755 --- a/plugins/MacVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp +++ b/plugins/MacVST/VoiceOfTheStarship/source/VoiceOfTheStarshipProc.cpp @@ -110,10 +110,10 @@ void VoiceOfTheStarship::processReplacing(float **inputs, float **outputs, VstIn //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) @@ -300,10 +300,10 @@ void VoiceOfTheStarship::processDoubleReplacing(double **inputs, double **output //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp b/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp index 53ecb0fff..97604cacb 100755 --- a/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp +++ b/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp @@ -195,12 +195,12 @@ void VoiceTrick::processDoubleReplacing(double **inputs, double **outputs, VstIn //Thanks to Peter Gabriel for many great examples of hit vocals recorded just like this :) //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/MacVST/curve/source/curveProc.cpp b/plugins/MacVST/curve/source/curveProc.cpp index 1b607c120..56fdbfd9b 100755 --- a/plugins/MacVST/curve/source/curveProc.cpp +++ b/plugins/MacVST/curve/source/curveProc.cpp @@ -87,12 +87,12 @@ void curve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s inputSampleR *= 2.0; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Apicolypse/ApicolypseProc.cpp b/plugins/WinVST/Apicolypse/ApicolypseProc.cpp index c0b954717..f72f53455 100755 --- a/plugins/WinVST/Apicolypse/ApicolypseProc.cpp +++ b/plugins/WinVST/Apicolypse/ApicolypseProc.cpp @@ -155,11 +155,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -331,22 +331,22 @@ void Apicolypse::processDoubleReplacing(double **inputs, double **outputs, VstIn } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.033); + randy = ((double(fpd)/UINT32_MAX)*0.033); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/AverMatrix/AverMatrixProc.cpp b/plugins/WinVST/AverMatrix/AverMatrixProc.cpp index 3887a51d7..0d50b6348 100755 --- a/plugins/WinVST/AverMatrix/AverMatrixProc.cpp +++ b/plugins/WinVST/AverMatrix/AverMatrixProc.cpp @@ -172,12 +172,12 @@ void AverMatrix::processDoubleReplacing(double **inputs, double **outputs, VstIn //wet can be negative, in which case dry is always full volume and they cancel //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BassAmp/BassAmpProc.cpp b/plugins/WinVST/BassAmp/BassAmpProc.cpp index 025fa038a..e7790e45c 100755 --- a/plugins/WinVST/BassAmp/BassAmpProc.cpp +++ b/plugins/WinVST/BassAmp/BassAmpProc.cpp @@ -195,7 +195,7 @@ void BassAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleF LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { @@ -567,7 +567,7 @@ void BassAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 LataLowpass += LataHalfwayLowpass; //and combined them. Now we make sub-octaves RataLowpass += RataHalfwayLowpass; //and combined them. Now we make sub-octaves - double randy = (rand()/(double)RAND_MAX)*0.0555; //0 to 1 the noise, may not be needed + double randy = (double(fpd)/UINT32_MAX)*0.0555; //0 to 1 the noise, may not be needed switch (bflip) { diff --git a/plugins/WinVST/BassDrive/BassDriveProc.cpp b/plugins/WinVST/BassDrive/BassDriveProc.cpp index 8575a9e62..d289cdb77 100755 --- a/plugins/WinVST/BassDrive/BassDriveProc.cpp +++ b/plugins/WinVST/BassDrive/BassDriveProc.cpp @@ -637,12 +637,12 @@ void BassDrive::processDoubleReplacing(double **inputs, double **outputs, VstInt flip = !flip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BassKit/BassKitProc.cpp b/plugins/WinVST/BassKit/BassKitProc.cpp index 620b4449d..b4621d946 100755 --- a/plugins/WinVST/BassKit/BassKitProc.cpp +++ b/plugins/WinVST/BassKit/BassKitProc.cpp @@ -57,7 +57,7 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -239,7 +239,7 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/WinVST/Baxandall/BaxandallProc.cpp b/plugins/WinVST/Baxandall/BaxandallProc.cpp index 772a7cadc..4590b6f3f 100755 --- a/plugins/WinVST/Baxandall/BaxandallProc.cpp +++ b/plugins/WinVST/Baxandall/BaxandallProc.cpp @@ -263,12 +263,12 @@ void Baxandall::processDoubleReplacing(double **inputs, double **outputs, VstInt //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Biquad/BiquadProc.cpp b/plugins/WinVST/Biquad/BiquadProc.cpp index f872c60ca..5faae53f4 100755 --- a/plugins/WinVST/Biquad/BiquadProc.cpp +++ b/plugins/WinVST/Biquad/BiquadProc.cpp @@ -303,12 +303,12 @@ void Biquad::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Biquad2/Biquad2Proc.cpp b/plugins/WinVST/Biquad2/Biquad2Proc.cpp index db8d29571..64369d6a9 100755 --- a/plugins/WinVST/Biquad2/Biquad2Proc.cpp +++ b/plugins/WinVST/Biquad2/Biquad2Proc.cpp @@ -413,12 +413,12 @@ void Biquad2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp b/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp index a0a47f4f4..55512a0ca 100755 --- a/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp +++ b/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp @@ -286,12 +286,12 @@ void BiquadDouble::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp b/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp index 001a00ee1..d2e75159c 100755 --- a/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp +++ b/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp @@ -294,12 +294,12 @@ void BiquadOneHalf::processDoubleReplacing(double **inputs, double **outputs, Vs } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp b/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp index 84b05ed53..0db6bc66a 100755 --- a/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp +++ b/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp @@ -309,12 +309,12 @@ void BiquadTriple::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BrassRider/BrassRiderProc.cpp b/plugins/WinVST/BrassRider/BrassRiderProc.cpp index b53db95e5..66b5c75e5 100755 --- a/plugins/WinVST/BrassRider/BrassRiderProc.cpp +++ b/plugins/WinVST/BrassRider/BrassRiderProc.cpp @@ -205,12 +205,12 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (drySampleR * clamp * wet * 16.0); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp b/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp index 69a6193b7..be5ab28ea 100755 --- a/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp +++ b/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp @@ -653,12 +653,12 @@ void BrightAmbience::processDoubleReplacing(double **inputs, double **outputs, V gcount--; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp b/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp index 1e9b85c8b..506eeccc4 100755 --- a/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp +++ b/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp @@ -125,12 +125,12 @@ void BrightAmbience2::processDoubleReplacing(double **inputs, double **outputs, //Dry/Wet control, defaults to the last slider //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/BuildATPDF/BuildATPDFProc.cpp b/plugins/WinVST/BuildATPDF/BuildATPDFProc.cpp index 0b61354b3..51f46f489 100644 --- a/plugins/WinVST/BuildATPDF/BuildATPDFProc.cpp +++ b/plugins/WinVST/BuildATPDF/BuildATPDFProc.cpp @@ -41,7 +41,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -58,7 +58,7 @@ void BuildATPDF::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); @@ -122,7 +122,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDither = (bL[0] * f[0]); currentDither += (bL[1] * f[1]); @@ -139,7 +139,7 @@ void BuildATPDF::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDither = (bR[0] * f[0]); currentDither += (bR[1] * f[1]); diff --git a/plugins/WinVST/Calibre/CalibreProc.cpp b/plugins/WinVST/Calibre/CalibreProc.cpp index b51ae2d14..e146b3cfe 100755 --- a/plugins/WinVST/Calibre/CalibreProc.cpp +++ b/plugins/WinVST/Calibre/CalibreProc.cpp @@ -160,11 +160,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Calibre::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.042); + randy = ((double(fpd)/UINT32_MAX)*0.042); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp b/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp index 5bd961e2d..5d2537a67 100755 --- a/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp +++ b/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp @@ -315,12 +315,12 @@ void Capacitor2::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR = (drySampleR * (1.0-wet)) + (inputSampleR * nonLinTrim * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Channel7/Channel7Proc.cpp b/plugins/WinVST/Channel7/Channel7Proc.cpp index bb42ba20a..9620c3b75 100755 --- a/plugins/WinVST/Channel7/Channel7Proc.cpp +++ b/plugins/WinVST/Channel7/Channel7Proc.cpp @@ -201,12 +201,12 @@ void Channel7::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Channel8/Channel8Proc.cpp b/plugins/WinVST/Channel8/Channel8Proc.cpp index f62bed44f..2c0b5ac3d 100755 --- a/plugins/WinVST/Channel8/Channel8Proc.cpp +++ b/plugins/WinVST/Channel8/Channel8Proc.cpp @@ -249,12 +249,12 @@ void Channel8::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp b/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp index 873c535f1..662e103f2 100755 --- a/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp +++ b/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp @@ -96,7 +96,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -112,7 +112,7 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -257,7 +257,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleL; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleL * randy)+(secondSampleL * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleL * (randy-1.0))+(thirdSampleL * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleL * (randy-2.0))+(fourthSampleL * (3.0-randy)); @@ -273,7 +273,7 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI bridgerectifier = inputSampleR; //insanity check - randy = bias+((rand()/(double)RAND_MAX)*noise); + randy = bias+((double(fpd)/UINT32_MAX)*noise); if ((randy >= 0.0)&&(randy < 1.0)) bridgerectifier = (inputSampleR * randy)+(secondSampleR * (1.0-randy)); if ((randy >= 1.0)&&(randy < 2.0)) bridgerectifier = (secondSampleR * (randy-1.0))+(thirdSampleR * (2.0-randy)); if ((randy >= 2.0)&&(randy < 3.0)) bridgerectifier = (thirdSampleR * (randy-2.0))+(fourthSampleR * (3.0-randy)); @@ -312,12 +312,12 @@ void ChromeOxide::processDoubleReplacing(double **inputs, double **outputs, VstI //that simple. //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Cider/CiderProc.cpp b/plugins/WinVST/Cider/CiderProc.cpp index 31be7279f..114cb1b45 100755 --- a/plugins/WinVST/Cider/CiderProc.cpp +++ b/plugins/WinVST/Cider/CiderProc.cpp @@ -158,11 +158,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Cider::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.057); + randy = ((double(fpd)/UINT32_MAX)*0.057); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Coils/CoilsProc.cpp b/plugins/WinVST/Coils/CoilsProc.cpp index 278f0690d..f6a0fcb3d 100755 --- a/plugins/WinVST/Coils/CoilsProc.cpp +++ b/plugins/WinVST/Coils/CoilsProc.cpp @@ -157,12 +157,12 @@ void Coils::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp b/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp index 9a70ac814..b5104171d 100755 --- a/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp +++ b/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp @@ -119,7 +119,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad L padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -140,7 +140,7 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 //begin pad R padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; @@ -258,7 +258,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorL += dL[dCount]; - double randy = (rand()/(double)RAND_MAX); + double randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthL) { //we are expanding the buffer so we don't remove this trailing sample lastWidthL += 1; @@ -319,7 +319,7 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, //we now have a big buffer to draw from, which is always positive amount of overspill padFactorR += dR[dCount]; - randy = (rand()/(double)RAND_MAX); + randy = (double(fpd)/UINT32_MAX); if ((targetWidth*randy) > lastWidthR) { //we are expanding the buffer so we don't remove this trailing sample lastWidthR += 1; diff --git a/plugins/WinVST/Console6Buss/Console6BussProc.cpp b/plugins/WinVST/Console6Buss/Console6BussProc.cpp index 6e25bd3a3..02799869f 100755 --- a/plugins/WinVST/Console6Buss/Console6BussProc.cpp +++ b/plugins/WinVST/Console6Buss/Console6BussProc.cpp @@ -103,12 +103,12 @@ void Console6Buss::processDoubleReplacing(double **inputs, double **outputs, Vst //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp b/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp index a72e3b8f0..d73c63139 100755 --- a/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp +++ b/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp @@ -103,12 +103,12 @@ void Console6Channel::processDoubleReplacing(double **inputs, double **outputs, //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Crystal/CrystalProc.cpp b/plugins/WinVST/Crystal/CrystalProc.cpp index d5eef67c8..5e90250eb 100755 --- a/plugins/WinVST/Crystal/CrystalProc.cpp +++ b/plugins/WinVST/Crystal/CrystalProc.cpp @@ -143,12 +143,12 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. @@ -312,12 +312,12 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //because it introduces a point where the saturation 'curve' changes from straight to curved. //People don't like these discontinuities, but you can use them for effect or to grit up the sound. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; inputSampleL = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. - randy = ((rand()/(double)RAND_MAX)*0.022); + randy = ((double(fpd)/UINT32_MAX)*0.022); bridgerectifier = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; inputSampleR = bridgerectifier; //applies a tiny 'fuzz' to highs: from original Crystal. diff --git a/plugins/WinVST/DeBess/DeBessProc.cpp b/plugins/WinVST/DeBess/DeBessProc.cpp index f868c8284..f70dbc417 100755 --- a/plugins/WinVST/DeBess/DeBessProc.cpp +++ b/plugins/WinVST/DeBess/DeBessProc.cpp @@ -193,12 +193,12 @@ void DeBess::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //sense monitoring //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/DeHiss/DeHissProc.cpp b/plugins/WinVST/DeHiss/DeHissProc.cpp index 88547ff75..16c9324b1 100755 --- a/plugins/WinVST/DeHiss/DeHissProc.cpp +++ b/plugins/WinVST/DeHiss/DeHissProc.cpp @@ -251,12 +251,12 @@ void DeHiss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/DeRez2/DeRez2Proc.cpp b/plugins/WinVST/DeRez2/DeRez2Proc.cpp index 4ff6cf82d..0581d7162 100755 --- a/plugins/WinVST/DeRez2/DeRez2Proc.cpp +++ b/plugins/WinVST/DeRez2/DeRez2Proc.cpp @@ -345,12 +345,12 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 lastSampleR = drySampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp b/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp index 1e59e635c..fb9b670f0 100755 --- a/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp +++ b/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp @@ -41,22 +41,22 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -226,22 +226,22 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - randyL = (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); - randyL += (rand()/(double)RAND_MAX); + randyL = (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); + randyL += (double(fpd)/UINT32_MAX); randyL /= 6.0; randyL *= wreck; //0 to 1 the noise, may not be needed //set up the noise - randyR = (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); - randyR += (rand()/(double)RAND_MAX); + randyR = (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); + randyR += (double(fpd)/UINT32_MAX); randyR /= 6.0; randyR *= wreck; //0 to 1 the noise, may not be needed //set up the noise @@ -359,12 +359,12 @@ void Deckwrecka::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR += (HeadBumpR * wreck); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp b/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp index efd520f21..f84078ef5 100755 --- a/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp +++ b/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp @@ -191,12 +191,12 @@ void DigitalBlack::processDoubleReplacing(double **inputs, double **outputs, Vst } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Distortion/DistortionProc.cpp b/plugins/WinVST/Distortion/DistortionProc.cpp index 17240d1cf..66d7a78cd 100755 --- a/plugins/WinVST/Distortion/DistortionProc.cpp +++ b/plugins/WinVST/Distortion/DistortionProc.cpp @@ -231,12 +231,12 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Ditherbox/DitherboxProc.cpp b/plugins/WinVST/Ditherbox/DitherboxProc.cpp index 8851aeaa0..04ba38eaf 100755 --- a/plugins/WinVST/Ditherbox/DitherboxProc.cpp +++ b/plugins/WinVST/Ditherbox/DitherboxProc.cpp @@ -70,34 +70,34 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -108,7 +108,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -131,7 +131,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -156,8 +156,8 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -202,37 +202,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -249,37 +249,37 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -303,7 +303,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -317,7 +317,7 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -339,11 +339,11 @@ void Ditherbox::processReplacing(float **inputs, float **outputs, VstInt32 sampl case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -1039,34 +1039,34 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 2: - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 0.5; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 0.5; inputSampleR = floor(inputSampleR); //flat dither break; case 3: - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleL += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); inputSampleL -= 1.0; inputSampleL = floor(inputSampleL); - inputSampleR += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleR -= 1.0; inputSampleR = floor(inputSampleR); //TPDF dither break; case 4: - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleL -= lastSampleL; inputSampleL = floor(inputSampleL); lastSampleL = currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; inputSampleR -= lastSampleR; inputSampleR = floor(inputSampleR); @@ -1077,7 +1077,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 5: nsL[9] = nsL[8]; nsL[8] = nsL[7]; nsL[7] = nsL[6]; nsL[6] = nsL[5]; nsL[5] = nsL[4]; nsL[4] = nsL[3]; nsL[3] = nsL[2]; nsL[2] = nsL[1]; - nsL[1] = nsL[0]; nsL[0] = (rand()/(double)RAND_MAX); + nsL[1] = nsL[0]; nsL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (nsL[0] * 0.061); currentDitherL -= (nsL[1] * 0.11); @@ -1100,7 +1100,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt nsR[9] = nsR[8]; nsR[8] = nsR[7]; nsR[7] = nsR[6]; nsR[6] = nsR[5]; nsR[5] = nsR[4]; nsR[4] = nsR[3]; nsR[3] = nsR[2]; nsR[2] = nsR[1]; - nsR[1] = nsR[0]; nsR[0] = (rand()/(double)RAND_MAX); + nsR[1] = nsR[0]; nsR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (nsR[0] * 0.061); currentDitherR -= (nsR[1] * 0.11); @@ -1124,8 +1124,8 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 6: - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -1170,37 +1170,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt break; case 8: - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -1217,37 +1217,37 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -1271,7 +1271,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -1285,7 +1285,7 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -1307,11 +1307,11 @@ void Ditherbox::processDoubleReplacing(double **inputs, double **outputs, VstInt case 10: //this one is the original Naturalize if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); diff --git a/plugins/WinVST/DoublePaul/DoublePaulProc.cpp b/plugins/WinVST/DoublePaul/DoublePaulProc.cpp index 0ba4cae2b..aae850666 100755 --- a/plugins/WinVST/DoublePaul/DoublePaulProc.cpp +++ b/plugins/WinVST/DoublePaul/DoublePaulProc.cpp @@ -33,7 +33,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -56,7 +56,7 @@ void DoublePaul::processReplacing(float **inputs, float **outputs, VstInt32 samp bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); @@ -116,7 +116,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bL[9] = bL[8]; bL[8] = bL[7]; bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; - bL[1] = bL[0]; bL[0] = (rand()/(double)RAND_MAX); + bL[1] = bL[0]; bL[0] = (double(fpd)/UINT32_MAX); currentDitherL = (bL[0] * 0.061); currentDitherL -= (bL[1] * 0.11); @@ -139,7 +139,7 @@ void DoublePaul::processDoubleReplacing(double **inputs, double **outputs, VstIn bR[9] = bR[8]; bR[8] = bR[7]; bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; - bR[1] = bR[0]; bR[0] = (rand()/(double)RAND_MAX); + bR[1] = bR[0]; bR[0] = (double(fpd)/UINT32_MAX); currentDitherR = (bR[0] * 0.061); currentDitherR -= (bR[1] * 0.11); diff --git a/plugins/WinVST/DubCenter/DubCenterProc.cpp b/plugins/WinVST/DubCenter/DubCenterProc.cpp index 197309401..b51207b1d 100755 --- a/plugins/WinVST/DubCenter/DubCenterProc.cpp +++ b/plugins/WinVST/DubCenter/DubCenterProc.cpp @@ -155,7 +155,7 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise @@ -438,7 +438,7 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt {if (WasNegative){SubOctave = !SubOctave;} WasNegative = false;} else {WasNegative = true;} //set up polarities for sub-bass version - randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randy = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandy = (1.0-randy); randy /= 2.0; //set up the noise diff --git a/plugins/WinVST/DubSub/DubSubProc.cpp b/plugins/WinVST/DubSub/DubSubProc.cpp index 81acffd7a..bdc30447d 100755 --- a/plugins/WinVST/DubSub/DubSubProc.cpp +++ b/plugins/WinVST/DubSub/DubSubProc.cpp @@ -194,11 +194,11 @@ void DubSub::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise @@ -597,11 +597,11 @@ void DubSub::processDoubleReplacing(double **inputs, double **outputs, VstInt32 else {WasNegativeR = true;} //set up polarities for sub-bass version - randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyL = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyL = (1.0-randyL); randyL /= 2.0; - randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed + randyR = (double(fpd)/UINT32_MAX)*fuzz; //0 to 1 the noise, may not be needed invrandyR = (1.0-randyR); randyR /= 2.0; //set up the noise diff --git a/plugins/WinVST/Dyno/DynoProc.cpp b/plugins/WinVST/Dyno/DynoProc.cpp index c2db122db..b6c6d71f6 100755 --- a/plugins/WinVST/Dyno/DynoProc.cpp +++ b/plugins/WinVST/Dyno/DynoProc.cpp @@ -83,12 +83,12 @@ void Dyno::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //dyno is the one that tries to raise peak energy //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Elation/ElationProc.cpp b/plugins/WinVST/Elation/ElationProc.cpp index 8df4ce867..d0e0ad4ce 100755 --- a/plugins/WinVST/Elation/ElationProc.cpp +++ b/plugins/WinVST/Elation/ElationProc.cpp @@ -258,12 +258,12 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; @@ -538,23 +538,23 @@ void Elation::processDoubleReplacing(double **inputs, double **outputs, VstInt32 flip = !flip; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleL*(1-randy))+(lastSampleL*randy))*wet)+(drySampleL*(1.0-wet))) * outlevel; lastSampleL = inputSampleL; inputSampleL = outputSample; - randy = ((rand()/(double)RAND_MAX)*0.054); + randy = ((double(fpd)/UINT32_MAX)*0.054); outputSample = ((((inputSampleR*(1-randy))+(lastSampleR*randy))*wet)+(drySampleR*(1.0-wet))) * outlevel; lastSampleR = inputSampleR; inputSampleR = outputSample; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Facet/FacetProc.cpp b/plugins/WinVST/Facet/FacetProc.cpp index 85af36f42..e237d9252 100755 --- a/plugins/WinVST/Facet/FacetProc.cpp +++ b/plugins/WinVST/Facet/FacetProc.cpp @@ -103,12 +103,12 @@ void Facet::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Focus/FocusProc.cpp b/plugins/WinVST/Focus/FocusProc.cpp index fd7624e72..a5f0ead84 100755 --- a/plugins/WinVST/Focus/FocusProc.cpp +++ b/plugins/WinVST/Focus/FocusProc.cpp @@ -265,12 +265,12 @@ void Focus::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/FromTape/FromTapeProc.cpp b/plugins/WinVST/FromTape/FromTapeProc.cpp index 5e8aca68a..46bc5759b 100755 --- a/plugins/WinVST/FromTape/FromTapeProc.cpp +++ b/plugins/WinVST/FromTape/FromTapeProc.cpp @@ -55,7 +55,7 @@ void FromTape::processReplacing(float **inputs, float **outputs, VstInt32 sample inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section @@ -252,7 +252,7 @@ void FromTape::processDoubleReplacing(double **inputs, double **outputs, VstInt3 inputSampleR *= inputgain; } - randy = (rand()/(double)RAND_MAX) * SoftenControl; //for soften + randy = (double(fpd)/UINT32_MAX) * SoftenControl; //for soften invrandy = (1.0-randy); randy /= 2.0; //we've set up so that we dial in the amount of the alt sections (in pairs) with invrandy being the source section diff --git a/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp b/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp index 06ebe4bae..d5d446136 100755 --- a/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp +++ b/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp @@ -623,12 +623,12 @@ void GlitchShifter::processDoubleReplacing(double **inputs, double **outputs, Vs //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Gringer/GringerProc.cpp b/plugins/WinVST/Gringer/GringerProc.cpp index b59800001..2dc2a26fe 100755 --- a/plugins/WinVST/Gringer/GringerProc.cpp +++ b/plugins/WinVST/Gringer/GringerProc.cpp @@ -219,12 +219,12 @@ void Gringer::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //amplitude aspect //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Highpass2/Highpass2Proc.cpp b/plugins/WinVST/Highpass2/Highpass2Proc.cpp index e87194339..b66aa6d31 100755 --- a/plugins/WinVST/Highpass2/Highpass2Proc.cpp +++ b/plugins/WinVST/Highpass2/Highpass2Proc.cpp @@ -261,12 +261,12 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Infrasonic/InfrasonicProc.cpp b/plugins/WinVST/Infrasonic/InfrasonicProc.cpp index 653fac502..a530eeb65 100755 --- a/plugins/WinVST/Infrasonic/InfrasonicProc.cpp +++ b/plugins/WinVST/Infrasonic/InfrasonicProc.cpp @@ -209,12 +209,12 @@ void Infrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Interstage/InterstageProc.cpp b/plugins/WinVST/Interstage/InterstageProc.cpp index 2707bd744..ab0efc435 100755 --- a/plugins/WinVST/Interstage/InterstageProc.cpp +++ b/plugins/WinVST/Interstage/InterstageProc.cpp @@ -163,12 +163,12 @@ void Interstage::processDoubleReplacing(double **inputs, double **outputs, VstIn lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/IronOxide5/IronOxide5Proc.cpp b/plugins/WinVST/IronOxide5/IronOxide5Proc.cpp index a79d2d315..ebffe6e53 100755 --- a/plugins/WinVST/IronOxide5/IronOxide5Proc.cpp +++ b/plugins/WinVST/IronOxide5/IronOxide5Proc.cpp @@ -76,7 +76,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -347,7 +347,7 @@ void IronOxide5::processReplacing(float **inputs, float **outputs, VstInt32 samp else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); @@ -471,7 +471,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn drySampleL = inputSampleL; drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); //part of flutter section //now we've got a random flutter, so we're messing with the pitch before tape effects go on if (fstoredcount < 0 || fstoredcount > 30) {fstoredcount = 30;} @@ -742,7 +742,7 @@ void IronOxide5::processDoubleReplacing(double **inputs, double **outputs, VstIn else inputSampleR = -bridgerectifierR; //second stage of overdrive to prevent overs and allow bloody loud extremeness - randy = (0.55 + tempRandy + ((rand()/(double)RAND_MAX)*tempRandy))*noise; //0 to 2 + randy = (0.55 + tempRandy + ((double(fpd)/UINT32_MAX)*tempRandy))*noise; //0 to 2 inputSampleL *= (1.0 - randy); inputSampleL += (prevInputSampleL*randy); diff --git a/plugins/WinVST/Isolator/IsolatorProc.cpp b/plugins/WinVST/Isolator/IsolatorProc.cpp index 4f7178a86..0f756ee6e 100755 --- a/plugins/WinVST/Isolator/IsolatorProc.cpp +++ b/plugins/WinVST/Isolator/IsolatorProc.cpp @@ -229,12 +229,12 @@ void Isolator::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp b/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp index 1bed77696..8e27a2379 100755 --- a/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp +++ b/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp @@ -262,12 +262,12 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 fpFlip = !fpFlip; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Luxor/LuxorProc.cpp b/plugins/WinVST/Luxor/LuxorProc.cpp index 89c8487ba..f6ef00f03 100755 --- a/plugins/WinVST/Luxor/LuxorProc.cpp +++ b/plugins/WinVST/Luxor/LuxorProc.cpp @@ -160,11 +160,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -341,22 +341,22 @@ void Luxor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.031); + randy = ((double(fpd)/UINT32_MAX)*0.031); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/MoNoam/MoNoamProc.cpp b/plugins/WinVST/MoNoam/MoNoamProc.cpp index c7835d557..a1ca2768d 100755 --- a/plugins/WinVST/MoNoam/MoNoamProc.cpp +++ b/plugins/WinVST/MoNoam/MoNoamProc.cpp @@ -91,12 +91,12 @@ void MoNoam::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (processing == kBYPASS) {inputSampleL = *in1; inputSampleR = *in2;} //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Mojo/MojoProc.cpp b/plugins/WinVST/Mojo/MojoProc.cpp index 2597aae9e..e29ef01b9 100755 --- a/plugins/WinVST/Mojo/MojoProc.cpp +++ b/plugins/WinVST/Mojo/MojoProc.cpp @@ -83,12 +83,12 @@ void Mojo::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //mojo is the one that flattens WAAAAY out very softly before wavefolding //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/NaturalizeDither/NaturalizeDitherProc.cpp b/plugins/WinVST/NaturalizeDither/NaturalizeDitherProc.cpp index ffc731e21..8325a9f0e 100755 --- a/plugins/WinVST/NaturalizeDither/NaturalizeDitherProc.cpp +++ b/plugins/WinVST/NaturalizeDither/NaturalizeDitherProc.cpp @@ -36,11 +36,11 @@ void NaturalizeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); @@ -234,11 +234,11 @@ void NaturalizeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleL > 0) inputSampleL += (0.3333333333); if (inputSampleL < 0) inputSampleL -= (0.3333333333); - inputSampleL += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleL += (double(fpd)/UINT32_MAX)*0.6666666666; if (inputSampleR > 0) inputSampleR += (0.3333333333); if (inputSampleR < 0) inputSampleR -= (0.3333333333); - inputSampleR += (rand()/(double)RAND_MAX)*0.6666666666; + inputSampleR += (double(fpd)/UINT32_MAX)*0.6666666666; //begin L benfordize = floor(inputSampleL); diff --git a/plugins/WinVST/Neverland/NeverlandProc.cpp b/plugins/WinVST/Neverland/NeverlandProc.cpp index 02dcb04b7..babded715 100755 --- a/plugins/WinVST/Neverland/NeverlandProc.cpp +++ b/plugins/WinVST/Neverland/NeverlandProc.cpp @@ -156,11 +156,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -332,22 +332,22 @@ void Neverland::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR += (bR[33] * (0.00555223929714115 - (0.00030319367948553*fabs(bR[33])))); //we apply the first samples of the Neve impulse- dynamically adjusted. } - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.034); + randy = ((double(fpd)/UINT32_MAX)*0.034); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Nikola/NikolaProc.cpp b/plugins/WinVST/Nikola/NikolaProc.cpp index 3c049ce59..86e5285a6 100755 --- a/plugins/WinVST/Nikola/NikolaProc.cpp +++ b/plugins/WinVST/Nikola/NikolaProc.cpp @@ -2028,12 +2028,12 @@ void Nikola::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/NodeDither/NodeDitherProc.cpp b/plugins/WinVST/NodeDither/NodeDitherProc.cpp index 50f3e85f9..f934c763f 100755 --- a/plugins/WinVST/NodeDither/NodeDitherProc.cpp +++ b/plugins/WinVST/NodeDither/NodeDitherProc.cpp @@ -43,10 +43,10 @@ void NodeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { @@ -117,10 +117,10 @@ void NodeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn if (gcount < 0 || gcount > 2450) {gcount = 2450;} - currentDitherL = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleR += currentDitherR; if (phase == 1) { diff --git a/plugins/WinVST/Noise/NoiseProc.cpp b/plugins/WinVST/Noise/NoiseProc.cpp index 82d67fde1..bc268c0ff 100755 --- a/plugins/WinVST/Noise/NoiseProc.cpp +++ b/plugins/WinVST/Noise/NoiseProc.cpp @@ -118,12 +118,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -134,12 +134,12 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -173,10 +173,10 @@ void Noise::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { @@ -388,12 +388,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeL 1.0) surgeL = 1.0; } else { - surgeL -= ((rand()/(double)RAND_MAX)*(surgeL-fabs(inputSampleL))*decay); + surgeL -= ((double(fpd)/UINT32_MAX)*(surgeL-fabs(inputSampleL))*decay); if (surgeL < 0.0) surgeL = 0.0; } @@ -404,12 +404,12 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s if (surgeR 1.0) surgeR = 1.0; } else { - surgeR -= ((rand()/(double)RAND_MAX)*(surgeR-fabs(inputSampleR))*decay); + surgeR -= ((double(fpd)/UINT32_MAX)*(surgeR-fabs(inputSampleR))*decay); if (surgeR < 0.0) surgeR = 0.0; } @@ -443,10 +443,10 @@ void Noise::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); if (filterflip) { diff --git a/plugins/WinVST/PaulDither/PaulDitherProc.cpp b/plugins/WinVST/PaulDither/PaulDitherProc.cpp index 476bfd332..b7e2b2fb9 100755 --- a/plugins/WinVST/PaulDither/PaulDitherProc.cpp +++ b/plugins/WinVST/PaulDither/PaulDitherProc.cpp @@ -42,8 +42,8 @@ void PaulDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -114,8 +114,8 @@ void PaulDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; diff --git a/plugins/WinVST/PaulWide/PaulWideProc.cpp b/plugins/WinVST/PaulWide/PaulWideProc.cpp index 13cd58f79..fe0e52a9a 100644 --- a/plugins/WinVST/PaulWide/PaulWideProc.cpp +++ b/plugins/WinVST/PaulWide/PaulWideProc.cpp @@ -46,34 +46,34 @@ void PaulWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; @@ -134,34 +134,34 @@ void PaulWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //away from the previous one - this gives you the triangular PDF and the //filtering in one go :-) - double currentDither = (rand()/(double)RAND_MAX); + double currentDither = (double(fpd)/UINT32_MAX); double ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; //TPDF: two 0-1 random noises - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); double ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherR = currentDither; ditherR -= previousDitherR; previousDitherR = currentDither; } if (fabs(ditherL-ditherR) < 0.5) { - currentDither = (rand()/(double)RAND_MAX); + currentDither = (double(fpd)/UINT32_MAX); ditherL = currentDither; ditherL -= previousDitherL; previousDitherL = currentDither; diff --git a/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp b/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp index d7d4af84c..794da2b65 100755 --- a/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp +++ b/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp @@ -267,12 +267,12 @@ void PeaksOnly::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR *= 0.63679; //scale it to 0dB output at full blast //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp b/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp index 5d8a7d157..3865d3bfc 100755 --- a/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp +++ b/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp @@ -18339,12 +18339,12 @@ void PocketVerbs::processDoubleReplacing(double **inputs, double **outputs, VstI //here we combine the tanks with the dry signal //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Podcast/PodcastProc.cpp b/plugins/WinVST/Podcast/PodcastProc.cpp index a6bd88d45..48f864776 100755 --- a/plugins/WinVST/Podcast/PodcastProc.cpp +++ b/plugins/WinVST/Podcast/PodcastProc.cpp @@ -307,12 +307,12 @@ void Podcast::processDoubleReplacing(double **inputs, double **outputs, VstInt32 if (inputSampleR < -0.999) inputSampleR = -0.999; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp b/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp index 2f306c079..c13b4ef04 100644 --- a/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp +++ b/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp @@ -640,12 +640,12 @@ void PodcastDeluxe::processDoubleReplacing(double **inputs, double **outputs, Vs //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp b/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp index 4b637c3ff..88eb14def 100755 --- a/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp +++ b/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp @@ -127,12 +127,12 @@ void PowerSag2::processDoubleReplacing(double **inputs, double **outputs, VstInt inputSampleR = drySampleR - (difference * wet); //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Precious/PreciousProc.cpp b/plugins/WinVST/Precious/PreciousProc.cpp index a2de05c32..189a324a9 100755 --- a/plugins/WinVST/Precious/PreciousProc.cpp +++ b/plugins/WinVST/Precious/PreciousProc.cpp @@ -158,11 +158,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; @@ -337,22 +337,22 @@ void Precious::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //otherwise we leave it untouched by the overdrive stuff - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleL = ((inputSampleL*(1-randy))+(lastSampleL*randy)) * outlevel; lastSampleL = inputSampleL; - randy = ((rand()/(double)RAND_MAX)*0.017); + randy = ((double(fpd)/UINT32_MAX)*0.017); inputSampleR = ((inputSampleR*(1-randy))+(lastSampleR*randy)) * outlevel; lastSampleR = inputSampleR; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/PurestAir/PurestAirProc.cpp b/plugins/WinVST/PurestAir/PurestAirProc.cpp index d2df18951..a4efee935 100755 --- a/plugins/WinVST/PurestAir/PurestAirProc.cpp +++ b/plugins/WinVST/PurestAir/PurestAirProc.cpp @@ -199,12 +199,12 @@ void PurestAir::processDoubleReplacing(double **inputs, double **outputs, VstInt } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Recurve/RecurveProc.cpp b/plugins/WinVST/Recurve/RecurveProc.cpp index 1b56af4a1..376e84f7f 100755 --- a/plugins/WinVST/Recurve/RecurveProc.cpp +++ b/plugins/WinVST/Recurve/RecurveProc.cpp @@ -99,12 +99,12 @@ void Recurve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //iron bar so people can play with this as a loudenator //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Remap/RemapProc.cpp b/plugins/WinVST/Remap/RemapProc.cpp index 32bb5b9e6..f715824c8 100755 --- a/plugins/WinVST/Remap/RemapProc.cpp +++ b/plugins/WinVST/Remap/RemapProc.cpp @@ -137,12 +137,12 @@ void Remap::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/ResEQ/ResEQProc.cpp b/plugins/WinVST/ResEQ/ResEQProc.cpp index 22c389843..e11603657 100644 --- a/plugins/WinVST/ResEQ/ResEQProc.cpp +++ b/plugins/WinVST/ResEQ/ResEQProc.cpp @@ -579,12 +579,12 @@ void ResEQ::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Slew3/Slew3Proc.cpp b/plugins/WinVST/Slew3/Slew3Proc.cpp index 297a4f6e3..295ab21c6 100755 --- a/plugins/WinVST/Slew3/Slew3Proc.cpp +++ b/plugins/WinVST/Slew3/Slew3Proc.cpp @@ -135,12 +135,12 @@ void Slew3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s //end R //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Smooth/SmoothProc.cpp b/plugins/WinVST/Smooth/SmoothProc.cpp index 9d532987c..24d9c46f1 100755 --- a/plugins/WinVST/Smooth/SmoothProc.cpp +++ b/plugins/WinVST/Smooth/SmoothProc.cpp @@ -293,12 +293,12 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/SoftGate/SoftGateProc.cpp b/plugins/WinVST/SoftGate/SoftGateProc.cpp index f08b9563c..9d97f9297 100755 --- a/plugins/WinVST/SoftGate/SoftGateProc.cpp +++ b/plugins/WinVST/SoftGate/SoftGateProc.cpp @@ -127,12 +127,12 @@ void SoftGate::processDoubleReplacing(double **inputs, double **outputs, VstInt3 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/SpatializeDither/SpatializeDitherProc.cpp b/plugins/WinVST/SpatializeDither/SpatializeDitherProc.cpp index bf9da7ef7..8e4a75591 100755 --- a/plugins/WinVST/SpatializeDither/SpatializeDitherProc.cpp +++ b/plugins/WinVST/SpatializeDither/SpatializeDitherProc.cpp @@ -51,7 +51,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -65,7 +65,7 @@ void SpatializeDither::processReplacing(float **inputs, float **outputs, VstInt3 //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err @@ -142,7 +142,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, if (inputSampleR < 0) inputSampleR -= 0.383; //adjusting to permit more information drug outta the noisefloor - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrL*omegaConstant; //include err absSample = fabs(inputSampleL); contingentErrL = absSample - floor(absSample); //get next err @@ -156,7 +156,7 @@ void SpatializeDither::processDoubleReplacing(double **inputs, double **outputs, //Contingent Dither inputSampleL = floor(inputSampleL); - contingentRnd = (((rand()/(double)RAND_MAX)+(rand()/(double)RAND_MAX))-1.0) * randyConstant; //produce TPDF dist, scale + contingentRnd = (((double(fpd)/UINT32_MAX)+(double(fpd)/UINT32_MAX))-1.0) * randyConstant; //produce TPDF dist, scale contingentRnd -= contingentErrR*omegaConstant; //include err absSample = fabs(inputSampleR); contingentErrR = absSample - floor(absSample); //get next err diff --git a/plugins/WinVST/TPDFDither/TPDFDitherProc.cpp b/plugins/WinVST/TPDFDither/TPDFDitherProc.cpp index e51504299..6d333a4a0 100755 --- a/plugins/WinVST/TPDFDither/TPDFDitherProc.cpp +++ b/plugins/WinVST/TPDFDither/TPDFDitherProc.cpp @@ -42,11 +42,11 @@ void TPDFDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); @@ -100,11 +100,11 @@ void TPDFDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL -= 1.0; inputSampleR -= 1.0; - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); - inputSampleL += (rand()/(double)RAND_MAX); - inputSampleR += (rand()/(double)RAND_MAX); + inputSampleL += (double(fpd)/UINT32_MAX); + inputSampleR += (double(fpd)/UINT32_MAX); inputSampleL = floor(inputSampleL); inputSampleR = floor(inputSampleR); diff --git a/plugins/WinVST/TPDFWide/TPDFWideProc.cpp b/plugins/WinVST/TPDFWide/TPDFWideProc.cpp index 45b831dac..3d63de4e4 100644 --- a/plugins/WinVST/TPDFWide/TPDFWideProc.cpp +++ b/plugins/WinVST/TPDFWide/TPDFWideProc.cpp @@ -40,31 +40,31 @@ void TPDFWide::processReplacing(float **inputs, float **outputs, VstInt32 sample //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); @@ -116,31 +116,31 @@ void TPDFWide::processDoubleReplacing(double **inputs, double **outputs, VstInt3 //0-1 is now one bit, now we dither double ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises double ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); //TPDF: two 0-1 random noises if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherR = -1.0; - ditherR += (rand()/(double)RAND_MAX); - ditherR += (rand()/(double)RAND_MAX); + ditherR += (double(fpd)/UINT32_MAX); + ditherR += (double(fpd)/UINT32_MAX); } if (fabs(ditherL-ditherR) < 0.5) { ditherL = -1.0; - ditherL += (rand()/(double)RAND_MAX); - ditherL += (rand()/(double)RAND_MAX); + ditherL += (double(fpd)/UINT32_MAX); + ditherL += (double(fpd)/UINT32_MAX); } inputSampleL = floor(inputSampleL+ditherL); diff --git a/plugins/WinVST/Tape/TapeProc.cpp b/plugins/WinVST/Tape/TapeProc.cpp index 2f26675ed..ea73fea27 100755 --- a/plugins/WinVST/Tape/TapeProc.cpp +++ b/plugins/WinVST/Tape/TapeProc.cpp @@ -553,12 +553,12 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa //final iron bar //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/TapeDither/TapeDitherProc.cpp b/plugins/WinVST/TapeDither/TapeDitherProc.cpp index 4bf9003fd..988bdc18a 100755 --- a/plugins/WinVST/TapeDither/TapeDitherProc.cpp +++ b/plugins/WinVST/TapeDither/TapeDitherProc.cpp @@ -41,8 +41,8 @@ void TapeDither::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; @@ -110,8 +110,8 @@ void TapeDither::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - currentDitherL = (rand()/(double)RAND_MAX); - currentDitherR = (rand()/(double)RAND_MAX); + currentDitherL = (double(fpd)/UINT32_MAX); + currentDitherR = (double(fpd)/UINT32_MAX); inputSampleL += currentDitherL; inputSampleR += currentDitherR; diff --git a/plugins/WinVST/ToTape5/ToTape5Proc.cpp b/plugins/WinVST/ToTape5/ToTape5Proc.cpp index 504bbc829..840dbd28c 100755 --- a/plugins/WinVST/ToTape5/ToTape5Proc.cpp +++ b/plugins/WinVST/ToTape5/ToTape5Proc.cpp @@ -77,7 +77,7 @@ void ToTape5::processReplacing(float **inputs, float **outputs, VstInt32 sampleF drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; @@ -406,7 +406,7 @@ void ToTape5::processDoubleReplacing(double **inputs, double **outputs, VstInt32 drySampleR = inputSampleR; - flutterrandy = (rand()/(double)RAND_MAX); + flutterrandy = (double(fpd)/UINT32_MAX); randy = flutterrandy * tempRandy; //for soften invrandy = (1.0-randy); randy /= 2.0; diff --git a/plugins/WinVST/ToTape6/ToTape6Proc.cpp b/plugins/WinVST/ToTape6/ToTape6Proc.cpp index f3a052485..3cfc521fd 100755 --- a/plugins/WinVST/ToTape6/ToTape6Proc.cpp +++ b/plugins/WinVST/ToTape6/ToTape6Proc.cpp @@ -657,12 +657,12 @@ void ToTape6::processDoubleReplacing(double **inputs, double **outputs, VstInt32 } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/TremoSquare/TremoSquareProc.cpp b/plugins/WinVST/TremoSquare/TremoSquareProc.cpp index ec7d1b27b..574ce7f45 100755 --- a/plugins/WinVST/TremoSquare/TremoSquareProc.cpp +++ b/plugins/WinVST/TremoSquare/TremoSquareProc.cpp @@ -127,12 +127,12 @@ void TremoSquare::processDoubleReplacing(double **inputs, double **outputs, VstI } //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp b/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp index ef7721197..c04e6dfed 100755 --- a/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp +++ b/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp @@ -627,12 +627,12 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst //this plugin can throw insane outputs so we'll put in a hard clip //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp b/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp index 96ee029c7..5e3a29ced 100755 --- a/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp +++ b/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp @@ -209,12 +209,12 @@ void Ultrasonic::processDoubleReplacing(double **inputs, double **outputs, VstIn biquadE[12] = biquadE[11]; biquadE[11] = inputSampleR; inputSampleR = outSampleR; biquadE[14] = biquadE[13]; biquadE[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp b/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp index cbce9a998..5c9d08a86 100644 --- a/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp +++ b/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp @@ -91,12 +91,12 @@ void UltrasonicLite::processDoubleReplacing(double **inputs, double **outputs, V biquadA[12] = biquadA[11]; biquadA[11] = inputSampleR; inputSampleR = outSampleR; biquadA[14] = biquadA[13]; biquadA[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp b/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp index 8e3cb8250..cecb2a823 100644 --- a/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp +++ b/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp @@ -129,12 +129,12 @@ void UltrasonicMed::processDoubleReplacing(double **inputs, double **outputs, Vs biquadB[12] = biquadB[11]; biquadB[11] = inputSampleR; inputSampleR = outSampleR; biquadB[14] = biquadB[13]; biquadB[13] = inputSampleR; //DF1 right //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/Vibrato/VibratoProc.cpp b/plugins/WinVST/Vibrato/VibratoProc.cpp index f196e90e2..ce0795b37 100755 --- a/plugins/WinVST/Vibrato/VibratoProc.cpp +++ b/plugins/WinVST/Vibrato/VibratoProc.cpp @@ -185,12 +185,12 @@ void Vibrato::processDoubleReplacing(double **inputs, double **outputs, VstInt32 //Inv/Dry/Wet control //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/VinylDither/VinylDitherProc.cpp b/plugins/WinVST/VinylDither/VinylDitherProc.cpp index d73eece2d..4ea1c3053 100755 --- a/plugins/WinVST/VinylDither/VinylDitherProc.cpp +++ b/plugins/WinVST/VinylDither/VinylDitherProc.cpp @@ -41,37 +41,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -87,37 +87,37 @@ void VinylDither::processReplacing(float **inputs, float **outputs, VstInt32 sam inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; @@ -180,37 +180,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleR *= scaleFactor; //0-1 is now one bit, now we dither - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsL[0] += absSample; nsL[0] /= 2; absSample -= nsL[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[1] += absSample; nsL[1] /= 2; absSample -= nsL[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[2] += absSample; nsL[2] /= 2; absSample -= nsL[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[3] += absSample; nsL[3] /= 2; absSample -= nsL[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[4] += absSample; nsL[4] /= 2; absSample -= nsL[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[5] += absSample; nsL[5] /= 2; absSample -= nsL[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[6] += absSample; nsL[6] /= 2; absSample -= nsL[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[7] += absSample; nsL[7] /= 2; absSample -= nsL[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[8] += absSample; nsL[8] /= 2; absSample -= nsL[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[9] += absSample; nsL[9] /= 2; absSample -= nsL[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[10] += absSample; nsL[10] /= 2; absSample -= nsL[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[11] += absSample; nsL[11] /= 2; absSample -= nsL[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[12] += absSample; nsL[12] /= 2; absSample -= nsL[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[13] += absSample; nsL[13] /= 2; absSample -= nsL[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[14] += absSample; nsL[14] /= 2; absSample -= nsL[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsL[15] += absSample; nsL[15] /= 2; absSample -= nsL[15]; //install noise and then shape it absSample += inputSampleL; @@ -226,37 +226,37 @@ void VinylDither::processDoubleReplacing(double **inputs, double **outputs, VstI inputSampleL = floor(absSample); //TenNines dither L - absSample = ((rand()/(double)RAND_MAX) - 0.5); + absSample = ((double(fpd)/UINT32_MAX) - 0.5); nsR[0] += absSample; nsR[0] /= 2; absSample -= nsR[0]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[1] += absSample; nsR[1] /= 2; absSample -= nsR[1]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[2] += absSample; nsR[2] /= 2; absSample -= nsR[2]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[3] += absSample; nsR[3] /= 2; absSample -= nsR[3]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[4] += absSample; nsR[4] /= 2; absSample -= nsR[4]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[5] += absSample; nsR[5] /= 2; absSample -= nsR[5]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[6] += absSample; nsR[6] /= 2; absSample -= nsR[6]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[7] += absSample; nsR[7] /= 2; absSample -= nsR[7]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[8] += absSample; nsR[8] /= 2; absSample -= nsR[8]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[9] += absSample; nsR[9] /= 2; absSample -= nsR[9]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[10] += absSample; nsR[10] /= 2; absSample -= nsR[10]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[11] += absSample; nsR[11] /= 2; absSample -= nsR[11]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[12] += absSample; nsR[12] /= 2; absSample -= nsR[12]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[13] += absSample; nsR[13] /= 2; absSample -= nsR[13]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[14] += absSample; nsR[14] /= 2; absSample -= nsR[14]; - absSample += ((rand()/(double)RAND_MAX) - 0.5); + absSample += ((double(fpd)/UINT32_MAX) - 0.5); nsR[15] += absSample; nsR[15] /= 2; absSample -= nsR[15]; //install noise and then shape it absSample += inputSampleR; diff --git a/plugins/WinVST/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp b/plugins/WinVST/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp index dda1805dc..fd6e5bdfa 100755 --- a/plugins/WinVST/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp +++ b/plugins/WinVST/VoiceOfTheStarship/VoiceOfTheStarshipProc.cpp @@ -110,10 +110,10 @@ void VoiceOfTheStarship::processReplacing(float **inputs, float **outputs, VstIn //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) @@ -300,10 +300,10 @@ void VoiceOfTheStarship::processDoubleReplacing(double **inputs, double **output //it's a pure random walk that will generate DC. } - if (flipL) noiseAL += (rand()/(double)RAND_MAX); - else noiseAL -= (rand()/(double)RAND_MAX); - if (flipR) noiseAR += (rand()/(double)RAND_MAX); - else noiseAR -= (rand()/(double)RAND_MAX); + if (flipL) noiseAL += (double(fpd)/UINT32_MAX); + else noiseAL -= (double(fpd)/UINT32_MAX); + if (flipR) noiseAR += (double(fpd)/UINT32_MAX); + else noiseAR -= (double(fpd)/UINT32_MAX); //here's the guts of the random walk if (filterflip) diff --git a/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp b/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp index 53ecb0fff..97604cacb 100755 --- a/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp +++ b/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp @@ -195,12 +195,12 @@ void VoiceTrick::processDoubleReplacing(double **inputs, double **outputs, VstIn //Thanks to Peter Gabriel for many great examples of hit vocals recorded just like this :) //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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; diff --git a/plugins/WinVST/curve/curveProc.cpp b/plugins/WinVST/curve/curveProc.cpp index 1b607c120..56fdbfd9b 100755 --- a/plugins/WinVST/curve/curveProc.cpp +++ b/plugins/WinVST/curve/curveProc.cpp @@ -87,12 +87,12 @@ void curve::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s inputSampleR *= 2.0; //begin 64 bit stereo floating point dither - int expon; frexp((double)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); - frexp((double)inputSampleR, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //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;