From 2336d312202504019a4415ee0aea2f51083b8286 Mon Sep 17 00:00:00 2001 From: Christopher Johnson Date: Sat, 26 Feb 2022 15:52:46 -0500 Subject: [PATCH] Fussing with codebase: beware errors --- plugins/LinuxVST/src/ADT/ADT.cpp | 2 +- plugins/LinuxVST/src/ADT/ADT.h | 3 +- plugins/LinuxVST/src/ADT/ADTProc.cpp | 4 +- .../LinuxVST/src/Apicolypse/Apicolypse.cpp | 2 +- .../src/Apicolypse/ApicolypseProc.cpp | 12 +-- .../src/AtmosphereBuss/AtmosphereBussProc.cpp | 76 +---------------- .../AtmosphereChannelProc.cpp | 76 +---------------- .../LinuxVST/src/AverMatrix/AverMatrix.cpp | 2 +- .../src/AverMatrix/AverMatrixProc.cpp | 12 +-- plugins/LinuxVST/src/BassAmp/BassAmp.cpp | 2 +- plugins/LinuxVST/src/BassDrive/BassDrive.cpp | 2 +- .../LinuxVST/src/BassDrive/BassDriveProc.cpp | 12 +-- plugins/LinuxVST/src/BassKit/BassKitProc.cpp | 76 +---------------- plugins/LinuxVST/src/Baxandall/Baxandall.cpp | 2 +- .../LinuxVST/src/Baxandall/BaxandallProc.cpp | 12 +-- plugins/LinuxVST/src/Beam/Beam.cpp | 2 +- plugins/LinuxVST/src/Biquad/Biquad.cpp | 2 +- plugins/LinuxVST/src/Biquad/BiquadProc.cpp | 12 +-- plugins/LinuxVST/src/Biquad2/Biquad2.cpp | 2 +- plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp | 12 +-- .../src/BiquadDouble/BiquadDouble.cpp | 2 +- .../src/BiquadDouble/BiquadDoubleProc.cpp | 12 +-- .../src/BiquadOneHalf/BiquadOneHalf.cpp | 2 +- .../src/BiquadOneHalf/BiquadOneHalfProc.cpp | 12 +-- .../src/BiquadTriple/BiquadTriple.cpp | 2 +- .../src/BiquadTriple/BiquadTripleProc.cpp | 12 +-- .../LinuxVST/src/BitGlitter/BitGlitter.cpp | 2 +- plugins/LinuxVST/src/BitGlitter/BitGlitter.h | 3 +- .../src/BitGlitter/BitGlitterProc.cpp | 4 +- .../LinuxVST/src/BlockParty/BlockParty.cpp | 2 +- plugins/LinuxVST/src/BlockParty/BlockParty.h | 3 +- .../src/BlockParty/BlockPartyProc.cpp | 76 +---------------- .../LinuxVST/src/BrassRider/BrassRider.cpp | 2 +- .../src/BrassRider/BrassRiderProc.cpp | 84 ++----------------- .../src/BrightAmbience/BrightAmbience.cpp | 2 +- .../src/BrightAmbience/BrightAmbienceProc.cpp | 12 +-- .../src/BrightAmbience2/BrightAmbience2.cpp | 2 +- .../BrightAmbience2/BrightAmbience2Proc.cpp | 12 +-- plugins/LinuxVST/src/Calibre/Calibre.cpp | 2 +- plugins/LinuxVST/src/Calibre/CalibreProc.cpp | 12 +-- .../LinuxVST/src/Capacitor2/Capacitor2.cpp | 2 +- .../src/Capacitor2/Capacitor2Proc.cpp | 12 +-- .../LinuxVST/src/Channel5/Channel5Proc.cpp | 76 +---------------- plugins/LinuxVST/src/Channel6/Channel6.cpp | 2 +- plugins/LinuxVST/src/Channel6/Channel6.h | 3 +- .../LinuxVST/src/Channel6/Channel6Proc.cpp | 4 +- plugins/LinuxVST/src/Channel7/Channel7.cpp | 2 +- .../LinuxVST/src/Channel7/Channel7Proc.cpp | 12 +-- plugins/LinuxVST/src/Channel8/Channel8.cpp | 2 +- .../LinuxVST/src/Channel8/Channel8Proc.cpp | 12 +-- .../LinuxVST/src/ChromeOxide/ChromeOxide.cpp | 2 +- .../src/ChromeOxide/ChromeOxideProc.cpp | 12 +-- plugins/LinuxVST/src/Cider/Cider.cpp | 2 +- plugins/LinuxVST/src/Cider/CiderProc.cpp | 12 +-- plugins/LinuxVST/src/Coils/Coils.cpp | 2 +- plugins/LinuxVST/src/Coils/CoilsProc.cpp | 12 +-- plugins/LinuxVST/src/Cojones/CojonesProc.cpp | 76 +---------------- .../src/Compresaturator/Compresaturator.cpp | 2 +- .../src/Compresaturator/Compresaturator.h | 3 +- .../Compresaturator/CompresaturatorProc.cpp | 76 +---------------- .../src/Console6Buss/Console6Buss.cpp | 2 +- .../src/Console6Buss/Console6BussProc.cpp | 12 +-- .../src/Console6Channel/Console6Channel.cpp | 2 +- .../Console6Channel/Console6ChannelProc.cpp | 12 +-- plugins/LinuxVST/src/Crystal/CrystalProc.cpp | 76 +---------------- plugins/LinuxVST/src/Dark/Dark.cpp | 2 +- plugins/LinuxVST/src/DeBess/DeBess.cpp | 2 +- plugins/LinuxVST/src/DeBess/DeBessProc.cpp | 12 +-- plugins/LinuxVST/src/DeHiss/DeHiss.cpp | 2 +- plugins/LinuxVST/src/DeHiss/DeHissProc.cpp | 12 +-- plugins/LinuxVST/src/DeRez2/DeRez2.cpp | 2 +- plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp | 12 +-- .../LinuxVST/src/Deckwrecka/Deckwrecka.cpp | 2 +- .../src/Deckwrecka/DeckwreckaProc.cpp | 12 +-- .../src/DigitalBlack/DigitalBlack.cpp | 2 +- .../src/DigitalBlack/DigitalBlackProc.cpp | 12 +-- .../LinuxVST/src/Distance2/Distance2Proc.cpp | 76 +---------------- .../LinuxVST/src/Distortion/Distortion.cpp | 2 +- .../src/Distortion/DistortionProc.cpp | 16 ++-- .../LinuxVST/src/DitherFloat/DitherFloat.cpp | 2 +- .../LinuxVST/src/DubCenter/DubCenterProc.cpp | 76 +---------------- plugins/LinuxVST/src/Dyno/Dyno.cpp | 2 +- plugins/LinuxVST/src/Dyno/DynoProc.cpp | 12 +-- plugins/LinuxVST/src/Elation/Elation.cpp | 2 +- plugins/LinuxVST/src/Elation/ElationProc.cpp | 12 +-- plugins/LinuxVST/src/Energy/EnergyProc.cpp | 76 +---------------- plugins/LinuxVST/src/Facet/Facet.cpp | 2 +- plugins/LinuxVST/src/Facet/FacetProc.cpp | 12 +-- plugins/LinuxVST/src/Floor/FloorProc.cpp | 76 +---------------- plugins/LinuxVST/src/Focus/Focus.cpp | 2 +- plugins/LinuxVST/src/Focus/FocusProc.cpp | 12 +-- .../LinuxVST/src/Gatelope/GatelopeProc.cpp | 76 +---------------- .../src/GlitchShifter/GlitchShifter.cpp | 2 +- .../src/GlitchShifter/GlitchShifterProc.cpp | 12 +-- plugins/LinuxVST/src/Gringer/Gringer.cpp | 2 +- plugins/LinuxVST/src/Gringer/GringerProc.cpp | 12 +-- plugins/LinuxVST/src/Highpass2/Highpass2.cpp | 2 +- .../LinuxVST/src/Highpass2/Highpass2Proc.cpp | 84 ++----------------- plugins/LinuxVST/src/Holt/Holt.cpp | 2 +- plugins/LinuxVST/src/Holt/Holt.h | 3 +- plugins/LinuxVST/src/Holt/HoltProc.cpp | 4 +- .../LinuxVST/src/Infrasonic/Infrasonic.cpp | 2 +- .../src/Infrasonic/InfrasonicProc.cpp | 12 +-- .../LinuxVST/src/Interstage/Interstage.cpp | 2 +- .../src/Interstage/InterstageProc.cpp | 12 +-- plugins/LinuxVST/src/Isolator/Isolator.cpp | 2 +- .../LinuxVST/src/Isolator/IsolatorProc.cpp | 12 +-- plugins/LinuxVST/src/Loud/Loud.cpp | 2 +- plugins/LinuxVST/src/Loud/Loud.h | 3 +- plugins/LinuxVST/src/Loud/LoudProc.cpp | 4 +- plugins/LinuxVST/src/Lowpass2/Lowpass2.cpp | 2 +- .../LinuxVST/src/Lowpass2/Lowpass2Proc.cpp | 84 ++----------------- plugins/LinuxVST/src/Luxor/Luxor.cpp | 2 +- plugins/LinuxVST/src/Luxor/LuxorProc.cpp | 12 +-- plugins/LinuxVST/src/MV/MV.cpp | 2 +- plugins/LinuxVST/src/MV/MV.h | 3 +- plugins/LinuxVST/src/MV/MVProc.cpp | 76 +---------------- plugins/LinuxVST/src/MoNoam/MoNoam.cpp | 2 +- plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp | 12 +-- plugins/LinuxVST/src/Mojo/Mojo.cpp | 2 +- plugins/LinuxVST/src/Mojo/MojoProc.cpp | 12 +-- .../LinuxVST/src/Monitoring/Monitoring.cpp | 2 +- .../src/Monitoring/MonitoringProc.cpp | 4 +- plugins/LinuxVST/src/Neverland/Neverland.cpp | 2 +- .../LinuxVST/src/Neverland/NeverlandProc.cpp | 12 +-- plugins/LinuxVST/src/Nikola/Nikola.cpp | 2 +- plugins/LinuxVST/src/Nikola/NikolaProc.cpp | 12 +-- .../NotJustAnotherDither.cpp | 2 +- plugins/LinuxVST/src/Pafnuty/PafnutyProc.cpp | 76 +---------------- .../LinuxVST/src/PaulDither/PaulDither.cpp | 2 +- plugins/LinuxVST/src/PeaksOnly/PeaksOnly.cpp | 2 +- .../LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp | 12 +-- .../LinuxVST/src/PocketVerbs/PocketVerbs.cpp | 2 +- .../src/PocketVerbs/PocketVerbsProc.cpp | 12 +-- plugins/LinuxVST/src/Podcast/Podcast.cpp | 2 +- plugins/LinuxVST/src/Podcast/PodcastProc.cpp | 12 +-- .../src/PodcastDeluxe/PodcastDeluxe.cpp | 2 +- .../src/PodcastDeluxe/PodcastDeluxeProc.cpp | 12 +-- plugins/LinuxVST/src/Pop/Pop.cpp | 2 +- plugins/LinuxVST/src/Pop/Pop.h | 3 +- plugins/LinuxVST/src/Pop/PopProc.cpp | 4 +- plugins/LinuxVST/src/PowerSag2/PowerSag2.cpp | 2 +- .../LinuxVST/src/PowerSag2/PowerSag2Proc.cpp | 12 +-- plugins/LinuxVST/src/Precious/Precious.cpp | 2 +- .../LinuxVST/src/Precious/PreciousProc.cpp | 12 +-- plugins/LinuxVST/src/PurestAir/PurestAir.cpp | 2 +- .../LinuxVST/src/PurestAir/PurestAirProc.cpp | 12 +-- .../LinuxVST/src/PurestFade/PurestFade.cpp | 2 +- .../src/PurestFade/PurestFadeProc.cpp | 4 +- .../src/PurestSquish/PurestSquish.cpp | 2 +- .../LinuxVST/src/PurestSquish/PurestSquish.h | 3 +- .../src/PurestSquish/PurestSquishProc.cpp | 76 +---------------- .../LinuxVST/src/RawGlitters/RawGlitters.cpp | 2 +- .../LinuxVST/src/RawTimbers/RawTimbers.cpp | 2 +- plugins/LinuxVST/src/Recurve/Recurve.cpp | 2 +- plugins/LinuxVST/src/Recurve/RecurveProc.cpp | 12 +-- plugins/LinuxVST/src/Remap/Remap.cpp | 2 +- plugins/LinuxVST/src/Remap/RemapProc.cpp | 12 +-- plugins/LinuxVST/src/ResEQ/ResEQ.cpp | 2 +- plugins/LinuxVST/src/ResEQ/ResEQProc.cpp | 12 +-- plugins/LinuxVST/src/Slew3/Slew3.cpp | 2 +- plugins/LinuxVST/src/Slew3/Slew3Proc.cpp | 12 +-- plugins/LinuxVST/src/Smooth/Smooth.cpp | 2 +- plugins/LinuxVST/src/Smooth/SmoothProc.cpp | 84 ++----------------- plugins/LinuxVST/src/SoftGate/SoftGate.cpp | 2 +- .../LinuxVST/src/SoftGate/SoftGateProc.cpp | 12 +-- .../src/SpatializeDither/SpatializeDither.cpp | 2 +- plugins/LinuxVST/src/Spiral/Spiral.cpp | 2 +- plugins/LinuxVST/src/Spiral/Spiral.h | 3 +- plugins/LinuxVST/src/Spiral/SpiralProc.cpp | 4 +- plugins/LinuxVST/src/Spiral2/Spiral2.cpp | 2 +- plugins/LinuxVST/src/Spiral2/Spiral2.h | 3 +- plugins/LinuxVST/src/Spiral2/Spiral2Proc.cpp | 4 +- .../LinuxVST/src/TPDFDither/TPDFDither.cpp | 2 +- plugins/LinuxVST/src/Tape/Tape.cpp | 2 +- plugins/LinuxVST/src/Tape/TapeProc.cpp | 12 +-- .../LinuxVST/src/TapeDelay/TapeDelayProc.cpp | 76 +---------------- .../LinuxVST/src/TapeDither/TapeDither.cpp | 2 +- plugins/LinuxVST/src/TapeFat/TapeFatProc.cpp | 76 +---------------- plugins/LinuxVST/src/ToTape6/ToTape6.cpp | 2 +- plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp | 12 +-- .../LinuxVST/src/TremoSquare/TremoSquare.cpp | 2 +- .../src/TremoSquare/TremoSquareProc.cpp | 12 +-- .../src/TripleSpread/TripleSpread.cpp | 2 +- .../src/TripleSpread/TripleSpreadProc.cpp | 16 ++-- .../LinuxVST/src/Ultrasonic/Ultrasonic.cpp | 2 +- .../src/Ultrasonic/UltrasonicProc.cpp | 12 +-- .../src/UltrasonicLite/UltrasonicLiteProc.cpp | 12 +-- .../src/UltrasonicMed/UltrasonicMedProc.cpp | 12 +-- plugins/LinuxVST/src/UnBox/UnBox.cpp | 2 +- plugins/LinuxVST/src/UnBox/UnBox.h | 3 +- plugins/LinuxVST/src/UnBox/UnBoxProc.cpp | 4 +- plugins/LinuxVST/src/Vibrato/Vibrato.cpp | 2 +- plugins/LinuxVST/src/Vibrato/VibratoProc.cpp | 12 +-- .../LinuxVST/src/VinylDither/VinylDither.cpp | 2 +- .../LinuxVST/src/VoiceTrick/VoiceTrick.cpp | 2 +- .../src/VoiceTrick/VoiceTrickProc.cpp | 12 +-- plugins/LinuxVST/src/curve/curve.cpp | 2 +- plugins/LinuxVST/src/curve/curveProc.cpp | 12 +-- .../src/uLawDecode/uLawDecodeProc.cpp | 76 +---------------- plugins/MacAU/ADT/ADT.cpp | 2 +- plugins/MacAU/Apicolypse/Apicolypse.cpp | 2 +- plugins/MacAU/AverMatrix/AverMatrix.cpp | 2 +- plugins/MacAU/BassAmp/BassAmp.cpp | 2 +- plugins/MacAU/BassDrive/BassDrive.cpp | 2 +- plugins/MacAU/BassKit/BassKit.cpp | 54 +++--------- plugins/MacAU/Baxandall/Baxandall.cpp | 2 +- plugins/MacAU/Beam/Beam.cpp | 2 +- plugins/MacAU/Biquad/Biquad.cpp | 2 +- plugins/MacAU/Biquad2/Biquad2.cpp | 2 +- plugins/MacAU/BiquadDouble/BiquadDouble.cpp | 2 +- plugins/MacAU/BiquadOneHalf/BiquadOneHalf.cpp | 2 +- plugins/MacAU/BiquadStereo/BiquadStereo.cpp | 15 ++-- plugins/MacAU/BiquadTriple/BiquadTriple.cpp | 2 +- plugins/MacAU/BlockParty/BlockParty.cpp | 2 +- plugins/MacAU/BrassRider/BrassRider.cpp | 13 +-- .../MacAU/BrightAmbience/BrightAmbience.cpp | 2 +- .../MacAU/BrightAmbience2/BrightAmbience2.cpp | 15 ++-- .../MacAU/BrightAmbience3/BrightAmbience3.h | 3 +- plugins/MacAU/Calibre/Calibre.cpp | 2 +- plugins/MacAU/Capacitor2/Capacitor2.cpp | 2 +- plugins/MacAU/Channel6/Channel6.cpp | 2 +- plugins/MacAU/Channel7/Channel7.cpp | 2 +- plugins/MacAU/Channel8/Channel8.cpp | 2 +- plugins/MacAU/ChromeOxide/ChromeOxide.cpp | 2 +- plugins/MacAU/Cider/Cider.cpp | 2 +- plugins/MacAU/Coils/Coils.cpp | 2 +- .../MacAU/Compresaturator/Compresaturator.cpp | 2 +- plugins/MacAU/Console6Buss/Console6Buss.cpp | 2 +- .../MacAU/Console6Channel/Console6Channel.cpp | 2 +- plugins/MacAU/Dark/Dark.cpp | 2 +- plugins/MacAU/DeBess/DeBess.cpp | 2 +- plugins/MacAU/DeHiss/DeHiss.cpp | 2 +- plugins/MacAU/DeRez2/DeRez2.cpp | 2 +- plugins/MacAU/Deckwrecka/Deckwrecka.cpp | 2 +- plugins/MacAU/DigitalBlack/DigitalBlack.cpp | 2 +- plugins/MacAU/Distortion/Distortion.cpp | 2 +- plugins/MacAU/DitherFloat/DitherFloat.cpp | 2 +- plugins/MacAU/DubCenter/DubCenter.cpp | 54 +++--------- plugins/MacAU/DubCenter/DubCenter.h | 3 +- plugins/MacAU/Dyno/Dyno.cpp | 2 +- plugins/MacAU/EdIsDim/EdIsDim.h | 3 +- plugins/MacAU/Elation/Elation.cpp | 2 +- plugins/MacAU/EveryTrim/EveryTrim.cpp | 16 ++-- plugins/MacAU/EveryTrim/EveryTrim.h | 3 +- plugins/MacAU/Facet/Facet.cpp | 2 +- plugins/MacAU/Focus/Focus.cpp | 2 +- plugins/MacAU/Galactic/Galactic.h | 3 +- plugins/MacAU/Gatelinked/Gatelinked.cpp | 54 +++--------- plugins/MacAU/GlitchShifter/GlitchShifter.cpp | 2 +- plugins/MacAU/Golem/Golem.cpp | 16 ++-- plugins/MacAU/Golem/Golem.h | 3 +- plugins/MacAU/Gringer/Gringer.cpp | 2 +- plugins/MacAU/HermeTrim/HermeTrim.cpp | 16 ++-- plugins/MacAU/HermeTrim/HermeTrim.h | 3 +- plugins/MacAU/Highpass2/Highpass2.cpp | 2 +- plugins/MacAU/Holt/Holt.cpp | 2 +- plugins/MacAU/Infrasonic/Infrasonic.cpp | 2 +- plugins/MacAU/Interstage/Interstage.cpp | 2 +- plugins/MacAU/Isolator/Isolator.cpp | 2 +- plugins/MacAU/Logical4/Logical4.cpp | 16 ++-- plugins/MacAU/Loud/Loud.cpp | 2 +- plugins/MacAU/Lowpass2/Lowpass2.cpp | 2 +- plugins/MacAU/Luxor/Luxor.cpp | 2 +- plugins/MacAU/MV/MV.cpp | 2 +- plugins/MacAU/MidSide/MidSide.h | 3 +- plugins/MacAU/MoNoam/MoNoam.cpp | 14 ++-- plugins/MacAU/Mojo/Mojo.cpp | 2 +- plugins/MacAU/Monitoring/Monitoring.cpp | 6 +- plugins/MacAU/Monitoring2/Monitoring2.h | 3 +- plugins/MacAU/Neverland/Neverland.cpp | 2 +- plugins/MacAU/Nikola/Nikola.cpp | 2 +- .../MacAU/NonlinearSpace/NonlinearSpace.cpp | 16 ++-- .../NotJustAnotherDither.cpp | 2 +- plugins/MacAU/PaulDither/PaulDither.cpp | 2 +- plugins/MacAU/PeaksOnly/PeaksOnly.cpp | 2 +- plugins/MacAU/PocketVerbs/PocketVerbs.cpp | 2 +- plugins/MacAU/Podcast/Podcast.cpp | 2 +- plugins/MacAU/PodcastDeluxe/PodcastDeluxe.cpp | 2 +- plugins/MacAU/Pop/Pop.cpp | 2 +- plugins/MacAU/PowerSag2/PowerSag2.cpp | 2 +- plugins/MacAU/Precious/Precious.cpp | 2 +- plugins/MacAU/Pressure4/Pressure4.cpp | 16 ++-- plugins/MacAU/Pressure5/Pressure5.h | 3 +- plugins/MacAU/PurestAir/PurestAir.cpp | 2 +- plugins/MacAU/PurestFade/PurestFade.cpp | 2 +- plugins/MacAU/PurestSquish/PurestSquish.cpp | 2 +- plugins/MacAU/Pyewacket/Pyewacket.cpp | 16 ++-- plugins/MacAU/Pyewacket/Pyewacket.h | 3 +- plugins/MacAU/RawGlitters/RawGlitters.cpp | 2 +- plugins/MacAU/RawTimbers/RawTimbers.cpp | 2 +- plugins/MacAU/Recurve/Recurve.cpp | 14 ++-- plugins/MacAU/Remap/Remap.cpp | 2 +- plugins/MacAU/ResEQ/ResEQ.cpp | 2 +- plugins/MacAU/SideDull/SideDull.cpp | 16 ++-- plugins/MacAU/SideDull/SideDull.h | 3 +- plugins/MacAU/Sidepass/Sidepass.cpp | 16 ++-- plugins/MacAU/Sidepass/Sidepass.h | 3 +- plugins/MacAU/Slew3/Slew3.cpp | 2 +- plugins/MacAU/Smooth/Smooth.cpp | 2 +- plugins/MacAU/SoftGate/SoftGate.cpp | 14 ++-- plugins/MacAU/SoftGateMono/SoftGateMono.cpp | 2 +- .../SpatializeDither/SpatializeDither.cpp | 2 +- plugins/MacAU/Spiral/Spiral.cpp | 2 +- plugins/MacAU/Spiral2/Spiral2.cpp | 2 +- plugins/MacAU/Srsly/Srsly.h | 3 +- plugins/MacAU/Srsly2/Srsly2.h | 3 +- plugins/MacAU/StereoChorus/StereoChorus.h | 3 +- plugins/MacAU/StereoFX/StereoFX.cpp | 16 ++-- plugins/MacAU/StereoFX/StereoFX.h | 3 +- plugins/MacAU/Surge/Surge.cpp | 16 ++-- plugins/MacAU/Surge/Surge.h | 3 +- plugins/MacAU/SurgeTide/SurgeTide.cpp | 16 ++-- plugins/MacAU/TPDFDither/TPDFDither.cpp | 2 +- plugins/MacAU/Tape/Tape.cpp | 2 +- plugins/MacAU/TapeDither/TapeDither.cpp | 2 +- plugins/MacAU/Thunder/Thunder.cpp | 16 ++-- plugins/MacAU/Thunder/Thunder.h | 3 +- plugins/MacAU/ToTape6/ToTape6.cpp | 2 +- plugins/MacAU/ToVinyl4/ToVinyl4.cpp | 16 ++-- plugins/MacAU/TremoSquare/TremoSquare.cpp | 2 +- plugins/MacAU/TripleSpread/TripleSpread.cpp | 14 ++-- plugins/MacAU/Ultrasonic/Ultrasonic.cpp | 2 +- plugins/MacAU/UnBox/UnBox.cpp | 2 +- plugins/MacAU/Vibrato/Vibrato.cpp | 2 +- plugins/MacAU/VinylDither/VinylDither.cpp | 2 +- plugins/MacAU/VoiceTrick/VoiceTrick.cpp | 14 ++-- plugins/MacAU/Wider/Wider.cpp | 16 ++-- plugins/MacAU/Wider/Wider.h | 3 +- plugins/MacAU/curve/curve.cpp | 15 ++-- plugins/MacAU/curvemono/curvemono.cpp | 2 +- plugins/MacSignedAU/ADT/ADT.cpp | 2 +- plugins/MacSignedAU/Apicolypse/Apicolypse.cpp | 2 +- plugins/MacSignedAU/AutoPan/AutoPan.h | 3 +- plugins/MacSignedAU/AverMatrix/AverMatrix.cpp | 2 +- plugins/MacSignedAU/BassAmp/BassAmp.cpp | 2 +- plugins/MacSignedAU/BassDrive/BassDrive.cpp | 2 +- plugins/MacSignedAU/BassKit/BassKit.cpp | 54 +++--------- plugins/MacSignedAU/BassKit/BassKit.h | 3 +- plugins/MacSignedAU/Baxandall/Baxandall.cpp | 2 +- plugins/MacSignedAU/Beam/Beam.cpp | 2 +- plugins/MacSignedAU/Biquad/Biquad.cpp | 2 +- plugins/MacSignedAU/Biquad2/Biquad2.cpp | 2 +- .../MacSignedAU/BiquadDouble/BiquadDouble.cpp | 2 +- .../BiquadOneHalf/BiquadOneHalf.cpp | 2 +- .../MacSignedAU/BiquadStereo/BiquadStereo.cpp | 14 ++-- .../MacSignedAU/BiquadTriple/BiquadTriple.cpp | 2 +- plugins/MacSignedAU/BlockParty/BlockParty.cpp | 2 +- plugins/MacSignedAU/BrassRider/BrassRider.cpp | 12 +-- .../BrightAmbience/BrightAmbience.cpp | 2 +- .../BrightAmbience2/BrightAmbience2.cpp | 14 ++-- .../BrightAmbience3/BrightAmbience3.h | 3 +- plugins/MacSignedAU/Calibre/Calibre.cpp | 2 +- plugins/MacSignedAU/Capacitor2/Capacitor2.cpp | 2 +- plugins/MacSignedAU/Channel6/Channel6.cpp | 2 +- plugins/MacSignedAU/Channel7/Channel7.cpp | 2 +- plugins/MacSignedAU/Channel8/Channel8.cpp | 2 +- .../MacSignedAU/ChromeOxide/ChromeOxide.cpp | 2 +- plugins/MacSignedAU/Cider/Cider.cpp | 2 +- plugins/MacSignedAU/Coils/Coils.cpp | 2 +- .../Compresaturator/Compresaturator.cpp | 2 +- .../MacSignedAU/Console6Buss/Console6Buss.cpp | 2 +- .../Console6Channel/Console6Channel.cpp | 2 +- plugins/MacSignedAU/Dark/Dark.cpp | 2 +- plugins/MacSignedAU/DeBess/DeBess.cpp | 2 +- plugins/MacSignedAU/DeHiss/DeHiss.cpp | 2 +- plugins/MacSignedAU/DeRez2/DeRez2.cpp | 2 +- plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp | 2 +- .../MacSignedAU/DigitalBlack/DigitalBlack.cpp | 2 +- plugins/MacSignedAU/Distortion/Distortion.cpp | 2 +- .../MacSignedAU/DitherFloat/DitherFloat.cpp | 2 +- plugins/MacSignedAU/DubCenter/DubCenter.cpp | 54 +++--------- plugins/MacSignedAU/DubCenter/DubCenter.h | 3 +- plugins/MacSignedAU/Dyno/Dyno.cpp | 2 +- plugins/MacSignedAU/EdIsDim/EdIsDim.h | 3 +- plugins/MacSignedAU/Elation/Elation.cpp | 2 +- plugins/MacSignedAU/EveryTrim/EveryTrim.cpp | 16 ++-- plugins/MacSignedAU/EveryTrim/EveryTrim.h | 3 +- plugins/MacSignedAU/Facet/Facet.cpp | 2 +- plugins/MacSignedAU/Focus/Focus.cpp | 2 +- plugins/MacSignedAU/Galactic/Galactic.h | 3 +- plugins/MacSignedAU/Gatelinked/Gatelinked.cpp | 54 +++--------- .../GlitchShifter/GlitchShifter.cpp | 2 +- plugins/MacSignedAU/Golem/Golem.cpp | 16 ++-- plugins/MacSignedAU/Golem/Golem.h | 3 +- plugins/MacSignedAU/Gringer/Gringer.cpp | 2 +- plugins/MacSignedAU/HermeTrim/HermeTrim.cpp | 16 ++-- plugins/MacSignedAU/HermeTrim/HermeTrim.h | 3 +- plugins/MacSignedAU/Highpass2/Highpass2.cpp | 2 +- plugins/MacSignedAU/Holt/Holt.cpp | 2 +- plugins/MacSignedAU/Infrasonic/Infrasonic.cpp | 2 +- plugins/MacSignedAU/Interstage/Interstage.cpp | 2 +- plugins/MacSignedAU/Isolator/Isolator.cpp | 2 +- plugins/MacSignedAU/Logical4/Logical4.cpp | 16 ++-- plugins/MacSignedAU/Loud/Loud.cpp | 2 +- plugins/MacSignedAU/Lowpass2/Lowpass2.cpp | 2 +- plugins/MacSignedAU/Luxor/Luxor.cpp | 2 +- plugins/MacSignedAU/MV/MV.cpp | 2 +- plugins/MacSignedAU/MidSide/MidSide.h | 3 +- plugins/MacSignedAU/MoNoam/MoNoam.cpp | 14 ++-- plugins/MacSignedAU/Mojo/Mojo.cpp | 2 +- plugins/MacSignedAU/Monitoring/Monitoring.cpp | 6 +- plugins/MacSignedAU/Monitoring2/Monitoring2.h | 3 +- plugins/MacSignedAU/Neverland/Neverland.cpp | 2 +- plugins/MacSignedAU/Nikola/Nikola.cpp | 2 +- .../NonlinearSpace/NonlinearSpace.cpp | 16 ++-- .../NotJustAnotherDither.cpp | 2 +- plugins/MacSignedAU/PaulDither/PaulDither.cpp | 2 +- plugins/MacSignedAU/PeaksOnly/PeaksOnly.cpp | 2 +- .../MacSignedAU/PocketVerbs/PocketVerbs.cpp | 2 +- plugins/MacSignedAU/Podcast/Podcast.cpp | 2 +- .../PodcastDeluxe/PodcastDeluxe.cpp | 2 +- plugins/MacSignedAU/Pop/Pop.cpp | 2 +- plugins/MacSignedAU/PowerSag2/PowerSag2.cpp | 2 +- plugins/MacSignedAU/Precious/Precious.cpp | 2 +- plugins/MacSignedAU/Pressure4/Pressure4.cpp | 16 ++-- plugins/MacSignedAU/Pressure5/Pressure5.h | 3 +- plugins/MacSignedAU/PurestAir/PurestAir.cpp | 2 +- plugins/MacSignedAU/PurestFade/PurestFade.cpp | 2 +- .../MacSignedAU/PurestSquish/PurestSquish.cpp | 2 +- plugins/MacSignedAU/Pyewacket/Pyewacket.cpp | 16 ++-- plugins/MacSignedAU/Pyewacket/Pyewacket.h | 3 +- .../MacSignedAU/RawGlitters/RawGlitters.cpp | 2 +- plugins/MacSignedAU/RawTimbers/RawTimbers.cpp | 2 +- plugins/MacSignedAU/Recurve/Recurve.cpp | 14 ++-- plugins/MacSignedAU/Remap/Remap.cpp | 2 +- plugins/MacSignedAU/ResEQ/ResEQ.cpp | 2 +- plugins/MacSignedAU/SideDull/SideDull.cpp | 16 ++-- plugins/MacSignedAU/SideDull/SideDull.h | 3 +- plugins/MacSignedAU/Sidepass/Sidepass.cpp | 16 ++-- plugins/MacSignedAU/Sidepass/Sidepass.h | 3 +- plugins/MacSignedAU/Slew3/Slew3.cpp | 2 +- plugins/MacSignedAU/Smooth/Smooth.cpp | 2 +- plugins/MacSignedAU/SoftGate/SoftGate.cpp | 14 ++-- .../MacSignedAU/SoftGateMono/SoftGateMono.cpp | 2 +- .../SpatializeDither/SpatializeDither.cpp | 2 +- plugins/MacSignedAU/Spiral/Spiral.cpp | 2 +- plugins/MacSignedAU/Spiral2/Spiral2.cpp | 2 +- .../MacSignedAU/StereoChorus/StereoChorus.h | 3 +- plugins/MacSignedAU/StereoFX/StereoFX.cpp | 16 ++-- plugins/MacSignedAU/StereoFX/StereoFX.h | 3 +- plugins/MacSignedAU/Surge/Surge.cpp | 16 ++-- plugins/MacSignedAU/Surge/Surge.h | 3 +- plugins/MacSignedAU/SurgeTide/SurgeTide.cpp | 16 ++-- plugins/MacSignedAU/TPDFDither/TPDFDither.cpp | 2 +- plugins/MacSignedAU/Tape/Tape.cpp | 2 +- plugins/MacSignedAU/TapeDither/TapeDither.cpp | 2 +- plugins/MacSignedAU/Thunder/Thunder.cpp | 16 ++-- plugins/MacSignedAU/Thunder/Thunder.h | 3 +- plugins/MacSignedAU/ToTape6/ToTape6.cpp | 2 +- plugins/MacSignedAU/ToVinyl4/ToVinyl4.cpp | 16 ++-- .../MacSignedAU/TremoSquare/TremoSquare.cpp | 2 +- .../MacSignedAU/TripleSpread/TripleSpread.cpp | 14 ++-- plugins/MacSignedAU/Ultrasonic/Ultrasonic.cpp | 2 +- plugins/MacSignedAU/UnBox/UnBox.cpp | 2 +- plugins/MacSignedAU/Vibrato/Vibrato.cpp | 2 +- .../MacSignedAU/VinylDither/VinylDither.cpp | 2 +- plugins/MacSignedAU/VoiceTrick/VoiceTrick.cpp | 14 ++-- plugins/MacSignedAU/Wider/Wider.cpp | 16 ++-- plugins/MacSignedAU/Wider/Wider.h | 3 +- plugins/MacSignedAU/curve/curve.cpp | 14 ++-- plugins/MacSignedAU/curvemono/curvemono.cpp | 2 +- plugins/MacSignedVST/ADT/source/ADT.cpp | 2 +- plugins/MacSignedVST/ADT/source/ADT.h | 3 +- plugins/MacSignedVST/ADT/source/ADTProc.cpp | 4 +- .../Apicolypse/source/Apicolypse.cpp | 2 +- .../Apicolypse/source/ApicolypseProc.cpp | 12 +-- .../source/AtmosphereBussProc.cpp | 76 +---------------- .../source/AtmosphereChannelProc.cpp | 76 +---------------- .../AverMatrix/source/AverMatrix.cpp | 2 +- .../AverMatrix/source/AverMatrixProc.cpp | 12 +-- .../MacSignedVST/BassAmp/source/BassAmp.cpp | 2 +- .../BassDrive/source/BassDrive.cpp | 2 +- .../BassDrive/source/BassDriveProc.cpp | 12 +-- .../BassKit/source/BassKitProc.cpp | 76 +---------------- .../Baxandall/source/Baxandall.cpp | 2 +- .../Baxandall/source/BaxandallProc.cpp | 12 +-- plugins/MacSignedVST/Beam/source/Beam.cpp | 2 +- plugins/MacSignedVST/Biquad/source/Biquad.cpp | 2 +- .../MacSignedVST/Biquad/source/BiquadProc.cpp | 12 +-- .../MacSignedVST/Biquad2/source/Biquad2.cpp | 2 +- .../Biquad2/source/Biquad2Proc.cpp | 12 +-- .../BiquadDouble/source/BiquadDouble.cpp | 2 +- .../BiquadDouble/source/BiquadDoubleProc.cpp | 12 +-- .../BiquadOneHalf/source/BiquadOneHalf.cpp | 2 +- .../source/BiquadOneHalfProc.cpp | 12 +-- .../BiquadTriple/source/BiquadTriple.cpp | 2 +- .../BiquadTriple/source/BiquadTripleProc.cpp | 12 +-- .../BitGlitter/source/BitGlitter.cpp | 2 +- .../BitGlitter/source/BitGlitter.h | 3 +- .../BitGlitter/source/BitGlitterProc.cpp | 4 +- .../BlockParty/source/BlockParty.cpp | 2 +- .../BlockParty/source/BlockParty.h | 3 +- .../BlockParty/source/BlockPartyProc.cpp | 76 +---------------- .../BrassRider/source/BrassRider.cpp | 2 +- .../BrassRider/source/BrassRiderProc.cpp | 84 ++----------------- .../BrightAmbience/source/BrightAmbience.cpp | 2 +- .../source/BrightAmbienceProc.cpp | 12 +-- .../source/BrightAmbience2.cpp | 2 +- .../source/BrightAmbience2Proc.cpp | 12 +-- .../MacSignedVST/Calibre/source/Calibre.cpp | 2 +- .../Calibre/source/CalibreProc.cpp | 12 +-- .../Capacitor2/source/Capacitor2.cpp | 2 +- .../Capacitor2/source/Capacitor2Proc.cpp | 12 +-- .../Channel5/source/Channel5Proc.cpp | 76 +---------------- .../MacSignedVST/Channel6/source/Channel6.cpp | 2 +- .../MacSignedVST/Channel6/source/Channel6.h | 3 +- .../Channel6/source/Channel6Proc.cpp | 4 +- .../MacSignedVST/Channel7/source/Channel7.cpp | 2 +- .../Channel7/source/Channel7Proc.cpp | 12 +-- .../MacSignedVST/Channel8/source/Channel8.cpp | 2 +- .../Channel8/source/Channel8Proc.cpp | 12 +-- .../ChromeOxide/source/ChromeOxide.cpp | 2 +- .../ChromeOxide/source/ChromeOxideProc.cpp | 12 +-- plugins/MacSignedVST/Cider/source/Cider.cpp | 2 +- .../MacSignedVST/Cider/source/CiderProc.cpp | 12 +-- plugins/MacSignedVST/Coils/source/Coils.cpp | 2 +- .../MacSignedVST/Coils/source/CoilsProc.cpp | 12 +-- .../Cojones/source/CojonesProc.cpp | 76 +---------------- .../source/Compresaturator.cpp | 2 +- .../Compresaturator/source/Compresaturator.h | 3 +- .../source/CompresaturatorProc.cpp | 76 +---------------- .../Console6Buss/source/Console6Buss.cpp | 2 +- .../Console6Buss/source/Console6BussProc.cpp | 12 +-- .../source/Console6Channel.cpp | 2 +- .../source/Console6ChannelProc.cpp | 12 +-- .../Crystal/source/CrystalProc.cpp | 76 +---------------- plugins/MacSignedVST/Dark/source/Dark.cpp | 2 +- plugins/MacSignedVST/DeBess/source/DeBess.cpp | 2 +- .../MacSignedVST/DeBess/source/DeBessProc.cpp | 12 +-- plugins/MacSignedVST/DeHiss/source/DeHiss.cpp | 2 +- .../MacSignedVST/DeHiss/source/DeHissProc.cpp | 12 +-- plugins/MacSignedVST/DeRez2/source/DeRez2.cpp | 2 +- .../MacSignedVST/DeRez2/source/DeRez2Proc.cpp | 12 +-- .../Deckwrecka/source/Deckwrecka.cpp | 2 +- .../Deckwrecka/source/DeckwreckaProc.cpp | 12 +-- .../DigitalBlack/source/DigitalBlack.cpp | 2 +- .../DigitalBlack/source/DigitalBlackProc.cpp | 12 +-- .../Distance2/source/Distance2Proc.cpp | 76 +---------------- .../Distortion/source/Distortion.cpp | 2 +- .../Distortion/source/DistortionProc.cpp | 16 ++-- .../DitherFloat/source/DitherFloat.cpp | 2 +- .../DubCenter/source/DubCenterProc.cpp | 76 +---------------- plugins/MacSignedVST/Dyno/source/Dyno.cpp | 2 +- plugins/MacSignedVST/Dyno/source/DynoProc.cpp | 12 +-- .../MacSignedVST/Elation/source/Elation.cpp | 2 +- .../Elation/source/ElationProc.cpp | 12 +-- .../MacSignedVST/Energy/source/EnergyProc.cpp | 76 +---------------- plugins/MacSignedVST/Facet/source/Facet.cpp | 2 +- .../MacSignedVST/Facet/source/FacetProc.cpp | 12 +-- .../MacSignedVST/Floor/source/FloorProc.cpp | 76 +---------------- plugins/MacSignedVST/Focus/source/Focus.cpp | 2 +- .../MacSignedVST/Focus/source/FocusProc.cpp | 12 +-- .../Gatelope/source/GatelopeProc.cpp | 76 +---------------- .../GlitchShifter/source/GlitchShifter.cpp | 2 +- .../source/GlitchShifterProc.cpp | 12 +-- .../MacSignedVST/Gringer/source/Gringer.cpp | 2 +- .../Gringer/source/GringerProc.cpp | 12 +-- .../Highpass2/source/Highpass2.cpp | 2 +- .../Highpass2/source/Highpass2Proc.cpp | 84 ++----------------- plugins/MacSignedVST/Holt/source/Holt.cpp | 2 +- plugins/MacSignedVST/Holt/source/Holt.h | 3 +- plugins/MacSignedVST/Holt/source/HoltProc.cpp | 4 +- .../Infrasonic/source/Infrasonic.cpp | 2 +- .../Infrasonic/source/InfrasonicProc.cpp | 12 +-- .../Interstage/source/Interstage.cpp | 2 +- .../Interstage/source/InterstageProc.cpp | 12 +-- .../MacSignedVST/Isolator/source/Isolator.cpp | 2 +- .../Isolator/source/IsolatorProc.cpp | 12 +-- plugins/MacSignedVST/Loud/source/Loud.cpp | 2 +- plugins/MacSignedVST/Loud/source/Loud.h | 3 +- plugins/MacSignedVST/Loud/source/LoudProc.cpp | 4 +- .../MacSignedVST/Lowpass2/source/Lowpass2.cpp | 2 +- .../Lowpass2/source/Lowpass2Proc.cpp | 84 ++----------------- plugins/MacSignedVST/Luxor/source/Luxor.cpp | 2 +- .../MacSignedVST/Luxor/source/LuxorProc.cpp | 12 +-- plugins/MacSignedVST/MV/source/MV.cpp | 2 +- plugins/MacSignedVST/MV/source/MV.h | 3 +- plugins/MacSignedVST/MV/source/MVProc.cpp | 76 +---------------- plugins/MacSignedVST/MoNoam/source/MoNoam.cpp | 2 +- .../MacSignedVST/MoNoam/source/MoNoamProc.cpp | 12 +-- plugins/MacSignedVST/Mojo/source/Mojo.cpp | 2 +- plugins/MacSignedVST/Mojo/source/MojoProc.cpp | 12 +-- .../Monitoring/source/Monitoring.cpp | 2 +- .../Monitoring/source/MonitoringProc.cpp | 4 +- .../Neverland/source/Neverland.cpp | 2 +- .../Neverland/source/NeverlandProc.cpp | 12 +-- plugins/MacSignedVST/Nikola/source/Nikola.cpp | 2 +- .../MacSignedVST/Nikola/source/NikolaProc.cpp | 12 +-- .../source/NotJustAnotherDither.cpp | 2 +- .../Pafnuty/source/PafnutyProc.cpp | 76 +---------------- .../PaulDither/source/PaulDither.cpp | 2 +- .../PeaksOnly/source/PeaksOnly.cpp | 2 +- .../PeaksOnly/source/PeaksOnlyProc.cpp | 12 +-- .../PocketVerbs/source/PocketVerbs.cpp | 2 +- .../PocketVerbs/source/PocketVerbsProc.cpp | 12 +-- .../MacSignedVST/Podcast/source/Podcast.cpp | 2 +- .../Podcast/source/PodcastProc.cpp | 12 +-- .../PodcastDeluxe/source/PodcastDeluxe.cpp | 2 +- .../source/PodcastDeluxeProc.cpp | 12 +-- plugins/MacSignedVST/Pop/source/Pop.cpp | 2 +- plugins/MacSignedVST/Pop/source/Pop.h | 3 +- plugins/MacSignedVST/Pop/source/PopProc.cpp | 4 +- .../PowerSag2/source/PowerSag2.cpp | 2 +- .../PowerSag2/source/PowerSag2Proc.cpp | 12 +-- .../MacSignedVST/Precious/source/Precious.cpp | 2 +- .../Precious/source/PreciousProc.cpp | 12 +-- .../PurestAir/source/PurestAir.cpp | 2 +- .../PurestAir/source/PurestAirProc.cpp | 12 +-- .../PurestFade/source/PurestFade.cpp | 2 +- .../PurestFade/source/PurestFadeProc.cpp | 4 +- .../PurestSquish/source/PurestSquish.cpp | 2 +- .../PurestSquish/source/PurestSquish.h | 3 +- .../PurestSquish/source/PurestSquishProc.cpp | 76 +---------------- .../RawGlitters/source/RawGlitters.cpp | 2 +- .../RawTimbers/source/RawTimbers.cpp | 2 +- .../MacSignedVST/Recurve/source/Recurve.cpp | 2 +- .../Recurve/source/RecurveProc.cpp | 12 +-- plugins/MacSignedVST/Remap/source/Remap.cpp | 2 +- .../MacSignedVST/Remap/source/RemapProc.cpp | 12 +-- plugins/MacSignedVST/ResEQ/source/ResEQ.cpp | 2 +- .../MacSignedVST/ResEQ/source/ResEQProc.cpp | 12 +-- plugins/MacSignedVST/Slew3/source/Slew3.cpp | 2 +- .../MacSignedVST/Slew3/source/Slew3Proc.cpp | 12 +-- plugins/MacSignedVST/Smooth/source/Smooth.cpp | 2 +- .../MacSignedVST/Smooth/source/SmoothProc.cpp | 84 ++----------------- .../MacSignedVST/SoftGate/source/SoftGate.cpp | 2 +- .../SoftGate/source/SoftGateProc.cpp | 12 +-- .../source/SpatializeDither.cpp | 2 +- plugins/MacSignedVST/Spiral/source/Spiral.cpp | 2 +- plugins/MacSignedVST/Spiral/source/Spiral.h | 3 +- .../MacSignedVST/Spiral/source/SpiralProc.cpp | 4 +- .../MacSignedVST/Spiral2/source/Spiral2.cpp | 2 +- plugins/MacSignedVST/Spiral2/source/Spiral2.h | 3 +- .../Spiral2/source/Spiral2Proc.cpp | 4 +- .../TPDFDither/source/TPDFDither.cpp | 2 +- plugins/MacSignedVST/Tape/source/Tape.cpp | 2 +- plugins/MacSignedVST/Tape/source/TapeProc.cpp | 12 +-- .../TapeDelay/source/TapeDelayProc.cpp | 76 +---------------- .../TapeDither/source/TapeDither.cpp | 2 +- .../TapeFat/source/TapeFatProc.cpp | 76 +---------------- .../MacSignedVST/ToTape6/source/ToTape6.cpp | 2 +- .../ToTape6/source/ToTape6Proc.cpp | 12 +-- .../TremoSquare/source/TremoSquare.cpp | 2 +- .../TremoSquare/source/TremoSquareProc.cpp | 12 +-- .../TripleSpread/source/TripleSpread.cpp | 2 +- .../TripleSpread/source/TripleSpreadProc.cpp | 16 ++-- .../Ultrasonic/source/Ultrasonic.cpp | 2 +- .../Ultrasonic/source/UltrasonicProc.cpp | 12 +-- .../source/UltrasonicLiteProc.cpp | 12 +-- .../source/UltrasonicMedProc.cpp | 12 +-- plugins/MacSignedVST/UnBox/source/UnBox.cpp | 2 +- plugins/MacSignedVST/UnBox/source/UnBox.h | 3 +- .../MacSignedVST/UnBox/source/UnBoxProc.cpp | 4 +- .../MacSignedVST/Vibrato/source/Vibrato.cpp | 2 +- .../Vibrato/source/VibratoProc.cpp | 12 +-- .../VinylDither/source/VinylDither.cpp | 2 +- .../VoiceTrick/source/VoiceTrick.cpp | 2 +- .../VoiceTrick/source/VoiceTrickProc.cpp | 12 +-- plugins/MacSignedVST/curve/source/curve.cpp | 2 +- .../MacSignedVST/curve/source/curveProc.cpp | 12 +-- .../uLawDecode/source/uLawDecodeProc.cpp | 76 +---------------- plugins/MacVST/ADT/source/ADT.cpp | 2 +- plugins/MacVST/ADT/source/ADT.h | 3 +- plugins/MacVST/ADT/source/ADTProc.cpp | 4 +- .../MacVST/Apicolypse/source/Apicolypse.cpp | 2 +- .../Apicolypse/source/ApicolypseProc.cpp | 12 +-- .../source/AtmosphereBussProc.cpp | 76 +---------------- .../source/AtmosphereChannelProc.cpp | 76 +---------------- .../MacVST/AverMatrix/source/AverMatrix.cpp | 2 +- .../AverMatrix/source/AverMatrixProc.cpp | 12 +-- plugins/MacVST/BassAmp/source/BassAmp.cpp | 2 +- plugins/MacVST/BassDrive/source/BassDrive.cpp | 2 +- .../MacVST/BassDrive/source/BassDriveProc.cpp | 12 +-- plugins/MacVST/BassKit/source/BassKitProc.cpp | 76 +---------------- plugins/MacVST/Baxandall/source/Baxandall.cpp | 2 +- .../MacVST/Baxandall/source/BaxandallProc.cpp | 12 +-- plugins/MacVST/Beam/source/Beam.cpp | 2 +- plugins/MacVST/Biquad/source/Biquad.cpp | 2 +- plugins/MacVST/Biquad/source/BiquadProc.cpp | 12 +-- plugins/MacVST/Biquad2/source/Biquad2.cpp | 2 +- plugins/MacVST/Biquad2/source/Biquad2Proc.cpp | 12 +-- .../BiquadDouble/source/BiquadDouble.cpp | 2 +- .../BiquadDouble/source/BiquadDoubleProc.cpp | 12 +-- .../BiquadOneHalf/source/BiquadOneHalf.cpp | 2 +- .../source/BiquadOneHalfProc.cpp | 12 +-- .../BiquadTriple/source/BiquadTriple.cpp | 2 +- .../BiquadTriple/source/BiquadTripleProc.cpp | 12 +-- .../MacVST/BitGlitter/source/BitGlitter.cpp | 2 +- plugins/MacVST/BitGlitter/source/BitGlitter.h | 3 +- .../BitGlitter/source/BitGlitterProc.cpp | 4 +- .../MacVST/BlockParty/source/BlockParty.cpp | 2 +- plugins/MacVST/BlockParty/source/BlockParty.h | 3 +- .../BlockParty/source/BlockPartyProc.cpp | 76 +---------------- .../MacVST/BrassRider/source/BrassRider.cpp | 2 +- .../BrassRider/source/BrassRiderProc.cpp | 84 ++----------------- .../BrightAmbience/source/BrightAmbience.cpp | 2 +- .../source/BrightAmbienceProc.cpp | 12 +-- .../source/BrightAmbience2.cpp | 2 +- .../source/BrightAmbience2Proc.cpp | 12 +-- plugins/MacVST/Calibre/source/Calibre.cpp | 2 +- plugins/MacVST/Calibre/source/CalibreProc.cpp | 12 +-- .../MacVST/Capacitor2/source/Capacitor2.cpp | 2 +- .../Capacitor2/source/Capacitor2Proc.cpp | 12 +-- .../MacVST/Channel5/source/Channel5Proc.cpp | 76 +---------------- plugins/MacVST/Channel6/source/Channel6.cpp | 2 +- plugins/MacVST/Channel6/source/Channel6.h | 3 +- .../MacVST/Channel6/source/Channel6Proc.cpp | 4 +- plugins/MacVST/Channel7/source/Channel7.cpp | 2 +- .../MacVST/Channel7/source/Channel7Proc.cpp | 12 +-- plugins/MacVST/Channel8/source/Channel8.cpp | 2 +- .../MacVST/Channel8/source/Channel8Proc.cpp | 12 +-- .../MacVST/ChromeOxide/source/ChromeOxide.cpp | 2 +- .../ChromeOxide/source/ChromeOxideProc.cpp | 12 +-- plugins/MacVST/Cider/source/Cider.cpp | 2 +- plugins/MacVST/Cider/source/CiderProc.cpp | 12 +-- plugins/MacVST/Coils/source/Coils.cpp | 2 +- plugins/MacVST/Coils/source/CoilsProc.cpp | 12 +-- plugins/MacVST/Cojones/source/CojonesProc.cpp | 76 +---------------- .../source/Compresaturator.cpp | 2 +- .../Compresaturator/source/Compresaturator.h | 3 +- .../source/CompresaturatorProc.cpp | 76 +---------------- .../Console6Buss/source/Console6Buss.cpp | 2 +- .../Console6Buss/source/Console6BussProc.cpp | 12 +-- .../source/Console6Channel.cpp | 2 +- .../source/Console6ChannelProc.cpp | 12 +-- plugins/MacVST/Crystal/source/CrystalProc.cpp | 76 +---------------- plugins/MacVST/Dark/source/Dark.cpp | 2 +- plugins/MacVST/DeBess/source/DeBess.cpp | 2 +- plugins/MacVST/DeBess/source/DeBessProc.cpp | 12 +-- plugins/MacVST/DeHiss/source/DeHiss.cpp | 2 +- plugins/MacVST/DeHiss/source/DeHissProc.cpp | 12 +-- plugins/MacVST/DeRez2/source/DeRez2.cpp | 2 +- plugins/MacVST/DeRez2/source/DeRez2Proc.cpp | 12 +-- .../MacVST/Deckwrecka/source/Deckwrecka.cpp | 2 +- .../Deckwrecka/source/DeckwreckaProc.cpp | 12 +-- .../DigitalBlack/source/DigitalBlack.cpp | 2 +- .../DigitalBlack/source/DigitalBlackProc.cpp | 12 +-- .../MacVST/Distance2/source/Distance2Proc.cpp | 76 +---------------- .../MacVST/Distortion/source/Distortion.cpp | 2 +- .../Distortion/source/DistortionProc.cpp | 16 ++-- .../MacVST/DitherFloat/source/DitherFloat.cpp | 2 +- .../MacVST/DubCenter/source/DubCenterProc.cpp | 76 +---------------- plugins/MacVST/Dyno/source/Dyno.cpp | 2 +- plugins/MacVST/Dyno/source/DynoProc.cpp | 12 +-- plugins/MacVST/Elation/source/Elation.cpp | 2 +- plugins/MacVST/Elation/source/ElationProc.cpp | 12 +-- plugins/MacVST/Energy/source/EnergyProc.cpp | 76 +---------------- plugins/MacVST/Facet/source/Facet.cpp | 2 +- plugins/MacVST/Facet/source/FacetProc.cpp | 12 +-- plugins/MacVST/Floor/source/FloorProc.cpp | 76 +---------------- plugins/MacVST/Focus/source/Focus.cpp | 2 +- plugins/MacVST/Focus/source/FocusProc.cpp | 12 +-- .../MacVST/Gatelope/source/GatelopeProc.cpp | 76 +---------------- .../GlitchShifter/source/GlitchShifter.cpp | 2 +- .../source/GlitchShifterProc.cpp | 12 +-- plugins/MacVST/Gringer/source/Gringer.cpp | 2 +- plugins/MacVST/Gringer/source/GringerProc.cpp | 12 +-- plugins/MacVST/Highpass2/source/Highpass2.cpp | 2 +- .../MacVST/Highpass2/source/Highpass2Proc.cpp | 84 ++----------------- plugins/MacVST/Holt/source/Holt.cpp | 2 +- plugins/MacVST/Holt/source/Holt.h | 3 +- plugins/MacVST/Holt/source/HoltProc.cpp | 4 +- .../MacVST/Infrasonic/source/Infrasonic.cpp | 2 +- .../Infrasonic/source/InfrasonicProc.cpp | 12 +-- .../MacVST/Interstage/source/Interstage.cpp | 2 +- .../Interstage/source/InterstageProc.cpp | 12 +-- plugins/MacVST/Isolator/source/Isolator.cpp | 2 +- .../MacVST/Isolator/source/IsolatorProc.cpp | 12 +-- plugins/MacVST/Loud/source/Loud.cpp | 2 +- plugins/MacVST/Loud/source/Loud.h | 3 +- plugins/MacVST/Loud/source/LoudProc.cpp | 4 +- plugins/MacVST/Lowpass2/source/Lowpass2.cpp | 2 +- .../MacVST/Lowpass2/source/Lowpass2Proc.cpp | 84 ++----------------- plugins/MacVST/Luxor/source/Luxor.cpp | 2 +- plugins/MacVST/Luxor/source/LuxorProc.cpp | 12 +-- plugins/MacVST/MV/source/MV.cpp | 2 +- plugins/MacVST/MV/source/MV.h | 3 +- plugins/MacVST/MV/source/MVProc.cpp | 76 +---------------- plugins/MacVST/MoNoam/source/MoNoam.cpp | 2 +- plugins/MacVST/MoNoam/source/MoNoamProc.cpp | 12 +-- plugins/MacVST/Mojo/source/Mojo.cpp | 2 +- plugins/MacVST/Mojo/source/MojoProc.cpp | 12 +-- .../MacVST/Monitoring/source/Monitoring.cpp | 2 +- .../Monitoring/source/MonitoringProc.cpp | 4 +- plugins/MacVST/Neverland/source/Neverland.cpp | 2 +- .../MacVST/Neverland/source/NeverlandProc.cpp | 12 +-- plugins/MacVST/Nikola/source/Nikola.cpp | 2 +- plugins/MacVST/Nikola/source/NikolaProc.cpp | 12 +-- .../source/NotJustAnotherDither.cpp | 2 +- plugins/MacVST/Pafnuty/source/PafnutyProc.cpp | 76 +---------------- .../MacVST/PaulDither/source/PaulDither.cpp | 2 +- plugins/MacVST/PeaksOnly/source/PeaksOnly.cpp | 2 +- .../MacVST/PeaksOnly/source/PeaksOnlyProc.cpp | 12 +-- .../MacVST/PocketVerbs/source/PocketVerbs.cpp | 2 +- .../PocketVerbs/source/PocketVerbsProc.cpp | 12 +-- plugins/MacVST/Podcast/source/Podcast.cpp | 2 +- plugins/MacVST/Podcast/source/PodcastProc.cpp | 12 +-- .../PodcastDeluxe/source/PodcastDeluxe.cpp | 2 +- .../source/PodcastDeluxeProc.cpp | 12 +-- plugins/MacVST/Pop/source/Pop.cpp | 2 +- plugins/MacVST/Pop/source/Pop.h | 3 +- plugins/MacVST/Pop/source/PopProc.cpp | 4 +- plugins/MacVST/PowerSag2/source/PowerSag2.cpp | 2 +- .../MacVST/PowerSag2/source/PowerSag2Proc.cpp | 12 +-- plugins/MacVST/Precious/source/Precious.cpp | 2 +- .../MacVST/Precious/source/PreciousProc.cpp | 12 +-- plugins/MacVST/PurestAir/source/PurestAir.cpp | 2 +- .../MacVST/PurestAir/source/PurestAirProc.cpp | 12 +-- .../MacVST/PurestFade/source/PurestFade.cpp | 2 +- .../PurestFade/source/PurestFadeProc.cpp | 4 +- .../PurestSquish/source/PurestSquish.cpp | 2 +- .../MacVST/PurestSquish/source/PurestSquish.h | 3 +- .../PurestSquish/source/PurestSquishProc.cpp | 76 +---------------- .../MacVST/RawGlitters/source/RawGlitters.cpp | 2 +- .../MacVST/RawTimbers/source/RawTimbers.cpp | 2 +- plugins/MacVST/Recurve/source/Recurve.cpp | 2 +- plugins/MacVST/Recurve/source/RecurveProc.cpp | 12 +-- plugins/MacVST/Remap/source/Remap.cpp | 2 +- plugins/MacVST/Remap/source/RemapProc.cpp | 12 +-- plugins/MacVST/ResEQ/source/ResEQ.cpp | 2 +- plugins/MacVST/ResEQ/source/ResEQProc.cpp | 12 +-- plugins/MacVST/Slew3/source/Slew3.cpp | 2 +- plugins/MacVST/Slew3/source/Slew3Proc.cpp | 12 +-- plugins/MacVST/Smooth/source/Smooth.cpp | 2 +- plugins/MacVST/Smooth/source/SmoothProc.cpp | 84 ++----------------- plugins/MacVST/SoftGate/source/SoftGate.cpp | 2 +- .../MacVST/SoftGate/source/SoftGateProc.cpp | 12 +-- .../source/SpatializeDither.cpp | 2 +- plugins/MacVST/Spiral/source/Spiral.cpp | 2 +- plugins/MacVST/Spiral/source/Spiral.h | 3 +- plugins/MacVST/Spiral/source/SpiralProc.cpp | 4 +- plugins/MacVST/Spiral2/source/Spiral2.cpp | 2 +- plugins/MacVST/Spiral2/source/Spiral2.h | 3 +- plugins/MacVST/Spiral2/source/Spiral2Proc.cpp | 4 +- .../MacVST/TPDFDither/source/TPDFDither.cpp | 2 +- plugins/MacVST/Tape/source/Tape.cpp | 2 +- plugins/MacVST/Tape/source/TapeProc.cpp | 12 +-- .../MacVST/TapeDelay/source/TapeDelayProc.cpp | 76 +---------------- .../MacVST/TapeDither/source/TapeDither.cpp | 2 +- plugins/MacVST/TapeFat/source/TapeFatProc.cpp | 76 +---------------- plugins/MacVST/ToTape6/source/ToTape6.cpp | 2 +- plugins/MacVST/ToTape6/source/ToTape6Proc.cpp | 12 +-- .../MacVST/TremoSquare/source/TremoSquare.cpp | 2 +- .../TremoSquare/source/TremoSquareProc.cpp | 12 +-- .../TripleSpread/source/TripleSpread.cpp | 2 +- .../TripleSpread/source/TripleSpreadProc.cpp | 16 ++-- .../MacVST/Ultrasonic/source/Ultrasonic.cpp | 2 +- .../Ultrasonic/source/UltrasonicProc.cpp | 12 +-- .../source/UltrasonicLiteProc.cpp | 12 +-- .../source/UltrasonicMedProc.cpp | 12 +-- plugins/MacVST/UnBox/source/UnBox.cpp | 2 +- plugins/MacVST/UnBox/source/UnBox.h | 3 +- plugins/MacVST/UnBox/source/UnBoxProc.cpp | 4 +- plugins/MacVST/Vibrato/source/Vibrato.cpp | 2 +- plugins/MacVST/Vibrato/source/VibratoProc.cpp | 12 +-- .../MacVST/VinylDither/source/VinylDither.cpp | 2 +- .../MacVST/VoiceTrick/source/VoiceTrick.cpp | 2 +- .../VoiceTrick/source/VoiceTrickProc.cpp | 12 +-- plugins/MacVST/curve/source/curve.cpp | 2 +- plugins/MacVST/curve/source/curveProc.cpp | 12 +-- .../uLawDecode/source/uLawDecodeProc.cpp | 76 +---------------- plugins/WinVST/ADT/ADT.cpp | 2 +- plugins/WinVST/ADT/ADT.h | 3 +- plugins/WinVST/ADT/ADTProc.cpp | 4 +- plugins/WinVST/Apicolypse/Apicolypse.cpp | 2 +- plugins/WinVST/Apicolypse/ApicolypseProc.cpp | 12 +-- .../AtmosphereBuss/AtmosphereBussProc.cpp | 76 +---------------- .../AtmosphereChannelProc.cpp | 76 +---------------- plugins/WinVST/AverMatrix/AverMatrix.cpp | 2 +- plugins/WinVST/AverMatrix/AverMatrixProc.cpp | 12 +-- plugins/WinVST/BassAmp/BassAmp.cpp | 2 +- plugins/WinVST/BassDrive/BassDrive.cpp | 2 +- plugins/WinVST/BassDrive/BassDriveProc.cpp | 12 +-- plugins/WinVST/BassKit/BassKitProc.cpp | 76 +---------------- plugins/WinVST/Baxandall/Baxandall.cpp | 2 +- plugins/WinVST/Baxandall/BaxandallProc.cpp | 12 +-- plugins/WinVST/Beam/Beam.cpp | 2 +- plugins/WinVST/Biquad/Biquad.cpp | 2 +- plugins/WinVST/Biquad/BiquadProc.cpp | 12 +-- plugins/WinVST/Biquad2/Biquad2.cpp | 2 +- plugins/WinVST/Biquad2/Biquad2Proc.cpp | 12 +-- plugins/WinVST/BiquadDouble/BiquadDouble.cpp | 2 +- .../WinVST/BiquadDouble/BiquadDoubleProc.cpp | 12 +-- .../WinVST/BiquadOneHalf/BiquadOneHalf.cpp | 2 +- .../BiquadOneHalf/BiquadOneHalfProc.cpp | 12 +-- plugins/WinVST/BiquadTriple/BiquadTriple.cpp | 2 +- .../WinVST/BiquadTriple/BiquadTripleProc.cpp | 12 +-- plugins/WinVST/BitGlitter/BitGlitter.cpp | 2 +- plugins/WinVST/BitGlitter/BitGlitter.h | 3 +- plugins/WinVST/BitGlitter/BitGlitterProc.cpp | 4 +- plugins/WinVST/BlockParty/BlockParty.cpp | 2 +- plugins/WinVST/BlockParty/BlockParty.h | 3 +- plugins/WinVST/BlockParty/BlockPartyProc.cpp | 76 +---------------- plugins/WinVST/BrassRider/BrassRider.cpp | 2 +- plugins/WinVST/BrassRider/BrassRiderProc.cpp | 84 ++----------------- .../WinVST/BrightAmbience/BrightAmbience.cpp | 2 +- .../BrightAmbience/BrightAmbienceProc.cpp | 12 +-- .../BrightAmbience2/BrightAmbience2.cpp | 2 +- .../BrightAmbience2/BrightAmbience2Proc.cpp | 12 +-- plugins/WinVST/Calibre/Calibre.cpp | 2 +- plugins/WinVST/Calibre/CalibreProc.cpp | 12 +-- plugins/WinVST/Capacitor2/Capacitor2.cpp | 2 +- plugins/WinVST/Capacitor2/Capacitor2Proc.cpp | 12 +-- plugins/WinVST/Channel5/Channel5Proc.cpp | 76 +---------------- plugins/WinVST/Channel6/Channel6.cpp | 2 +- plugins/WinVST/Channel6/Channel6.h | 3 +- plugins/WinVST/Channel6/Channel6Proc.cpp | 4 +- plugins/WinVST/Channel7/Channel7.cpp | 2 +- plugins/WinVST/Channel7/Channel7Proc.cpp | 12 +-- plugins/WinVST/Channel8/Channel8.cpp | 2 +- plugins/WinVST/Channel8/Channel8Proc.cpp | 12 +-- plugins/WinVST/ChromeOxide/ChromeOxide.cpp | 2 +- .../WinVST/ChromeOxide/ChromeOxideProc.cpp | 12 +-- plugins/WinVST/Cider/Cider.cpp | 2 +- plugins/WinVST/Cider/CiderProc.cpp | 12 +-- plugins/WinVST/Coils/Coils.cpp | 2 +- plugins/WinVST/Coils/CoilsProc.cpp | 12 +-- plugins/WinVST/Cojones/CojonesProc.cpp | 76 +---------------- .../Compresaturator/Compresaturator.cpp | 2 +- .../WinVST/Compresaturator/Compresaturator.h | 3 +- .../Compresaturator/CompresaturatorProc.cpp | 76 +---------------- plugins/WinVST/Console6Buss/Console6Buss.cpp | 2 +- .../WinVST/Console6Buss/Console6BussProc.cpp | 12 +-- .../Console6Channel/Console6Channel.cpp | 2 +- .../Console6Channel/Console6ChannelProc.cpp | 12 +-- plugins/WinVST/Crystal/CrystalProc.cpp | 76 +---------------- plugins/WinVST/Dark/Dark.cpp | 2 +- plugins/WinVST/DeBess/DeBess.cpp | 2 +- plugins/WinVST/DeBess/DeBessProc.cpp | 12 +-- plugins/WinVST/DeHiss/DeHiss.cpp | 2 +- plugins/WinVST/DeHiss/DeHissProc.cpp | 12 +-- plugins/WinVST/DeRez2/DeRez2.cpp | 2 +- plugins/WinVST/DeRez2/DeRez2Proc.cpp | 12 +-- plugins/WinVST/Deckwrecka/Deckwrecka.cpp | 2 +- plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp | 12 +-- plugins/WinVST/DigitalBlack/DigitalBlack.cpp | 2 +- .../WinVST/DigitalBlack/DigitalBlackProc.cpp | 12 +-- plugins/WinVST/Distance2/Distance2Proc.cpp | 76 +---------------- plugins/WinVST/Distortion/Distortion.cpp | 2 +- plugins/WinVST/Distortion/DistortionProc.cpp | 16 ++-- plugins/WinVST/DitherFloat/DitherFloat.cpp | 2 +- plugins/WinVST/DubCenter/DubCenterProc.cpp | 76 +---------------- plugins/WinVST/Dyno/Dyno.cpp | 2 +- plugins/WinVST/Dyno/DynoProc.cpp | 12 +-- plugins/WinVST/Elation/Elation.cpp | 2 +- plugins/WinVST/Elation/ElationProc.cpp | 12 +-- plugins/WinVST/Energy/EnergyProc.cpp | 76 +---------------- plugins/WinVST/Facet/Facet.cpp | 2 +- plugins/WinVST/Facet/FacetProc.cpp | 12 +-- plugins/WinVST/Floor/FloorProc.cpp | 76 +---------------- plugins/WinVST/Focus/Focus.cpp | 2 +- plugins/WinVST/Focus/FocusProc.cpp | 12 +-- plugins/WinVST/Gatelope/GatelopeProc.cpp | 76 +---------------- .../WinVST/GlitchShifter/GlitchShifter.cpp | 2 +- .../GlitchShifter/GlitchShifterProc.cpp | 12 +-- plugins/WinVST/Gringer/Gringer.cpp | 2 +- plugins/WinVST/Gringer/GringerProc.cpp | 12 +-- plugins/WinVST/Highpass2/Highpass2.cpp | 2 +- plugins/WinVST/Highpass2/Highpass2Proc.cpp | 84 ++----------------- plugins/WinVST/Holt/Holt.cpp | 2 +- plugins/WinVST/Holt/Holt.h | 3 +- plugins/WinVST/Holt/HoltProc.cpp | 4 +- plugins/WinVST/Infrasonic/Infrasonic.cpp | 2 +- plugins/WinVST/Infrasonic/InfrasonicProc.cpp | 12 +-- plugins/WinVST/Interstage/Interstage.cpp | 2 +- plugins/WinVST/Interstage/InterstageProc.cpp | 12 +-- plugins/WinVST/Isolator/Isolator.cpp | 2 +- plugins/WinVST/Isolator/IsolatorProc.cpp | 12 +-- plugins/WinVST/Loud/Loud.cpp | 2 +- plugins/WinVST/Loud/Loud.h | 3 +- plugins/WinVST/Loud/LoudProc.cpp | 4 +- plugins/WinVST/Lowpass2/Lowpass2.cpp | 2 +- plugins/WinVST/Lowpass2/Lowpass2Proc.cpp | 84 ++----------------- plugins/WinVST/Luxor/Luxor.cpp | 2 +- plugins/WinVST/Luxor/LuxorProc.cpp | 12 +-- plugins/WinVST/MV/MV.cpp | 2 +- plugins/WinVST/MV/MV.h | 3 +- plugins/WinVST/MV/MVProc.cpp | 76 +---------------- plugins/WinVST/MoNoam/MoNoam.cpp | 2 +- plugins/WinVST/MoNoam/MoNoamProc.cpp | 12 +-- plugins/WinVST/Mojo/Mojo.cpp | 2 +- plugins/WinVST/Mojo/MojoProc.cpp | 12 +-- plugins/WinVST/Monitoring/Monitoring.cpp | 2 +- plugins/WinVST/Monitoring/MonitoringProc.cpp | 4 +- plugins/WinVST/Neverland/Neverland.cpp | 2 +- plugins/WinVST/Neverland/NeverlandProc.cpp | 12 +-- plugins/WinVST/Nikola/Nikola.cpp | 2 +- plugins/WinVST/Nikola/NikolaProc.cpp | 12 +-- .../NotJustAnotherDither.cpp | 2 +- plugins/WinVST/Pafnuty/PafnutyProc.cpp | 76 +---------------- plugins/WinVST/PaulDither/PaulDither.cpp | 2 +- plugins/WinVST/PeaksOnly/PeaksOnly.cpp | 2 +- plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp | 12 +-- plugins/WinVST/PocketVerbs/PocketVerbs.cpp | 2 +- .../WinVST/PocketVerbs/PocketVerbsProc.cpp | 12 +-- plugins/WinVST/Podcast/Podcast.cpp | 2 +- plugins/WinVST/Podcast/PodcastProc.cpp | 12 +-- .../WinVST/PodcastDeluxe/PodcastDeluxe.cpp | 2 +- .../PodcastDeluxe/PodcastDeluxeProc.cpp | 12 +-- plugins/WinVST/Pop/Pop.cpp | 2 +- plugins/WinVST/Pop/Pop.h | 3 +- plugins/WinVST/Pop/PopProc.cpp | 4 +- plugins/WinVST/PowerSag2/PowerSag2.cpp | 2 +- plugins/WinVST/PowerSag2/PowerSag2Proc.cpp | 12 +-- plugins/WinVST/Precious/Precious.cpp | 2 +- plugins/WinVST/Precious/PreciousProc.cpp | 12 +-- plugins/WinVST/PurestAir/PurestAir.cpp | 2 +- plugins/WinVST/PurestAir/PurestAirProc.cpp | 12 +-- plugins/WinVST/PurestFade/PurestFade.cpp | 2 +- plugins/WinVST/PurestFade/PurestFadeProc.cpp | 4 +- plugins/WinVST/PurestSquish/PurestSquish.cpp | 2 +- plugins/WinVST/PurestSquish/PurestSquish.h | 3 +- .../WinVST/PurestSquish/PurestSquishProc.cpp | 76 +---------------- plugins/WinVST/RawGlitters/RawGlitters.cpp | 2 +- plugins/WinVST/RawTimbers/RawTimbers.cpp | 2 +- plugins/WinVST/Recurve/Recurve.cpp | 2 +- plugins/WinVST/Recurve/RecurveProc.cpp | 12 +-- plugins/WinVST/Remap/Remap.cpp | 2 +- plugins/WinVST/Remap/RemapProc.cpp | 12 +-- plugins/WinVST/ResEQ/ResEQ.cpp | 2 +- plugins/WinVST/ResEQ/ResEQProc.cpp | 12 +-- plugins/WinVST/Slew3/Slew3.cpp | 2 +- plugins/WinVST/Slew3/Slew3Proc.cpp | 12 +-- plugins/WinVST/Smooth/Smooth.cpp | 2 +- plugins/WinVST/Smooth/SmoothProc.cpp | 84 ++----------------- plugins/WinVST/SoftGate/SoftGate.cpp | 2 +- plugins/WinVST/SoftGate/SoftGateProc.cpp | 12 +-- .../SpatializeDither/SpatializeDither.cpp | 2 +- plugins/WinVST/Spiral/Spiral.cpp | 2 +- plugins/WinVST/Spiral/Spiral.h | 3 +- plugins/WinVST/Spiral/SpiralProc.cpp | 4 +- plugins/WinVST/Spiral2/Spiral2.cpp | 2 +- plugins/WinVST/Spiral2/Spiral2.h | 3 +- plugins/WinVST/Spiral2/Spiral2Proc.cpp | 4 +- plugins/WinVST/TPDFDither/TPDFDither.cpp | 2 +- plugins/WinVST/Tape/Tape.cpp | 2 +- plugins/WinVST/Tape/TapeProc.cpp | 12 +-- plugins/WinVST/TapeDelay/TapeDelayProc.cpp | 76 +---------------- plugins/WinVST/TapeDither/TapeDither.cpp | 2 +- plugins/WinVST/TapeFat/TapeFatProc.cpp | 76 +---------------- plugins/WinVST/ToTape6/ToTape6.cpp | 2 +- plugins/WinVST/ToTape6/ToTape6Proc.cpp | 12 +-- plugins/WinVST/TremoSquare/TremoSquare.cpp | 2 +- .../WinVST/TremoSquare/TremoSquareProc.cpp | 12 +-- plugins/WinVST/TripleSpread/TripleSpread.cpp | 2 +- .../WinVST/TripleSpread/TripleSpreadProc.cpp | 16 ++-- plugins/WinVST/Ultrasonic/Ultrasonic.cpp | 2 +- plugins/WinVST/Ultrasonic/UltrasonicProc.cpp | 12 +-- .../UltrasonicLite/UltrasonicLiteProc.cpp | 12 +-- .../UltrasonicMed/UltrasonicMedProc.cpp | 12 +-- plugins/WinVST/UnBox/UnBox.cpp | 2 +- plugins/WinVST/UnBox/UnBox.h | 3 +- plugins/WinVST/UnBox/UnBoxProc.cpp | 4 +- plugins/WinVST/Vibrato/Vibrato.cpp | 2 +- plugins/WinVST/Vibrato/VibratoProc.cpp | 12 +-- plugins/WinVST/VinylDither/VinylDither.cpp | 2 +- plugins/WinVST/VoiceTrick/VoiceTrick.cpp | 2 +- plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp | 12 +-- plugins/WinVST/curve/curve.cpp | 2 +- plugins/WinVST/curve/curveProc.cpp | 12 +-- plugins/WinVST/uLawDecode/uLawDecodeProc.cpp | 76 +---------------- 1062 files changed, 3132 insertions(+), 9576 deletions(-) diff --git a/plugins/LinuxVST/src/ADT/ADT.cpp b/plugins/LinuxVST/src/ADT/ADT.cpp index b05be403d..34db6d535 100755 --- a/plugins/LinuxVST/src/ADT/ADT.cpp +++ b/plugins/LinuxVST/src/ADT/ADT.cpp @@ -24,7 +24,7 @@ ADT::ADT(audioMasterCallback audioMaster) : offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/ADT/ADT.h b/plugins/LinuxVST/src/ADT/ADT.h index 4ada4659d..113e371d9 100755 --- a/plugins/LinuxVST/src/ADT/ADT.h +++ b/plugins/LinuxVST/src/ADT/ADT.h @@ -64,7 +64,8 @@ private: double offsetB; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/LinuxVST/src/ADT/ADTProc.cpp b/plugins/LinuxVST/src/ADT/ADTProc.cpp index 555f0877e..1d113ad8e 100755 --- a/plugins/LinuxVST/src/ADT/ADTProc.cpp +++ b/plugins/LinuxVST/src/ADT/ADTProc.cpp @@ -32,8 +32,8 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + 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; diff --git a/plugins/LinuxVST/src/Apicolypse/Apicolypse.cpp b/plugins/LinuxVST/src/Apicolypse/Apicolypse.cpp index b5f4179a9..8c9d15ec5 100755 --- a/plugins/LinuxVST/src/Apicolypse/Apicolypse.cpp +++ b/plugins/LinuxVST/src/Apicolypse/Apicolypse.cpp @@ -19,7 +19,7 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Apicolypse/ApicolypseProc.cpp b/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp index bc9e99ab5..c0b954717 100755 --- a/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp +++ b/plugins/LinuxVST/src/Apicolypse/ApicolypseProc.cpp @@ -39,8 +39,8 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -166,11 +166,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/AtmosphereBuss/AtmosphereBussProc.cpp b/plugins/LinuxVST/src/AtmosphereBuss/AtmosphereBussProc.cpp index add056764..6a5a9a9ba 100755 --- a/plugins/LinuxVST/src/AtmosphereBuss/AtmosphereBussProc.cpp +++ b/plugins/LinuxVST/src/AtmosphereBuss/AtmosphereBussProc.cpp @@ -50,42 +50,8 @@ void AtmosphereBuss::processReplacing(float **inputs, float **outputs, VstInt32 inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -311,42 +277,8 @@ void AtmosphereBuss::processDoubleReplacing(double **inputs, double **outputs, V inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/LinuxVST/src/AtmosphereChannel/AtmosphereChannelProc.cpp b/plugins/LinuxVST/src/AtmosphereChannel/AtmosphereChannelProc.cpp index 763853004..92a6a7318 100755 --- a/plugins/LinuxVST/src/AtmosphereChannel/AtmosphereChannelProc.cpp +++ b/plugins/LinuxVST/src/AtmosphereChannel/AtmosphereChannelProc.cpp @@ -50,42 +50,8 @@ void AtmosphereChannel::processReplacing(float **inputs, float **outputs, VstInt inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -306,42 +272,8 @@ void AtmosphereChannel::processDoubleReplacing(double **inputs, double **outputs inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/LinuxVST/src/AverMatrix/AverMatrix.cpp b/plugins/LinuxVST/src/AverMatrix/AverMatrix.cpp index 585bd857a..e2e346a0f 100755 --- a/plugins/LinuxVST/src/AverMatrix/AverMatrix.cpp +++ b/plugins/LinuxVST/src/AverMatrix/AverMatrix.cpp @@ -22,7 +22,7 @@ AverMatrix::AverMatrix(audioMasterCallback audioMaster) : } } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/AverMatrix/AverMatrixProc.cpp b/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp index af0105057..c04b2ced4 100755 --- a/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp +++ b/plugins/LinuxVST/src/AverMatrix/AverMatrixProc.cpp @@ -50,8 +50,8 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -81,11 +81,11 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BassAmp/BassAmp.cpp b/plugins/LinuxVST/src/BassAmp/BassAmp.cpp index 506531cf6..330f7ac10 100755 --- a/plugins/LinuxVST/src/BassAmp/BassAmp.cpp +++ b/plugins/LinuxVST/src/BassAmp/BassAmp.cpp @@ -135,7 +135,7 @@ BassAmp::BassAmp(audioMasterCallback audioMaster) : ataK3 = 0.114; //add raw to interpolated dry, toughens ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0 ataK5 = 0.122; //subtract this much prev. diff sample, brightens - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BassDrive/BassDrive.cpp b/plugins/LinuxVST/src/BassDrive/BassDrive.cpp index 81f611e82..fd327fac1 100755 --- a/plugins/LinuxVST/src/BassDrive/BassDrive.cpp +++ b/plugins/LinuxVST/src/BassDrive/BassDrive.cpp @@ -56,7 +56,7 @@ BassDrive::BassDrive(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BassDrive/BassDriveProc.cpp b/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp index 68f67e7f7..8575a9e62 100755 --- a/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp +++ b/plugins/LinuxVST/src/BassDrive/BassDriveProc.cpp @@ -27,8 +27,8 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sumL = 0.0; sumR = 0.0; @@ -314,11 +314,11 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BassKit/BassKitProc.cpp b/plugins/LinuxVST/src/BassKit/BassKitProc.cpp index 3044c5cec..620b4449d 100755 --- a/plugins/LinuxVST/src/BassKit/BassKitProc.cpp +++ b/plugins/LinuxVST/src/BassKit/BassKitProc.cpp @@ -36,42 +36,8 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; @@ -252,42 +218,8 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; diff --git a/plugins/LinuxVST/src/Baxandall/Baxandall.cpp b/plugins/LinuxVST/src/Baxandall/Baxandall.cpp index d27affada..55be20100 100755 --- a/plugins/LinuxVST/src/Baxandall/Baxandall.cpp +++ b/plugins/LinuxVST/src/Baxandall/Baxandall.cpp @@ -26,7 +26,7 @@ Baxandall::Baxandall(audioMasterCallback audioMaster) : bassBR[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Baxandall/BaxandallProc.cpp b/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp index f52cba8ec..772a7cadc 100755 --- a/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp +++ b/plugins/LinuxVST/src/Baxandall/BaxandallProc.cpp @@ -47,8 +47,8 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (output != 1.0) { inputSampleL *= output; @@ -127,11 +127,11 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Beam/Beam.cpp b/plugins/LinuxVST/src/Beam/Beam.cpp index 183b5e57b..a1adf4a2f 100755 --- a/plugins/LinuxVST/src/Beam/Beam.cpp +++ b/plugins/LinuxVST/src/Beam/Beam.cpp @@ -19,7 +19,7 @@ Beam::Beam(audioMasterCallback audioMaster) : lastSampleL[count] = 0; lastSampleR[count] = 0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Biquad/Biquad.cpp b/plugins/LinuxVST/src/Biquad/Biquad.cpp index b6196911e..fbcf8b446 100755 --- a/plugins/LinuxVST/src/Biquad/Biquad.cpp +++ b/plugins/LinuxVST/src/Biquad/Biquad.cpp @@ -17,7 +17,7 @@ Biquad::Biquad(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Biquad/BiquadProc.cpp b/plugins/LinuxVST/src/Biquad/BiquadProc.cpp index cff2485a6..f872c60ca 100755 --- a/plugins/LinuxVST/src/Biquad/BiquadProc.cpp +++ b/plugins/LinuxVST/src/Biquad/BiquadProc.cpp @@ -90,8 +90,8 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -147,11 +147,11 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Biquad2/Biquad2.cpp b/plugins/LinuxVST/src/Biquad2/Biquad2.cpp index 83e1664e0..7b9d33802 100755 --- a/plugins/LinuxVST/src/Biquad2/Biquad2.cpp +++ b/plugins/LinuxVST/src/Biquad2/Biquad2.cpp @@ -30,7 +30,7 @@ Biquad2::Biquad2(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; E = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Biquad2/Biquad2Proc.cpp b/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp index 9e9d6bce8..db8d29571 100755 --- a/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp +++ b/plugins/LinuxVST/src/Biquad2/Biquad2Proc.cpp @@ -81,8 +81,8 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -202,11 +202,11 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BiquadDouble/BiquadDouble.cpp b/plugins/LinuxVST/src/BiquadDouble/BiquadDouble.cpp index 64c7b188e..aaacd15b4 100755 --- a/plugins/LinuxVST/src/BiquadDouble/BiquadDouble.cpp +++ b/plugins/LinuxVST/src/BiquadDouble/BiquadDouble.cpp @@ -17,7 +17,7 @@ BiquadDouble::BiquadDouble(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp b/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp index 055743d43..a0a47f4f4 100755 --- a/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp +++ b/plugins/LinuxVST/src/BiquadDouble/BiquadDoubleProc.cpp @@ -91,8 +91,8 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -138,11 +138,11 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalf.cpp b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalf.cpp index c3a11e1ec..ee0943339 100755 --- a/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalf.cpp +++ b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalf.cpp @@ -18,7 +18,7 @@ BiquadOneHalf::BiquadOneHalf(audioMasterCallback audioMaster) : B = 0.0; C = 0.0; D = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp index 87d9763c1..001a00ee1 100755 --- a/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp +++ b/plugins/LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp @@ -89,8 +89,8 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -142,11 +142,11 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BiquadTriple/BiquadTriple.cpp b/plugins/LinuxVST/src/BiquadTriple/BiquadTriple.cpp index ce850841d..a56973eca 100755 --- a/plugins/LinuxVST/src/BiquadTriple/BiquadTriple.cpp +++ b/plugins/LinuxVST/src/BiquadTriple/BiquadTriple.cpp @@ -17,7 +17,7 @@ BiquadTriple::BiquadTriple(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp b/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp index 84ee1b7f5..84b05ed53 100755 --- a/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp +++ b/plugins/LinuxVST/src/BiquadTriple/BiquadTripleProc.cpp @@ -92,8 +92,8 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -150,11 +150,11 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BitGlitter/BitGlitter.cpp b/plugins/LinuxVST/src/BitGlitter/BitGlitter.cpp index 438ce6452..88aedaddb 100755 --- a/plugins/LinuxVST/src/BitGlitter/BitGlitter.cpp +++ b/plugins/LinuxVST/src/BitGlitter/BitGlitter.cpp @@ -17,7 +17,7 @@ BitGlitter::BitGlitter(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; ataLastSampleL = 0.0; ataHalfwaySampleL = 0.0; diff --git a/plugins/LinuxVST/src/BitGlitter/BitGlitter.h b/plugins/LinuxVST/src/BitGlitter/BitGlitter.h index 999920767..2f0702e5a 100755 --- a/plugins/LinuxVST/src/BitGlitter/BitGlitter.h +++ b/plugins/LinuxVST/src/BitGlitter/BitGlitter.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double ataLastSampleL; double ataHalfwaySampleL; diff --git a/plugins/LinuxVST/src/BitGlitter/BitGlitterProc.cpp b/plugins/LinuxVST/src/BitGlitter/BitGlitterProc.cpp index 38afa37d9..066b93811 100755 --- a/plugins/LinuxVST/src/BitGlitter/BitGlitterProc.cpp +++ b/plugins/LinuxVST/src/BitGlitter/BitGlitterProc.cpp @@ -34,8 +34,8 @@ void BitGlitter::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/BlockParty/BlockParty.cpp b/plugins/LinuxVST/src/BlockParty/BlockParty.cpp index 31cc75597..fd9e2ff39 100755 --- a/plugins/LinuxVST/src/BlockParty/BlockParty.cpp +++ b/plugins/LinuxVST/src/BlockParty/BlockParty.cpp @@ -14,7 +14,7 @@ BlockParty::BlockParty(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; muSpeedAL = 10000; muSpeedBL = 10000; diff --git a/plugins/LinuxVST/src/BlockParty/BlockParty.h b/plugins/LinuxVST/src/BlockParty/BlockParty.h index afcc9739a..006e9dfd0 100755 --- a/plugins/LinuxVST/src/BlockParty/BlockParty.h +++ b/plugins/LinuxVST/src/BlockParty/BlockParty.h @@ -53,7 +53,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/LinuxVST/src/BlockParty/BlockPartyProc.cpp b/plugins/LinuxVST/src/BlockParty/BlockPartyProc.cpp index 37c3a6545..42d2924fe 100755 --- a/plugins/LinuxVST/src/BlockParty/BlockPartyProc.cpp +++ b/plugins/LinuxVST/src/BlockParty/BlockPartyProc.cpp @@ -32,42 +32,8 @@ void BlockParty::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -593,42 +559,8 @@ void BlockParty::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/BrassRider/BrassRider.cpp b/plugins/LinuxVST/src/BrassRider/BrassRider.cpp index 3c6ac09ce..ff0fdb80d 100755 --- a/plugins/LinuxVST/src/BrassRider/BrassRider.cpp +++ b/plugins/LinuxVST/src/BrassRider/BrassRider.cpp @@ -30,7 +30,7 @@ BrassRider::BrassRider(audioMasterCallback audioMaster) : lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BrassRider/BrassRiderProc.cpp b/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp index 449a965fc..b53db95e5 100755 --- a/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp +++ b/plugins/LinuxVST/src/BrassRider/BrassRiderProc.cpp @@ -24,42 +24,8 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -132,11 +98,11 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -166,42 +132,8 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/BrightAmbience/BrightAmbience.cpp b/plugins/LinuxVST/src/BrightAmbience/BrightAmbience.cpp index 0a5e13f5b..afa450178 100755 --- a/plugins/LinuxVST/src/BrightAmbience/BrightAmbience.cpp +++ b/plugins/LinuxVST/src/BrightAmbience/BrightAmbience.cpp @@ -17,7 +17,7 @@ BrightAmbience::BrightAmbience(audioMasterCallback audioMaster) : A = 0.0; B = 0.0; C = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp b/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp index dc4ecd233..69a6193b7 100755 --- a/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp +++ b/plugins/LinuxVST/src/BrightAmbience/BrightAmbienceProc.cpp @@ -25,8 +25,8 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 12680) {gcount = 12680;} count = gcount; @@ -322,11 +322,11 @@ void BrightAmbience::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2.cpp b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2.cpp index a89300ea2..65f5728bc 100755 --- a/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2.cpp +++ b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2.cpp @@ -19,7 +19,7 @@ BrightAmbience2::BrightAmbience2(audioMasterCallback audioMaster) : B = 0.2; C = 0.0; D = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp index 95daad017..1e9b85c8b 100755 --- a/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp +++ b/plugins/LinuxVST/src/BrightAmbience2/BrightAmbience2Proc.cpp @@ -24,8 +24,8 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -58,11 +58,11 @@ void BrightAmbience2::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Calibre/Calibre.cpp b/plugins/LinuxVST/src/Calibre/Calibre.cpp index 214f85ea4..5bf269d0b 100755 --- a/plugins/LinuxVST/src/Calibre/Calibre.cpp +++ b/plugins/LinuxVST/src/Calibre/Calibre.cpp @@ -18,7 +18,7 @@ Calibre::Calibre(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Calibre/CalibreProc.cpp b/plugins/LinuxVST/src/Calibre/CalibreProc.cpp index 14350eff2..b51ae2d14 100755 --- a/plugins/LinuxVST/src/Calibre/CalibreProc.cpp +++ b/plugins/LinuxVST/src/Calibre/CalibreProc.cpp @@ -39,8 +39,8 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Capacitor2/Capacitor2.cpp b/plugins/LinuxVST/src/Capacitor2/Capacitor2.cpp index 406621915..9dec180d3 100755 --- a/plugins/LinuxVST/src/Capacitor2/Capacitor2.cpp +++ b/plugins/LinuxVST/src/Capacitor2/Capacitor2.cpp @@ -52,7 +52,7 @@ Capacitor2::Capacitor2(audioMasterCallback audioMaster) : lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp b/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp index 899aaaa4a..5bd961e2d 100755 --- a/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp +++ b/plugins/LinuxVST/src/Capacitor2/Capacitor2Proc.cpp @@ -32,8 +32,8 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -153,11 +153,11 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Channel5/Channel5Proc.cpp b/plugins/LinuxVST/src/Channel5/Channel5Proc.cpp index b029d9303..5d25c69e4 100755 --- a/plugins/LinuxVST/src/Channel5/Channel5Proc.cpp +++ b/plugins/LinuxVST/src/Channel5/Channel5Proc.cpp @@ -26,42 +26,8 @@ void Channel5::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { @@ -161,42 +127,8 @@ void Channel5::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { diff --git a/plugins/LinuxVST/src/Channel6/Channel6.cpp b/plugins/LinuxVST/src/Channel6/Channel6.cpp index 0ad6eddd0..80e17af19 100755 --- a/plugins/LinuxVST/src/Channel6/Channel6.cpp +++ b/plugins/LinuxVST/src/Channel6/Channel6.cpp @@ -15,7 +15,7 @@ Channel6::Channel6(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/LinuxVST/src/Channel6/Channel6.h b/plugins/LinuxVST/src/Channel6/Channel6.h index 3945cecbf..ddca3e3ae 100755 --- a/plugins/LinuxVST/src/Channel6/Channel6.h +++ b/plugins/LinuxVST/src/Channel6/Channel6.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double iirSampleLA; double iirSampleRA; diff --git a/plugins/LinuxVST/src/Channel6/Channel6Proc.cpp b/plugins/LinuxVST/src/Channel6/Channel6Proc.cpp index 777666f14..ad228a8e8 100755 --- a/plugins/LinuxVST/src/Channel6/Channel6Proc.cpp +++ b/plugins/LinuxVST/src/Channel6/Channel6Proc.cpp @@ -26,8 +26,8 @@ void Channel6::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) diff --git a/plugins/LinuxVST/src/Channel7/Channel7.cpp b/plugins/LinuxVST/src/Channel7/Channel7.cpp index ba73bf565..1b753f1cd 100755 --- a/plugins/LinuxVST/src/Channel7/Channel7.cpp +++ b/plugins/LinuxVST/src/Channel7/Channel7.cpp @@ -15,7 +15,7 @@ Channel7::Channel7(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp b/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp index e9e9a6852..bb42ba20a 100755 --- a/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp +++ b/plugins/LinuxVST/src/Channel7/Channel7Proc.cpp @@ -28,8 +28,8 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) { @@ -96,11 +96,11 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Channel8/Channel8.cpp b/plugins/LinuxVST/src/Channel8/Channel8.cpp index c13fd7c96..3678965d6 100755 --- a/plugins/LinuxVST/src/Channel8/Channel8.cpp +++ b/plugins/LinuxVST/src/Channel8/Channel8.cpp @@ -15,7 +15,7 @@ Channel8::Channel8(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp b/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp index afb1a48fe..f62bed44f 100755 --- a/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp +++ b/plugins/LinuxVST/src/Channel8/Channel8Proc.cpp @@ -29,8 +29,8 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double dielectricScaleL = fabs(2.0-((inputSampleL+nonLin)/nonLin)); double dielectricScaleR = fabs(2.0-((inputSampleR+nonLin)/nonLin)); @@ -120,11 +120,11 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/ChromeOxide/ChromeOxide.cpp b/plugins/LinuxVST/src/ChromeOxide/ChromeOxide.cpp index 40cc31966..183fa9079 100755 --- a/plugins/LinuxVST/src/ChromeOxide/ChromeOxide.cpp +++ b/plugins/LinuxVST/src/ChromeOxide/ChromeOxide.cpp @@ -31,7 +31,7 @@ ChromeOxide::ChromeOxide(audioMasterCallback audioMaster) : flip = false; A = 0.5; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp b/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp index be036a80e..873c535f1 100755 --- a/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp +++ b/plugins/LinuxVST/src/ChromeOxide/ChromeOxideProc.cpp @@ -48,8 +48,8 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -152,11 +152,11 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Cider/Cider.cpp b/plugins/LinuxVST/src/Cider/Cider.cpp index 953563eb8..ebdd1a4f4 100755 --- a/plugins/LinuxVST/src/Cider/Cider.cpp +++ b/plugins/LinuxVST/src/Cider/Cider.cpp @@ -18,7 +18,7 @@ Cider::Cider(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Cider/CiderProc.cpp b/plugins/LinuxVST/src/Cider/CiderProc.cpp index 9222a2ea7..31be7279f 100755 --- a/plugins/LinuxVST/src/Cider/CiderProc.cpp +++ b/plugins/LinuxVST/src/Cider/CiderProc.cpp @@ -39,8 +39,8 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Coils/Coils.cpp b/plugins/LinuxVST/src/Coils/Coils.cpp index b3cc04aab..e40878412 100755 --- a/plugins/LinuxVST/src/Coils/Coils.cpp +++ b/plugins/LinuxVST/src/Coils/Coils.cpp @@ -16,7 +16,7 @@ Coils::Coils(audioMasterCallback audioMaster) : B = 0.5; C = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Coils/CoilsProc.cpp b/plugins/LinuxVST/src/Coils/CoilsProc.cpp index d963e9053..278f0690d 100755 --- a/plugins/LinuxVST/src/Coils/CoilsProc.cpp +++ b/plugins/LinuxVST/src/Coils/CoilsProc.cpp @@ -34,8 +34,8 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -74,11 +74,11 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Cojones/CojonesProc.cpp b/plugins/LinuxVST/src/Cojones/CojonesProc.cpp index 24606e3af..3b45cea8f 100755 --- a/plugins/LinuxVST/src/Cojones/CojonesProc.cpp +++ b/plugins/LinuxVST/src/Cojones/CojonesProc.cpp @@ -27,42 +27,8 @@ void Cojones::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -197,42 +163,8 @@ void Cojones::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Compresaturator/Compresaturator.cpp b/plugins/LinuxVST/src/Compresaturator/Compresaturator.cpp index e975f9cf9..1bb483138 100755 --- a/plugins/LinuxVST/src/Compresaturator/Compresaturator.cpp +++ b/plugins/LinuxVST/src/Compresaturator/Compresaturator.cpp @@ -25,7 +25,7 @@ Compresaturator::Compresaturator(audioMasterCallback audioMaster) : lastWidthR = 500; padFactorR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Compresaturator/Compresaturator.h b/plugins/LinuxVST/src/Compresaturator/Compresaturator.h index 62414582e..868b50b4d 100755 --- a/plugins/LinuxVST/src/Compresaturator/Compresaturator.h +++ b/plugins/LinuxVST/src/Compresaturator/Compresaturator.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff int dCount; diff --git a/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp b/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp index 921f25b11..9a70ac814 100755 --- a/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp +++ b/plugins/LinuxVST/src/Compresaturator/CompresaturatorProc.cpp @@ -28,42 +28,8 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -243,42 +209,8 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Console6Buss/Console6Buss.cpp b/plugins/LinuxVST/src/Console6Buss/Console6Buss.cpp index 27681c141..c6658226e 100755 --- a/plugins/LinuxVST/src/Console6Buss/Console6Buss.cpp +++ b/plugins/LinuxVST/src/Console6Buss/Console6Buss.cpp @@ -13,7 +13,7 @@ Console6Buss::Console6Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Console6Buss/Console6BussProc.cpp b/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp index 03f8fb9a6..6e25bd3a3 100755 --- a/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp +++ b/plugins/LinuxVST/src/Console6Buss/Console6BussProc.cpp @@ -20,8 +20,8 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Console6Channel/Console6Channel.cpp b/plugins/LinuxVST/src/Console6Channel/Console6Channel.cpp index 5bd28ca6e..d8634744e 100755 --- a/plugins/LinuxVST/src/Console6Channel/Console6Channel.cpp +++ b/plugins/LinuxVST/src/Console6Channel/Console6Channel.cpp @@ -13,7 +13,7 @@ Console6Channel::Console6Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp b/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp index 2d835fc8c..a72e3b8f0 100755 --- a/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp +++ b/plugins/LinuxVST/src/Console6Channel/Console6ChannelProc.cpp @@ -20,8 +20,8 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Channel::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Crystal/CrystalProc.cpp b/plugins/LinuxVST/src/Crystal/CrystalProc.cpp index f5d6746b1..d5eef67c8 100755 --- a/plugins/LinuxVST/src/Crystal/CrystalProc.cpp +++ b/plugins/LinuxVST/src/Crystal/CrystalProc.cpp @@ -40,42 +40,8 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -243,42 +209,8 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; diff --git a/plugins/LinuxVST/src/Dark/Dark.cpp b/plugins/LinuxVST/src/Dark/Dark.cpp index f652aa452..8c038752e 100755 --- a/plugins/LinuxVST/src/Dark/Dark.cpp +++ b/plugins/LinuxVST/src/Dark/Dark.cpp @@ -14,7 +14,7 @@ Dark::Dark(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 99; count++) { lastSampleL[count] = 0; lastSampleR[count] = 0; diff --git a/plugins/LinuxVST/src/DeBess/DeBess.cpp b/plugins/LinuxVST/src/DeBess/DeBess.cpp index b31a71a46..87d7316b8 100755 --- a/plugins/LinuxVST/src/DeBess/DeBess.cpp +++ b/plugins/LinuxVST/src/DeBess/DeBess.cpp @@ -29,7 +29,7 @@ DeBess::DeBess(audioMasterCallback audioMaster) : iirSampleBR = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/DeBess/DeBessProc.cpp b/plugins/LinuxVST/src/DeBess/DeBessProc.cpp index 075c9de3e..f868c8284 100755 --- a/plugins/LinuxVST/src/DeBess/DeBessProc.cpp +++ b/plugins/LinuxVST/src/DeBess/DeBessProc.cpp @@ -30,8 +30,8 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sL[0] = inputSampleL; //set up so both [0] and [1] will be input sample sR[0] = inputSampleR; //set up so both [0] and [1] will be input sample @@ -92,11 +92,11 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/DeHiss/DeHiss.cpp b/plugins/LinuxVST/src/DeHiss/DeHiss.cpp index 1f2d5639c..17f386f5d 100755 --- a/plugins/LinuxVST/src/DeHiss/DeHiss.cpp +++ b/plugins/LinuxVST/src/DeHiss/DeHiss.cpp @@ -25,7 +25,7 @@ DeHiss::DeHiss(audioMasterCallback audioMaster) : gateR = 1.0; rawR = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/DeHiss/DeHissProc.cpp b/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp index 41074f9c5..88547ff75 100755 --- a/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp +++ b/plugins/LinuxVST/src/DeHiss/DeHissProc.cpp @@ -37,8 +37,8 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -121,11 +121,11 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/DeRez2/DeRez2.cpp b/plugins/LinuxVST/src/DeRez2/DeRez2.cpp index 876d97575..acc092ee5 100755 --- a/plugins/LinuxVST/src/DeRez2/DeRez2.cpp +++ b/plugins/LinuxVST/src/DeRez2/DeRez2.cpp @@ -29,7 +29,7 @@ DeRez2::DeRez2(audioMasterCallback audioMaster) : position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/DeRez2/DeRez2Proc.cpp b/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp index d43944d9e..4ff6cf82d 100755 --- a/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp +++ b/plugins/LinuxVST/src/DeRez2/DeRez2Proc.cpp @@ -30,8 +30,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -168,11 +168,11 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Deckwrecka/Deckwrecka.cpp b/plugins/LinuxVST/src/Deckwrecka/Deckwrecka.cpp index 9f7fe61ca..8e4fc6d08 100755 --- a/plugins/LinuxVST/src/Deckwrecka/Deckwrecka.cpp +++ b/plugins/LinuxVST/src/Deckwrecka/Deckwrecka.cpp @@ -13,7 +13,7 @@ Deckwrecka::Deckwrecka(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bflip = 1; iirHeadBumpAL = 0.0; diff --git a/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp b/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp index e7146df5d..1e59e635c 100755 --- a/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp +++ b/plugins/LinuxVST/src/Deckwrecka/DeckwreckaProc.cpp @@ -35,8 +35,8 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; bflip++; if (bflip < 1 || bflip > 3) bflip = 1; @@ -175,11 +175,11 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/DigitalBlack/DigitalBlack.cpp b/plugins/LinuxVST/src/DigitalBlack/DigitalBlack.cpp index 9208be4f4..89a10236a 100755 --- a/plugins/LinuxVST/src/DigitalBlack/DigitalBlack.cpp +++ b/plugins/LinuxVST/src/DigitalBlack/DigitalBlack.cpp @@ -20,7 +20,7 @@ DigitalBlack::DigitalBlack(audioMasterCallback audioMaster) : WasNegativeR = false; ZeroCrossR = 0; gaterollerR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp b/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp index 8caeff273..efd520f21 100755 --- a/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp +++ b/plugins/LinuxVST/src/DigitalBlack/DigitalBlackProc.cpp @@ -26,8 +26,8 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -91,11 +91,11 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Distance2/Distance2Proc.cpp b/plugins/LinuxVST/src/Distance2/Distance2Proc.cpp index 0a92a9268..8017d9303 100755 --- a/plugins/LinuxVST/src/Distance2/Distance2Proc.cpp +++ b/plugins/LinuxVST/src/Distance2/Distance2Proc.cpp @@ -46,42 +46,8 @@ void Distance2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,42 +290,8 @@ void Distance2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Distortion/Distortion.cpp b/plugins/LinuxVST/src/Distortion/Distortion.cpp index 34dd08274..373ec3574 100755 --- a/plugins/LinuxVST/src/Distortion/Distortion.cpp +++ b/plugins/LinuxVST/src/Distortion/Distortion.cpp @@ -20,7 +20,7 @@ Distortion::Distortion(audioMasterCallback audioMaster) : previousInL[x] = 0.0; previousOutL[x] = 0.0; previousInR[x] = 0.0; previousOutR[x] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Distortion/DistortionProc.cpp b/plugins/LinuxVST/src/Distortion/DistortionProc.cpp index 8d6a4f8b0..17240d1cf 100755 --- a/plugins/LinuxVST/src/Distortion/DistortionProc.cpp +++ b/plugins/LinuxVST/src/Distortion/DistortionProc.cpp @@ -25,8 +25,8 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -111,11 +111,11 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -146,8 +146,8 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/DitherFloat/DitherFloat.cpp b/plugins/LinuxVST/src/DitherFloat/DitherFloat.cpp index 05213a6ce..9443a2daa 100755 --- a/plugins/LinuxVST/src/DitherFloat/DitherFloat.cpp +++ b/plugins/LinuxVST/src/DitherFloat/DitherFloat.cpp @@ -14,7 +14,7 @@ DitherFloat::DitherFloat(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/DubCenter/DubCenterProc.cpp b/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp index 49806b773..ff4d70dbf 100755 --- a/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp +++ b/plugins/LinuxVST/src/DubCenter/DubCenterProc.cpp @@ -52,42 +52,8 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -369,42 +335,8 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Dyno/Dyno.cpp b/plugins/LinuxVST/src/Dyno/Dyno.cpp index b02585f9d..0239412a3 100755 --- a/plugins/LinuxVST/src/Dyno/Dyno.cpp +++ b/plugins/LinuxVST/src/Dyno/Dyno.cpp @@ -13,7 +13,7 @@ Dyno::Dyno(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Dyno/DynoProc.cpp b/plugins/LinuxVST/src/Dyno/DynoProc.cpp index 3e9052c73..c2db122db 100755 --- a/plugins/LinuxVST/src/Dyno/DynoProc.cpp +++ b/plugins/LinuxVST/src/Dyno/DynoProc.cpp @@ -20,8 +20,8 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Elation/Elation.cpp b/plugins/LinuxVST/src/Elation/Elation.cpp index fc8d4367f..d4740eca0 100755 --- a/plugins/LinuxVST/src/Elation/Elation.cpp +++ b/plugins/LinuxVST/src/Elation/Elation.cpp @@ -23,7 +23,7 @@ Elation::Elation(audioMasterCallback audioMaster) : compCR = 1.0; compDR = 1.0; previousBR = 0.0; flip = false; lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Elation/ElationProc.cpp b/plugins/LinuxVST/src/Elation/ElationProc.cpp index 359c931b3..8df4ce867 100755 --- a/plugins/LinuxVST/src/Elation/ElationProc.cpp +++ b/plugins/LinuxVST/src/Elation/ElationProc.cpp @@ -36,8 +36,8 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -270,11 +270,11 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Energy/EnergyProc.cpp b/plugins/LinuxVST/src/Energy/EnergyProc.cpp index dbe218778..1d29f1479 100755 --- a/plugins/LinuxVST/src/Energy/EnergyProc.cpp +++ b/plugins/LinuxVST/src/Energy/EnergyProc.cpp @@ -30,42 +30,8 @@ void Energy::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; @@ -784,42 +750,8 @@ void Energy::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; diff --git a/plugins/LinuxVST/src/Facet/Facet.cpp b/plugins/LinuxVST/src/Facet/Facet.cpp index e12d20343..a6a5614fb 100755 --- a/plugins/LinuxVST/src/Facet/Facet.cpp +++ b/plugins/LinuxVST/src/Facet/Facet.cpp @@ -13,7 +13,7 @@ Facet::Facet(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Facet/FacetProc.cpp b/plugins/LinuxVST/src/Facet/FacetProc.cpp index fb5cdbd6e..85af36f42 100755 --- a/plugins/LinuxVST/src/Facet/FacetProc.cpp +++ b/plugins/LinuxVST/src/Facet/FacetProc.cpp @@ -20,8 +20,8 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; @@ -47,11 +47,11 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Floor/FloorProc.cpp b/plugins/LinuxVST/src/Floor/FloorProc.cpp index 0cfa58c69..758360f65 100755 --- a/plugins/LinuxVST/src/Floor/FloorProc.cpp +++ b/plugins/LinuxVST/src/Floor/FloorProc.cpp @@ -39,42 +39,8 @@ void Floor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -298,42 +264,8 @@ void Floor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Focus/Focus.cpp b/plugins/LinuxVST/src/Focus/Focus.cpp index f77560c82..a9e66020d 100755 --- a/plugins/LinuxVST/src/Focus/Focus.cpp +++ b/plugins/LinuxVST/src/Focus/Focus.cpp @@ -18,7 +18,7 @@ Focus::Focus(audioMasterCallback audioMaster) : D = 1.0; E = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Focus/FocusProc.cpp b/plugins/LinuxVST/src/Focus/FocusProc.cpp index 9e1c9c070..fd7624e72 100755 --- a/plugins/LinuxVST/src/Focus/FocusProc.cpp +++ b/plugins/LinuxVST/src/Focus/FocusProc.cpp @@ -34,8 +34,8 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -128,11 +128,11 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Gatelope/GatelopeProc.cpp b/plugins/LinuxVST/src/Gatelope/GatelopeProc.cpp index b5f1d67d7..5dbcb19c3 100755 --- a/plugins/LinuxVST/src/Gatelope/GatelopeProc.cpp +++ b/plugins/LinuxVST/src/Gatelope/GatelopeProc.cpp @@ -39,42 +39,8 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -247,42 +213,8 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/GlitchShifter/GlitchShifter.cpp b/plugins/LinuxVST/src/GlitchShifter/GlitchShifter.cpp index f9456e1f3..2bd39758e 100755 --- a/plugins/LinuxVST/src/GlitchShifter/GlitchShifter.cpp +++ b/plugins/LinuxVST/src/GlitchShifter/GlitchShifter.cpp @@ -53,7 +53,7 @@ GlitchShifter::GlitchShifter(audioMasterCallback audioMaster) : C = 0.5; D = 0.0; E = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp b/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp index 852c3bc0f..06ebe4bae 100755 --- a/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp +++ b/plugins/LinuxVST/src/GlitchShifter/GlitchShifterProc.cpp @@ -28,8 +28,8 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -307,11 +307,11 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Gringer/Gringer.cpp b/plugins/LinuxVST/src/Gringer/Gringer.cpp index 5f92a8860..f071dedb8 100755 --- a/plugins/LinuxVST/src/Gringer/Gringer.cpp +++ b/plugins/LinuxVST/src/Gringer/Gringer.cpp @@ -13,7 +13,7 @@ Gringer::Gringer(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 9; x++) {inbandL[x] = 0.0; outbandL[x] = 0.0; inbandR[x] = 0.0; outbandR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Gringer/GringerProc.cpp b/plugins/LinuxVST/src/Gringer/GringerProc.cpp index b76693f2e..b59800001 100755 --- a/plugins/LinuxVST/src/Gringer/GringerProc.cpp +++ b/plugins/LinuxVST/src/Gringer/GringerProc.cpp @@ -60,8 +60,8 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); @@ -105,11 +105,11 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Highpass2/Highpass2.cpp b/plugins/LinuxVST/src/Highpass2/Highpass2.cpp index bcb2ce133..c88927ae2 100755 --- a/plugins/LinuxVST/src/Highpass2/Highpass2.cpp +++ b/plugins/LinuxVST/src/Highpass2/Highpass2.cpp @@ -16,7 +16,7 @@ Highpass2::Highpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp b/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp index e5f6a8066..e87194339 100755 --- a/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp +++ b/plugins/LinuxVST/src/Highpass2/Highpass2Proc.cpp @@ -41,42 +41,8 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -211,42 +177,8 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Holt/Holt.cpp b/plugins/LinuxVST/src/Holt/Holt.cpp index 4262453e1..499217c23 100755 --- a/plugins/LinuxVST/src/Holt/Holt.cpp +++ b/plugins/LinuxVST/src/Holt/Holt.cpp @@ -36,7 +36,7 @@ Holt::Holt(audioMasterCallback audioMaster) : previousSampleDR = 0.0; previousTrendDR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Holt/Holt.h b/plugins/LinuxVST/src/Holt/Holt.h index d9d61e929..8026fa40d 100755 --- a/plugins/LinuxVST/src/Holt/Holt.h +++ b/plugins/LinuxVST/src/Holt/Holt.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double previousSampleAL; diff --git a/plugins/LinuxVST/src/Holt/HoltProc.cpp b/plugins/LinuxVST/src/Holt/HoltProc.cpp index ca90811ad..c243b82ff 100755 --- a/plugins/LinuxVST/src/Holt/HoltProc.cpp +++ b/plugins/LinuxVST/src/Holt/HoltProc.cpp @@ -45,8 +45,8 @@ void Holt::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Infrasonic/Infrasonic.cpp b/plugins/LinuxVST/src/Infrasonic/Infrasonic.cpp index cf5ba9c6c..bfd10d163 100755 --- a/plugins/LinuxVST/src/Infrasonic/Infrasonic.cpp +++ b/plugins/LinuxVST/src/Infrasonic/Infrasonic.cpp @@ -13,7 +13,7 @@ Infrasonic::Infrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Infrasonic/InfrasonicProc.cpp b/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp index 135fd5e33..653fac502 100755 --- a/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp +++ b/plugins/LinuxVST/src/Infrasonic/InfrasonicProc.cpp @@ -65,8 +65,8 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Interstage/Interstage.cpp b/plugins/LinuxVST/src/Interstage/Interstage.cpp index 9c8acdd11..92acc46cc 100755 --- a/plugins/LinuxVST/src/Interstage/Interstage.cpp +++ b/plugins/LinuxVST/src/Interstage/Interstage.cpp @@ -26,7 +26,7 @@ Interstage::Interstage(audioMasterCallback audioMaster) : iirSampleER = 0.0; iirSampleFR = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/LinuxVST/src/Interstage/InterstageProc.cpp b/plugins/LinuxVST/src/Interstage/InterstageProc.cpp index 181983f57..2707bd744 100755 --- a/plugins/LinuxVST/src/Interstage/InterstageProc.cpp +++ b/plugins/LinuxVST/src/Interstage/InterstageProc.cpp @@ -26,8 +26,8 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -77,11 +77,11 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Isolator/Isolator.cpp b/plugins/LinuxVST/src/Isolator/Isolator.cpp index 651a10ac6..c8222a86f 100755 --- a/plugins/LinuxVST/src/Isolator/Isolator.cpp +++ b/plugins/LinuxVST/src/Isolator/Isolator.cpp @@ -16,7 +16,7 @@ Isolator::Isolator(audioMasterCallback audioMaster) : A = 1.0; B = 0.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Isolator/IsolatorProc.cpp b/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp index ca777d947..4f7178a86 100755 --- a/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp +++ b/plugins/LinuxVST/src/Isolator/IsolatorProc.cpp @@ -64,8 +64,8 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = *in1; double drySampleR = *in2; @@ -110,11 +110,11 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Loud/Loud.cpp b/plugins/LinuxVST/src/Loud/Loud.cpp index a8338382a..1f884deb1 100755 --- a/plugins/LinuxVST/src/Loud/Loud.cpp +++ b/plugins/LinuxVST/src/Loud/Loud.cpp @@ -17,7 +17,7 @@ Loud::Loud(audioMasterCallback audioMaster) : C = 1.0; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Loud/Loud.h b/plugins/LinuxVST/src/Loud/Loud.h index 610c99cde..14e613399 100755 --- a/plugins/LinuxVST/src/Loud/Loud.h +++ b/plugins/LinuxVST/src/Loud/Loud.h @@ -56,7 +56,8 @@ private: double lastSampleL; double lastSampleR; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/LinuxVST/src/Loud/LoudProc.cpp b/plugins/LinuxVST/src/Loud/LoudProc.cpp index 906f51dbd..260ba230d 100755 --- a/plugins/LinuxVST/src/Loud/LoudProc.cpp +++ b/plugins/LinuxVST/src/Loud/LoudProc.cpp @@ -31,8 +31,8 @@ void Loud::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { inputSampleL = *in1; inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; drySampleL = inputSampleL; drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Lowpass2/Lowpass2.cpp b/plugins/LinuxVST/src/Lowpass2/Lowpass2.cpp index 6c463993f..1de69450a 100755 --- a/plugins/LinuxVST/src/Lowpass2/Lowpass2.cpp +++ b/plugins/LinuxVST/src/Lowpass2/Lowpass2.cpp @@ -16,7 +16,7 @@ Lowpass2::Lowpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp b/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp index 1dd3af06f..1bed77696 100755 --- a/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp +++ b/plugins/LinuxVST/src/Lowpass2/Lowpass2Proc.cpp @@ -41,42 +41,8 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -212,42 +178,8 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Luxor/Luxor.cpp b/plugins/LinuxVST/src/Luxor/Luxor.cpp index d00c67d05..001286dd8 100755 --- a/plugins/LinuxVST/src/Luxor/Luxor.cpp +++ b/plugins/LinuxVST/src/Luxor/Luxor.cpp @@ -18,7 +18,7 @@ Luxor::Luxor(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Luxor/LuxorProc.cpp b/plugins/LinuxVST/src/Luxor/LuxorProc.cpp index c8d0add39..89c8487ba 100755 --- a/plugins/LinuxVST/src/Luxor/LuxorProc.cpp +++ b/plugins/LinuxVST/src/Luxor/LuxorProc.cpp @@ -39,8 +39,8 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/MV/MV.cpp b/plugins/LinuxVST/src/MV/MV.cpp index 3db80c46b..90246abae 100755 --- a/plugins/LinuxVST/src/MV/MV.cpp +++ b/plugins/LinuxVST/src/MV/MV.cpp @@ -76,7 +76,7 @@ MV::MV(audioMasterCallback audioMaster) : feedbackL = 0.0; feedbackR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/MV/MV.h b/plugins/LinuxVST/src/MV/MV.h index 1586d41cc..5a60fa653 100755 --- a/plugins/LinuxVST/src/MV/MV.h +++ b/plugins/LinuxVST/src/MV/MV.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/LinuxVST/src/MV/MVProc.cpp b/plugins/LinuxVST/src/MV/MVProc.cpp index 11da2fce9..5a0b96333 100755 --- a/plugins/LinuxVST/src/MV/MVProc.cpp +++ b/plugins/LinuxVST/src/MV/MVProc.cpp @@ -34,42 +34,8 @@ void MV::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -830,42 +796,8 @@ void MV::processDoubleReplacing(double **inputs, double **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/MoNoam/MoNoam.cpp b/plugins/LinuxVST/src/MoNoam/MoNoam.cpp index 3612604d1..746f43edb 100755 --- a/plugins/LinuxVST/src/MoNoam/MoNoam.cpp +++ b/plugins/LinuxVST/src/MoNoam/MoNoam.cpp @@ -13,7 +13,7 @@ MoNoam::MoNoam(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/MoNoam/MoNoamProc.cpp b/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp index 64cc63a99..c7835d557 100755 --- a/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp +++ b/plugins/LinuxVST/src/MoNoam/MoNoamProc.cpp @@ -20,8 +20,8 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; double side; side = inputSampleL - inputSampleR; @@ -41,11 +41,11 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Mojo/Mojo.cpp b/plugins/LinuxVST/src/Mojo/Mojo.cpp index 7b34fbafd..78bb5c9c3 100755 --- a/plugins/LinuxVST/src/Mojo/Mojo.cpp +++ b/plugins/LinuxVST/src/Mojo/Mojo.cpp @@ -13,7 +13,7 @@ Mojo::Mojo(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Mojo/MojoProc.cpp b/plugins/LinuxVST/src/Mojo/MojoProc.cpp index 6687feea8..2597aae9e 100755 --- a/plugins/LinuxVST/src/Mojo/MojoProc.cpp +++ b/plugins/LinuxVST/src/Mojo/MojoProc.cpp @@ -20,8 +20,8 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Monitoring/Monitoring.cpp b/plugins/LinuxVST/src/Monitoring/Monitoring.cpp index 556e27cb2..635ca615b 100755 --- a/plugins/LinuxVST/src/Monitoring/Monitoring.cpp +++ b/plugins/LinuxVST/src/Monitoring/Monitoring.cpp @@ -60,7 +60,7 @@ Monitoring::Monitoring(audioMasterCallback audioMaster) : for (int x = 0; x < 11; x++) {biquadL[x] = 0.0; biquadR[x] = 0.0;} //Bandpasses A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Monitoring/MonitoringProc.cpp b/plugins/LinuxVST/src/Monitoring/MonitoringProc.cpp index 397d31b12..385884d3c 100755 --- a/plugins/LinuxVST/src/Monitoring/MonitoringProc.cpp +++ b/plugins/LinuxVST/src/Monitoring/MonitoringProc.cpp @@ -50,8 +50,8 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/LinuxVST/src/Neverland/Neverland.cpp b/plugins/LinuxVST/src/Neverland/Neverland.cpp index e0c4d5f9e..fae1d9216 100755 --- a/plugins/LinuxVST/src/Neverland/Neverland.cpp +++ b/plugins/LinuxVST/src/Neverland/Neverland.cpp @@ -19,7 +19,7 @@ Neverland::Neverland(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Neverland/NeverlandProc.cpp b/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp index 58493f8a3..02dcb04b7 100755 --- a/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp +++ b/plugins/LinuxVST/src/Neverland/NeverlandProc.cpp @@ -39,8 +39,8 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -167,11 +167,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Nikola/Nikola.cpp b/plugins/LinuxVST/src/Nikola/Nikola.cpp index 001eb37ef..6938af08c 100755 --- a/plugins/LinuxVST/src/Nikola/Nikola.cpp +++ b/plugins/LinuxVST/src/Nikola/Nikola.cpp @@ -23,7 +23,7 @@ Nikola::Nikola(audioMasterCallback audioMaster) : outlevelR = 0.0; framenumberR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Nikola/NikolaProc.cpp b/plugins/LinuxVST/src/Nikola/NikolaProc.cpp index 59738686d..3c049ce59 100755 --- a/plugins/LinuxVST/src/Nikola/NikolaProc.cpp +++ b/plugins/LinuxVST/src/Nikola/NikolaProc.cpp @@ -22,8 +22,8 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -1010,11 +1010,11 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/NotJustAnotherDither/NotJustAnotherDither.cpp b/plugins/LinuxVST/src/NotJustAnotherDither/NotJustAnotherDither.cpp index 7727b5010..e90337260 100755 --- a/plugins/LinuxVST/src/NotJustAnotherDither/NotJustAnotherDither.cpp +++ b/plugins/LinuxVST/src/NotJustAnotherDither/NotJustAnotherDither.cpp @@ -14,7 +14,7 @@ NotJustAnotherDither::NotJustAnotherDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bynL[0] = 1000; bynL[1] = 301; bynL[2] = 176; diff --git a/plugins/LinuxVST/src/Pafnuty/PafnutyProc.cpp b/plugins/LinuxVST/src/Pafnuty/PafnutyProc.cpp index 79d2326a1..38e2b05a3 100755 --- a/plugins/LinuxVST/src/Pafnuty/PafnutyProc.cpp +++ b/plugins/LinuxVST/src/Pafnuty/PafnutyProc.cpp @@ -61,42 +61,8 @@ void Pafnuty::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; @@ -331,42 +297,8 @@ void Pafnuty::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; diff --git a/plugins/LinuxVST/src/PaulDither/PaulDither.cpp b/plugins/LinuxVST/src/PaulDither/PaulDither.cpp index faa056409..f9a8de8b7 100755 --- a/plugins/LinuxVST/src/PaulDither/PaulDither.cpp +++ b/plugins/LinuxVST/src/PaulDither/PaulDither.cpp @@ -14,7 +14,7 @@ PaulDither::PaulDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDitherL = 0.0; previousDitherR = 0.0; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/LinuxVST/src/PeaksOnly/PeaksOnly.cpp b/plugins/LinuxVST/src/PeaksOnly/PeaksOnly.cpp index db59ae94f..73fd7bacc 100755 --- a/plugins/LinuxVST/src/PeaksOnly/PeaksOnly.cpp +++ b/plugins/LinuxVST/src/PeaksOnly/PeaksOnly.cpp @@ -14,7 +14,7 @@ PeaksOnly::PeaksOnly(audioMasterCallback audioMaster) : { for(int count = 0; count < 1502; count++) {aL[count] = 0.0; bL[count] = 0.0; cL[count] = 0.0; dL[count] = 0.0;aR[count] = 0.0; bR[count] = 0.0; cR[count] = 0.0; dR[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp b/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp index 39a49e8c1..d7d4af84c 100755 --- a/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp +++ b/plugins/LinuxVST/src/PeaksOnly/PeaksOnlyProc.cpp @@ -28,8 +28,8 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; @@ -129,11 +129,11 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/PocketVerbs/PocketVerbs.cpp b/plugins/LinuxVST/src/PocketVerbs/PocketVerbs.cpp index 4426e4b76..f4102466c 100755 --- a/plugins/LinuxVST/src/PocketVerbs/PocketVerbs.cpp +++ b/plugins/LinuxVST/src/PocketVerbs/PocketVerbs.cpp @@ -191,7 +191,7 @@ PocketVerbs::PocketVerbs(audioMasterCallback audioMaster) : countdown = -1; peakL = 1.0; peakR = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp b/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp index c6ab00834..5d8a7d157 100755 --- a/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp +++ b/plugins/LinuxVST/src/PocketVerbs/PocketVerbsProc.cpp @@ -472,8 +472,8 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -9168,11 +9168,11 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Podcast/Podcast.cpp b/plugins/LinuxVST/src/Podcast/Podcast.cpp index a29cc27da..decf86e4d 100755 --- a/plugins/LinuxVST/src/Podcast/Podcast.cpp +++ b/plugins/LinuxVST/src/Podcast/Podcast.cpp @@ -18,7 +18,7 @@ Podcast::Podcast(audioMasterCallback audioMaster) : c1L = 2.0; c2L = 2.0; c3L = 2.0; c4L = 2.0; c5L = 2.0; //startup comp gains c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Podcast/PodcastProc.cpp b/plugins/LinuxVST/src/Podcast/PodcastProc.cpp index 4a4c4fdd6..a6bd88d45 100755 --- a/plugins/LinuxVST/src/Podcast/PodcastProc.cpp +++ b/plugins/LinuxVST/src/Podcast/PodcastProc.cpp @@ -32,8 +32,8 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -149,11 +149,11 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxe.cpp b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxe.cpp index 2b48a0d56..6765486f7 100755 --- a/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxe.cpp +++ b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxe.cpp @@ -32,7 +32,7 @@ PodcastDeluxe::PodcastDeluxe(audioMasterCallback audioMaster) : maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp index eafe49669..2f306c079 100755 --- a/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp +++ b/plugins/LinuxVST/src/PodcastDeluxe/PodcastDeluxeProc.cpp @@ -47,8 +47,8 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; allpasstemp = tap1 - 1; @@ -316,11 +316,11 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Pop/Pop.cpp b/plugins/LinuxVST/src/Pop/Pop.cpp index 9ebd38106..a48aea872 100755 --- a/plugins/LinuxVST/src/Pop/Pop.cpp +++ b/plugins/LinuxVST/src/Pop/Pop.cpp @@ -15,7 +15,7 @@ Pop::Pop(audioMasterCallback audioMaster) : A = 0.3; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 10000; count++) {dL[count] = 0; dR[count] = 0;} delay = 0; diff --git a/plugins/LinuxVST/src/Pop/Pop.h b/plugins/LinuxVST/src/Pop/Pop.h index 9784b4ee5..9411334aa 100755 --- a/plugins/LinuxVST/src/Pop/Pop.h +++ b/plugins/LinuxVST/src/Pop/Pop.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double muVaryL; diff --git a/plugins/LinuxVST/src/Pop/PopProc.cpp b/plugins/LinuxVST/src/Pop/PopProc.cpp index 44e7efd3a..85422c511 100755 --- a/plugins/LinuxVST/src/Pop/PopProc.cpp +++ b/plugins/LinuxVST/src/Pop/PopProc.cpp @@ -37,8 +37,8 @@ void Pop::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/PowerSag2/PowerSag2.cpp b/plugins/LinuxVST/src/PowerSag2/PowerSag2.cpp index bcf7fdad6..2e68a9376 100755 --- a/plugins/LinuxVST/src/PowerSag2/PowerSag2.cpp +++ b/plugins/LinuxVST/src/PowerSag2/PowerSag2.cpp @@ -20,7 +20,7 @@ PowerSag2::PowerSag2(audioMasterCallback audioMaster) : A = 0.3; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp b/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp index 69e12f697..4b637c3ff 100755 --- a/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp +++ b/plugins/LinuxVST/src/PowerSag2/PowerSag2Proc.cpp @@ -22,8 +22,8 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Precious/Precious.cpp b/plugins/LinuxVST/src/Precious/Precious.cpp index ee2061a86..78a045cf8 100755 --- a/plugins/LinuxVST/src/Precious/Precious.cpp +++ b/plugins/LinuxVST/src/Precious/Precious.cpp @@ -18,7 +18,7 @@ Precious::Precious(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Precious/PreciousProc.cpp b/plugins/LinuxVST/src/Precious/PreciousProc.cpp index d15680a95..a2de05c32 100755 --- a/plugins/LinuxVST/src/Precious/PreciousProc.cpp +++ b/plugins/LinuxVST/src/Precious/PreciousProc.cpp @@ -39,8 +39,8 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/PurestAir/PurestAir.cpp b/plugins/LinuxVST/src/PurestAir/PurestAir.cpp index 3314d21b2..66e9e4d72 100755 --- a/plugins/LinuxVST/src/PurestAir/PurestAir.cpp +++ b/plugins/LinuxVST/src/PurestAir/PurestAir.cpp @@ -25,7 +25,7 @@ PurestAir::PurestAir(audioMasterCallback audioMaster) : lastSampleR = 0.0; s1R = s2R = s3R = 0.0; applyR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PurestAir/PurestAirProc.cpp b/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp index 362e27217..d2df18951 100755 --- a/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp +++ b/plugins/LinuxVST/src/PurestAir/PurestAirProc.cpp @@ -25,8 +25,8 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -95,11 +95,11 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/PurestFade/PurestFade.cpp b/plugins/LinuxVST/src/PurestFade/PurestFade.cpp index 5c0fd45b4..b86eea6b7 100755 --- a/plugins/LinuxVST/src/PurestFade/PurestFade.cpp +++ b/plugins/LinuxVST/src/PurestFade/PurestFade.cpp @@ -18,7 +18,7 @@ PurestFade::PurestFade(audioMasterCallback audioMaster) : settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PurestFade/PurestFadeProc.cpp b/plugins/LinuxVST/src/PurestFade/PurestFadeProc.cpp index 31f0a9d17..98f7d8d70 100755 --- a/plugins/LinuxVST/src/PurestFade/PurestFadeProc.cpp +++ b/plugins/LinuxVST/src/PurestFade/PurestFadeProc.cpp @@ -49,8 +49,8 @@ void PurestFade::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; targetgain = pow(10.0,settingchase/20.0); //now we have the target in our temp variable diff --git a/plugins/LinuxVST/src/PurestSquish/PurestSquish.cpp b/plugins/LinuxVST/src/PurestSquish/PurestSquish.cpp index 16543c40a..1ea9b70fe 100755 --- a/plugins/LinuxVST/src/PurestSquish/PurestSquish.cpp +++ b/plugins/LinuxVST/src/PurestSquish/PurestSquish.cpp @@ -64,7 +64,7 @@ PurestSquish::PurestSquish(audioMasterCallback audioMaster) : count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/PurestSquish/PurestSquish.h b/plugins/LinuxVST/src/PurestSquish/PurestSquish.h index d5b93a9cb..a1c96fccb 100755 --- a/plugins/LinuxVST/src/PurestSquish/PurestSquish.h +++ b/plugins/LinuxVST/src/PurestSquish/PurestSquish.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/LinuxVST/src/PurestSquish/PurestSquishProc.cpp b/plugins/LinuxVST/src/PurestSquish/PurestSquishProc.cpp index 946d23963..e763aa5ce 100755 --- a/plugins/LinuxVST/src/PurestSquish/PurestSquishProc.cpp +++ b/plugins/LinuxVST/src/PurestSquish/PurestSquishProc.cpp @@ -32,42 +32,8 @@ void PurestSquish::processReplacing(float **inputs, float **outputs, VstInt32 sa double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -536,42 +502,8 @@ void PurestSquish::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/RawGlitters/RawGlitters.cpp b/plugins/LinuxVST/src/RawGlitters/RawGlitters.cpp index 30804e218..cdd0c545f 100755 --- a/plugins/LinuxVST/src/RawGlitters/RawGlitters.cpp +++ b/plugins/LinuxVST/src/RawGlitters/RawGlitters.cpp @@ -14,7 +14,7 @@ RawGlitters::RawGlitters(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/LinuxVST/src/RawTimbers/RawTimbers.cpp b/plugins/LinuxVST/src/RawTimbers/RawTimbers.cpp index 65ad02672..da85dbaf2 100755 --- a/plugins/LinuxVST/src/RawTimbers/RawTimbers.cpp +++ b/plugins/LinuxVST/src/RawTimbers/RawTimbers.cpp @@ -14,7 +14,7 @@ RawTimbers::RawTimbers(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/LinuxVST/src/Recurve/Recurve.cpp b/plugins/LinuxVST/src/Recurve/Recurve.cpp index 611289eee..a669540a9 100755 --- a/plugins/LinuxVST/src/Recurve/Recurve.cpp +++ b/plugins/LinuxVST/src/Recurve/Recurve.cpp @@ -13,7 +13,7 @@ Recurve::Recurve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Recurve/RecurveProc.cpp b/plugins/LinuxVST/src/Recurve/RecurveProc.cpp index fc20e5b25..1b56af4a1 100755 --- a/plugins/LinuxVST/src/Recurve/RecurveProc.cpp +++ b/plugins/LinuxVST/src/Recurve/RecurveProc.cpp @@ -19,8 +19,8 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -45,11 +45,11 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Remap/Remap.cpp b/plugins/LinuxVST/src/Remap/Remap.cpp index aef092060..b4663c529 100755 --- a/plugins/LinuxVST/src/Remap/Remap.cpp +++ b/plugins/LinuxVST/src/Remap/Remap.cpp @@ -15,7 +15,7 @@ Remap::Remap(audioMasterCallback audioMaster) : A = 0.5; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Remap/RemapProc.cpp b/plugins/LinuxVST/src/Remap/RemapProc.cpp index b9227743f..32bb5b9e6 100755 --- a/plugins/LinuxVST/src/Remap/RemapProc.cpp +++ b/plugins/LinuxVST/src/Remap/RemapProc.cpp @@ -23,8 +23,8 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -64,11 +64,11 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/ResEQ/ResEQ.cpp b/plugins/LinuxVST/src/ResEQ/ResEQ.cpp index 37a7b4244..feffbda53 100755 --- a/plugins/LinuxVST/src/ResEQ/ResEQ.cpp +++ b/plugins/LinuxVST/src/ResEQ/ResEQ.cpp @@ -26,7 +26,7 @@ ResEQ::ResEQ(audioMasterCallback audioMaster) : bR[count] = 0.0; fR[count] = 0.0; } framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/ResEQ/ResEQProc.cpp b/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp index c9c21c0dd..22c389843 100755 --- a/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp +++ b/plugins/LinuxVST/src/ResEQ/ResEQProc.cpp @@ -130,8 +130,8 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -284,11 +284,11 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Slew3/Slew3.cpp b/plugins/LinuxVST/src/Slew3/Slew3.cpp index 03a8dc410..5bf29f586 100755 --- a/plugins/LinuxVST/src/Slew3/Slew3.cpp +++ b/plugins/LinuxVST/src/Slew3/Slew3.cpp @@ -15,7 +15,7 @@ Slew3::Slew3(audioMasterCallback audioMaster) : A = 0.0; lastSampleAL = lastSampleBL = lastSampleCL = 0.0; lastSampleAR = lastSampleBR = lastSampleCR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Slew3/Slew3Proc.cpp b/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp index 18177c5ea..297a4f6e3 100755 --- a/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp +++ b/plugins/LinuxVST/src/Slew3/Slew3Proc.cpp @@ -24,8 +24,8 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //begin L double clamp = (lastSampleBL - lastSampleCL) * 0.381966011250105; @@ -63,11 +63,11 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/Smooth/Smooth.cpp b/plugins/LinuxVST/src/Smooth/Smooth.cpp index a8b656ff3..6509d2aeb 100755 --- a/plugins/LinuxVST/src/Smooth/Smooth.cpp +++ b/plugins/LinuxVST/src/Smooth/Smooth.cpp @@ -38,7 +38,7 @@ Smooth::Smooth(audioMasterCallback audioMaster) : lastSampleER = 0.0; gainER = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Smooth/SmoothProc.cpp b/plugins/LinuxVST/src/Smooth/SmoothProc.cpp index 81df54143..9d532987c 100755 --- a/plugins/LinuxVST/src/Smooth/SmoothProc.cpp +++ b/plugins/LinuxVST/src/Smooth/SmoothProc.cpp @@ -31,42 +31,8 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -176,11 +142,11 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -217,42 +183,8 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/SoftGate/SoftGate.cpp b/plugins/LinuxVST/src/SoftGate/SoftGate.cpp index aae0129b0..4db4f8f2f 100755 --- a/plugins/LinuxVST/src/SoftGate/SoftGate.cpp +++ b/plugins/LinuxVST/src/SoftGate/SoftGate.cpp @@ -20,7 +20,7 @@ SoftGate::SoftGate(audioMasterCallback audioMaster) : storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/SoftGate/SoftGateProc.cpp b/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp index ba8d6358c..f08b9563c 100755 --- a/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp +++ b/plugins/LinuxVST/src/SoftGate/SoftGateProc.cpp @@ -28,8 +28,8 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; @@ -59,11 +59,11 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/SpatializeDither/SpatializeDither.cpp b/plugins/LinuxVST/src/SpatializeDither/SpatializeDither.cpp index 68cac32e0..e4ebc5549 100755 --- a/plugins/LinuxVST/src/SpatializeDither/SpatializeDither.cpp +++ b/plugins/LinuxVST/src/SpatializeDither/SpatializeDither.cpp @@ -14,7 +14,7 @@ SpatializeDither::SpatializeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; contingentErrL = 0.0; contingentErrR = 0.0; flip = false; diff --git a/plugins/LinuxVST/src/Spiral/Spiral.cpp b/plugins/LinuxVST/src/Spiral/Spiral.cpp index 9a1c0bec3..88106caf6 100755 --- a/plugins/LinuxVST/src/Spiral/Spiral.cpp +++ b/plugins/LinuxVST/src/Spiral/Spiral.cpp @@ -12,7 +12,7 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new S Spiral::Spiral(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Spiral/Spiral.h b/plugins/LinuxVST/src/Spiral/Spiral.h index f20476204..439f7cecc 100755 --- a/plugins/LinuxVST/src/Spiral/Spiral.h +++ b/plugins/LinuxVST/src/Spiral/Spiral.h @@ -51,7 +51,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff }; diff --git a/plugins/LinuxVST/src/Spiral/SpiralProc.cpp b/plugins/LinuxVST/src/Spiral/SpiralProc.cpp index f672d63d1..5e75e82c4 100755 --- a/plugins/LinuxVST/src/Spiral/SpiralProc.cpp +++ b/plugins/LinuxVST/src/Spiral/SpiralProc.cpp @@ -19,8 +19,8 @@ void Spiral::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //clip to 1.2533141373155 to reach maximum output diff --git a/plugins/LinuxVST/src/Spiral2/Spiral2.cpp b/plugins/LinuxVST/src/Spiral2/Spiral2.cpp index 44703eeb4..4d1f8bb1e 100755 --- a/plugins/LinuxVST/src/Spiral2/Spiral2.cpp +++ b/plugins/LinuxVST/src/Spiral2/Spiral2.cpp @@ -20,7 +20,7 @@ Spiral2::Spiral2(audioMasterCallback audioMaster) : iirSampleAL = 0.0; iirSampleBL = 0.0; prevSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAR = 0.0; iirSampleBR = 0.0; diff --git a/plugins/LinuxVST/src/Spiral2/Spiral2.h b/plugins/LinuxVST/src/Spiral2/Spiral2.h index 7da43323c..3f64ec340 100755 --- a/plugins/LinuxVST/src/Spiral2/Spiral2.h +++ b/plugins/LinuxVST/src/Spiral2/Spiral2.h @@ -59,7 +59,8 @@ private: double iirSampleAL; double iirSampleBL; double prevSampleL; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double iirSampleAR; double iirSampleBR; diff --git a/plugins/LinuxVST/src/Spiral2/Spiral2Proc.cpp b/plugins/LinuxVST/src/Spiral2/Spiral2Proc.cpp index 36f15560c..d29127db5 100755 --- a/plugins/LinuxVST/src/Spiral2/Spiral2Proc.cpp +++ b/plugins/LinuxVST/src/Spiral2/Spiral2Proc.cpp @@ -29,8 +29,8 @@ void Spiral2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/TPDFDither/TPDFDither.cpp b/plugins/LinuxVST/src/TPDFDither/TPDFDither.cpp index 6ba4c807d..2e8df5daa 100755 --- a/plugins/LinuxVST/src/TPDFDither/TPDFDither.cpp +++ b/plugins/LinuxVST/src/TPDFDither/TPDFDither.cpp @@ -14,7 +14,7 @@ TPDFDither::TPDFDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. diff --git a/plugins/LinuxVST/src/Tape/Tape.cpp b/plugins/LinuxVST/src/Tape/Tape.cpp index a34d8b788..8631f6bf1 100755 --- a/plugins/LinuxVST/src/Tape/Tape.cpp +++ b/plugins/LinuxVST/src/Tape/Tape.cpp @@ -29,7 +29,7 @@ Tape::Tape(audioMasterCallback audioMaster) : flip = false; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Tape/TapeProc.cpp b/plugins/LinuxVST/src/Tape/TapeProc.cpp index 4d498b2cd..2f26675ed 100755 --- a/plugins/LinuxVST/src/Tape/TapeProc.cpp +++ b/plugins/LinuxVST/src/Tape/TapeProc.cpp @@ -47,8 +47,8 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -269,11 +269,11 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/TapeDelay/TapeDelayProc.cpp b/plugins/LinuxVST/src/TapeDelay/TapeDelayProc.cpp index ef32867b9..6f42b02ff 100755 --- a/plugins/LinuxVST/src/TapeDelay/TapeDelayProc.cpp +++ b/plugins/LinuxVST/src/TapeDelay/TapeDelayProc.cpp @@ -38,42 +38,8 @@ void TapeDelay::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -205,42 +171,8 @@ void TapeDelay::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/LinuxVST/src/TapeDither/TapeDither.cpp b/plugins/LinuxVST/src/TapeDither/TapeDither.cpp index f9ba70917..be85fcdb2 100755 --- a/plugins/LinuxVST/src/TapeDither/TapeDither.cpp +++ b/plugins/LinuxVST/src/TapeDither/TapeDither.cpp @@ -14,7 +14,7 @@ TapeDither::TapeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDither1L = 0.0; previousDither2L = 0.0; previousDither3L = 0.0; diff --git a/plugins/LinuxVST/src/TapeFat/TapeFatProc.cpp b/plugins/LinuxVST/src/TapeFat/TapeFatProc.cpp index 7d0e52a57..1411a1454 100755 --- a/plugins/LinuxVST/src/TapeFat/TapeFatProc.cpp +++ b/plugins/LinuxVST/src/TapeFat/TapeFatProc.cpp @@ -28,42 +28,8 @@ void TapeFat::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -159,42 +125,8 @@ void TapeFat::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/LinuxVST/src/ToTape6/ToTape6.cpp b/plugins/LinuxVST/src/ToTape6/ToTape6.cpp index d9dd27d8d..741b7565e 100755 --- a/plugins/LinuxVST/src/ToTape6/ToTape6.cpp +++ b/plugins/LinuxVST/src/ToTape6/ToTape6.cpp @@ -43,7 +43,7 @@ ToTape6::ToTape6(audioMasterCallback audioMaster) : lastSampleR = 0.0; flip = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/ToTape6/ToTape6Proc.cpp b/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp index 49e72323b..f3a052485 100755 --- a/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp +++ b/plugins/LinuxVST/src/ToTape6/ToTape6Proc.cpp @@ -56,8 +56,8 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,11 +324,11 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/TremoSquare/TremoSquare.cpp b/plugins/LinuxVST/src/TremoSquare/TremoSquare.cpp index 29422d4f1..e854b11ac 100755 --- a/plugins/LinuxVST/src/TremoSquare/TremoSquare.cpp +++ b/plugins/LinuxVST/src/TremoSquare/TremoSquare.cpp @@ -19,7 +19,7 @@ TremoSquare::TremoSquare(audioMasterCallback audioMaster) : muteL = false; polarityR = false; muteR = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/TremoSquare/TremoSquareProc.cpp b/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp index 1c627a8e6..ec7d1b27b 100755 --- a/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp +++ b/plugins/LinuxVST/src/TremoSquare/TremoSquareProc.cpp @@ -25,8 +25,8 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/TripleSpread/TripleSpread.cpp b/plugins/LinuxVST/src/TripleSpread/TripleSpread.cpp index 736b3f379..7e4926290 100755 --- a/plugins/LinuxVST/src/TripleSpread/TripleSpread.cpp +++ b/plugins/LinuxVST/src/TripleSpread/TripleSpread.cpp @@ -51,7 +51,7 @@ TripleSpread::TripleSpread(audioMasterCallback audioMaster) : A = 0.5; B = 0.5; C = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp b/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp index 6bd70e790..ef7721197 100755 --- a/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp +++ b/plugins/LinuxVST/src/TripleSpread/TripleSpreadProc.cpp @@ -23,8 +23,8 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -309,11 +309,11 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -342,8 +342,8 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Ultrasonic/Ultrasonic.cpp b/plugins/LinuxVST/src/Ultrasonic/Ultrasonic.cpp index 6c0b6fc6f..e58027991 100755 --- a/plugins/LinuxVST/src/Ultrasonic/Ultrasonic.cpp +++ b/plugins/LinuxVST/src/Ultrasonic/Ultrasonic.cpp @@ -13,7 +13,7 @@ Ultrasonic::Ultrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp b/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp index 0bb52e5e0..96ee029c7 100755 --- a/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp +++ b/plugins/LinuxVST/src/Ultrasonic/UltrasonicProc.cpp @@ -65,8 +65,8 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp b/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp index 8bf48c273..cbce9a998 100644 --- a/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp +++ b/plugins/LinuxVST/src/UltrasonicLite/UltrasonicLiteProc.cpp @@ -30,8 +30,8 @@ void UltrasonicLite::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -41,11 +41,11 @@ void UltrasonicLite::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp b/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp index 152e5b0ce..8e3cb8250 100644 --- a/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp +++ b/plugins/LinuxVST/src/UltrasonicMed/UltrasonicMedProc.cpp @@ -43,8 +43,8 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -60,11 +60,11 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/UnBox/UnBox.cpp b/plugins/LinuxVST/src/UnBox/UnBox.cpp index 7916ea55e..221f617d6 100755 --- a/plugins/LinuxVST/src/UnBox/UnBox.cpp +++ b/plugins/LinuxVST/src/UnBox/UnBox.cpp @@ -23,7 +23,7 @@ UnBox::UnBox(audioMasterCallback audioMaster) : iirSampleAR = 0.0; iirSampleBR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/UnBox/UnBox.h b/plugins/LinuxVST/src/UnBox/UnBox.h index 0de78a63d..838b6062e 100755 --- a/plugins/LinuxVST/src/UnBox/UnBox.h +++ b/plugins/LinuxVST/src/UnBox/UnBox.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double aL[5]; double bL[5]; diff --git a/plugins/LinuxVST/src/UnBox/UnBoxProc.cpp b/plugins/LinuxVST/src/UnBox/UnBoxProc.cpp index e45e21e08..7ebfc88fe 100755 --- a/plugins/LinuxVST/src/UnBox/UnBoxProc.cpp +++ b/plugins/LinuxVST/src/UnBox/UnBoxProc.cpp @@ -73,8 +73,8 @@ void UnBox::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (input != 1.0) {inputSampleL *= input; inputSampleR *= input;} - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/LinuxVST/src/Vibrato/Vibrato.cpp b/plugins/LinuxVST/src/Vibrato/Vibrato.cpp index 6ea3c86d2..6b32cea10 100755 --- a/plugins/LinuxVST/src/Vibrato/Vibrato.cpp +++ b/plugins/LinuxVST/src/Vibrato/Vibrato.cpp @@ -34,7 +34,7 @@ Vibrato::Vibrato(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/Vibrato/VibratoProc.cpp b/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp index 150da0987..f196e90e2 100755 --- a/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp +++ b/plugins/LinuxVST/src/Vibrato/VibratoProc.cpp @@ -24,8 +24,8 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -88,11 +88,11 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/VinylDither/VinylDither.cpp b/plugins/LinuxVST/src/VinylDither/VinylDither.cpp index 2d719fd56..9123d5431 100755 --- a/plugins/LinuxVST/src/VinylDither/VinylDither.cpp +++ b/plugins/LinuxVST/src/VinylDither/VinylDither.cpp @@ -14,7 +14,7 @@ VinylDither::VinylDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; NSOddL = 0.0; prevL = 0.0; nsL[0] = 0; diff --git a/plugins/LinuxVST/src/VoiceTrick/VoiceTrick.cpp b/plugins/LinuxVST/src/VoiceTrick/VoiceTrick.cpp index ee066c80d..1553a504a 100755 --- a/plugins/LinuxVST/src/VoiceTrick/VoiceTrick.cpp +++ b/plugins/LinuxVST/src/VoiceTrick/VoiceTrick.cpp @@ -23,7 +23,7 @@ VoiceTrick::VoiceTrick(audioMasterCallback audioMaster) : lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp b/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp index 0de1f49ae..53ecb0fff 100755 --- a/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp +++ b/plugins/LinuxVST/src/VoiceTrick/VoiceTrickProc.cpp @@ -25,8 +25,8 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -93,11 +93,11 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/curve/curve.cpp b/plugins/LinuxVST/src/curve/curve.cpp index c814f421d..8c4e78f40 100755 --- a/plugins/LinuxVST/src/curve/curve.cpp +++ b/plugins/LinuxVST/src/curve/curve.cpp @@ -13,7 +13,7 @@ curve::curve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/LinuxVST/src/curve/curveProc.cpp b/plugins/LinuxVST/src/curve/curveProc.cpp index 3a3f18b86..1b607c120 100755 --- a/plugins/LinuxVST/src/curve/curveProc.cpp +++ b/plugins/LinuxVST/src/curve/curveProc.cpp @@ -19,8 +19,8 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -39,11 +39,11 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/LinuxVST/src/uLawDecode/uLawDecodeProc.cpp b/plugins/LinuxVST/src/uLawDecode/uLawDecodeProc.cpp index 0c0ee1f1f..45a85c80a 100755 --- a/plugins/LinuxVST/src/uLawDecode/uLawDecodeProc.cpp +++ b/plugins/LinuxVST/src/uLawDecode/uLawDecodeProc.cpp @@ -27,42 +27,8 @@ void uLawDecode::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -127,42 +93,8 @@ void uLawDecode::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacAU/ADT/ADT.cpp b/plugins/MacAU/ADT/ADT.cpp index 2a267050d..5f3a2d5dd 100755 --- a/plugins/MacAU/ADT/ADT.cpp +++ b/plugins/MacAU/ADT/ADT.cpp @@ -202,7 +202,7 @@ void ADT::ADTKernel::Reset() offsetA = 9001; offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Apicolypse/Apicolypse.cpp b/plugins/MacAU/Apicolypse/Apicolypse.cpp index 9d5d20932..e19bbb3ab 100755 --- a/plugins/MacAU/Apicolypse/Apicolypse.cpp +++ b/plugins/MacAU/Apicolypse/Apicolypse.cpp @@ -184,7 +184,7 @@ void Apicolypse::ApicolypseKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/AverMatrix/AverMatrix.cpp b/plugins/MacAU/AverMatrix/AverMatrix.cpp index bf2cc7eec..9cf3a9ea6 100755 --- a/plugins/MacAU/AverMatrix/AverMatrix.cpp +++ b/plugins/MacAU/AverMatrix/AverMatrix.cpp @@ -182,7 +182,7 @@ void AverMatrix::AverMatrixKernel::Reset() f[x] = 0.0; for (int y = 0; y < 11; y++) b[x][y] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BassAmp/BassAmp.cpp b/plugins/MacAU/BassAmp/BassAmp.cpp index b72ec0275..52b974530 100755 --- a/plugins/MacAU/BassAmp/BassAmp.cpp +++ b/plugins/MacAU/BassAmp/BassAmp.cpp @@ -239,7 +239,7 @@ void BassAmp::BassAmpKernel::Reset() iirSampleY = 0.0; iirSampleZ = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BassDrive/BassDrive.cpp b/plugins/MacAU/BassDrive/BassDrive.cpp index abf9ae6ca..7fda5db12 100755 --- a/plugins/MacAU/BassDrive/BassDrive.cpp +++ b/plugins/MacAU/BassDrive/BassDrive.cpp @@ -210,7 +210,7 @@ void BassDrive::BassDriveKernel::Reset() lowOutB[fcount] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BassKit/BassKit.cpp b/plugins/MacAU/BassKit/BassKit.cpp index 670541a23..89c407be5 100755 --- a/plugins/MacAU/BassKit/BassKit.cpp +++ b/plugins/MacAU/BassKit/BassKit.cpp @@ -286,42 +286,8 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; iirDriveSampleB = (iirDriveSampleB * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleB; @@ -453,14 +419,14 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Baxandall/Baxandall.cpp b/plugins/MacAU/Baxandall/Baxandall.cpp index dafc1145d..88889c225 100755 --- a/plugins/MacAU/Baxandall/Baxandall.cpp +++ b/plugins/MacAU/Baxandall/Baxandall.cpp @@ -181,7 +181,7 @@ void Baxandall::BaxandallKernel::Reset() bassB[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Beam/Beam.cpp b/plugins/MacAU/Beam/Beam.cpp index fd931872d..f8868f837 100755 --- a/plugins/MacAU/Beam/Beam.cpp +++ b/plugins/MacAU/Beam/Beam.cpp @@ -190,7 +190,7 @@ ComponentResult Beam::Initialize() void Beam::BeamKernel::Reset() { for(int count = 0; count < 99; count++) {lastSample[count] = 0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Biquad/Biquad.cpp b/plugins/MacAU/Biquad/Biquad.cpp index 53f02245a..169c368e7 100755 --- a/plugins/MacAU/Biquad/Biquad.cpp +++ b/plugins/MacAU/Biquad/Biquad.cpp @@ -185,7 +185,7 @@ ComponentResult Biquad::Initialize() void Biquad::BiquadKernel::Reset() { for (int x = 0; x < 9; x++) {biquad[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Biquad2/Biquad2.cpp b/plugins/MacAU/Biquad2/Biquad2.cpp index a5e31165c..74dd4a321 100755 --- a/plugins/MacAU/Biquad2/Biquad2.cpp +++ b/plugins/MacAU/Biquad2/Biquad2.cpp @@ -204,7 +204,7 @@ void Biquad2::Biquad2Kernel::Reset() wetsetting = -2.0; //-1.0 is a possible setting here and this forces an update on chasespeed chasespeed = 500.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BiquadDouble/BiquadDouble.cpp b/plugins/MacAU/BiquadDouble/BiquadDouble.cpp index 6d49a3382..4669680f8 100755 --- a/plugins/MacAU/BiquadDouble/BiquadDouble.cpp +++ b/plugins/MacAU/BiquadDouble/BiquadDouble.cpp @@ -185,7 +185,7 @@ ComponentResult BiquadDouble::Initialize() void BiquadDouble::BiquadDoubleKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BiquadOneHalf/BiquadOneHalf.cpp b/plugins/MacAU/BiquadOneHalf/BiquadOneHalf.cpp index 8f426f1cc..d2339f2f1 100755 --- a/plugins/MacAU/BiquadOneHalf/BiquadOneHalf.cpp +++ b/plugins/MacAU/BiquadOneHalf/BiquadOneHalf.cpp @@ -186,7 +186,7 @@ void BiquadOneHalf::BiquadOneHalfKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;} flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BiquadStereo/BiquadStereo.cpp b/plugins/MacAU/BiquadStereo/BiquadStereo.cpp index aea65ebc7..1e38c1542 100755 --- a/plugins/MacAU/BiquadStereo/BiquadStereo.cpp +++ b/plugins/MacAU/BiquadStereo/BiquadStereo.cpp @@ -200,7 +200,8 @@ ComponentResult BiquadStereo::Initialize() ComponentResult BiquadStereo::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} - fpd = 17; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; return noErr; } @@ -292,8 +293,8 @@ OSStatus BiquadStereo::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -349,11 +350,11 @@ OSStatus BiquadStereo::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/BiquadTriple/BiquadTriple.cpp b/plugins/MacAU/BiquadTriple/BiquadTriple.cpp index 4e35a96f5..93219e5f2 100755 --- a/plugins/MacAU/BiquadTriple/BiquadTriple.cpp +++ b/plugins/MacAU/BiquadTriple/BiquadTriple.cpp @@ -185,7 +185,7 @@ ComponentResult BiquadTriple::Initialize() void BiquadTriple::BiquadTripleKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BlockParty/BlockParty.cpp b/plugins/MacAU/BlockParty/BlockParty.cpp index 2232224cf..d16804d06 100755 --- a/plugins/MacAU/BlockParty/BlockParty.cpp +++ b/plugins/MacAU/BlockParty/BlockParty.cpp @@ -186,7 +186,7 @@ void BlockParty::BlockPartyKernel::Reset() muVary = 1; count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BrassRider/BrassRider.cpp b/plugins/MacAU/BrassRider/BrassRider.cpp index 0a96b2f10..00787e8f3 100755 --- a/plugins/MacAU/BrassRider/BrassRider.cpp +++ b/plugins/MacAU/BrassRider/BrassRider.cpp @@ -194,7 +194,8 @@ ComponentResult BrassRider::Reset(AudioUnitScope inScope, AudioUnitElement inEl lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; return noErr; } @@ -297,12 +298,12 @@ OSStatus BrassRider::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl //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); - //end 32 bit stereo floating point dither + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/BrightAmbience/BrightAmbience.cpp b/plugins/MacAU/BrightAmbience/BrightAmbience.cpp index 29deb877d..807e47c93 100755 --- a/plugins/MacAU/BrightAmbience/BrightAmbience.cpp +++ b/plugins/MacAU/BrightAmbience/BrightAmbience.cpp @@ -176,7 +176,7 @@ void BrightAmbience::BrightAmbienceKernel::Reset() { for(int count = 0; count < 25360; count++) {p[count] = 0;} gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/BrightAmbience2/BrightAmbience2.cpp b/plugins/MacAU/BrightAmbience2/BrightAmbience2.cpp index 6b91d7b1b..bd56d7443 100755 --- a/plugins/MacAU/BrightAmbience2/BrightAmbience2.cpp +++ b/plugins/MacAU/BrightAmbience2/BrightAmbience2.cpp @@ -200,7 +200,8 @@ ComponentResult BrightAmbience2::Reset(AudioUnitScope inScope, AudioUnitElement for(int count = 0; count < 32767; count++) {pL[count] = 0.0; pR[count] = 0.0;} feedbackA = feedbackB = feedbackC = 0.0; gcount = 0; - fpd = 17; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; return noErr; } @@ -227,8 +228,8 @@ OSStatus BrightAmbience2::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -261,11 +262,11 @@ OSStatus BrightAmbience2::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/BrightAmbience3/BrightAmbience3.h b/plugins/MacAU/BrightAmbience3/BrightAmbience3.h index e72eeddea..06105de35 100644 --- a/plugins/MacAU/BrightAmbience3/BrightAmbience3.h +++ b/plugins/MacAU/BrightAmbience3/BrightAmbience3.h @@ -132,8 +132,7 @@ public: double lastRefL[10]; double lastRefR[10]; int cycle; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Calibre/Calibre.cpp b/plugins/MacAU/Calibre/Calibre.cpp index b5dd59e1c..35ac93241 100755 --- a/plugins/MacAU/Calibre/Calibre.cpp +++ b/plugins/MacAU/Calibre/Calibre.cpp @@ -184,7 +184,7 @@ void Calibre::CalibreKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Capacitor2/Capacitor2.cpp b/plugins/MacAU/Capacitor2/Capacitor2.cpp index 7fd68d331..a3596ed49 100755 --- a/plugins/MacAU/Capacitor2/Capacitor2.cpp +++ b/plugins/MacAU/Capacitor2/Capacitor2.cpp @@ -204,7 +204,7 @@ void Capacitor2::Capacitor2Kernel::Reset() lastLowpass = 1000.0; lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Channel6/Channel6.cpp b/plugins/MacAU/Channel6/Channel6.cpp index 781b0263b..da37af6ee 100755 --- a/plugins/MacAU/Channel6/Channel6.cpp +++ b/plugins/MacAU/Channel6/Channel6.cpp @@ -190,7 +190,7 @@ ComponentResult Channel6::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel6::Channel6Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = 0.0; iirSampleB = 0.0; flip = false; diff --git a/plugins/MacAU/Channel7/Channel7.cpp b/plugins/MacAU/Channel7/Channel7.cpp index 2aaa9011c..a0665c8b5 100755 --- a/plugins/MacAU/Channel7/Channel7.cpp +++ b/plugins/MacAU/Channel7/Channel7.cpp @@ -190,7 +190,7 @@ ComponentResult Channel7::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel7::Channel7Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = 0.0; iirSampleB = 0.0; flip = false; diff --git a/plugins/MacAU/Channel8/Channel8.cpp b/plugins/MacAU/Channel8/Channel8.cpp index 0e75f929a..0e2923c1f 100755 --- a/plugins/MacAU/Channel8/Channel8.cpp +++ b/plugins/MacAU/Channel8/Channel8.cpp @@ -190,7 +190,7 @@ ComponentResult Channel8::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel8::Channel8Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = iirSampleB = 0.0; flip = false; lastSampleA = lastSampleB = lastSampleC = 0.0; diff --git a/plugins/MacAU/ChromeOxide/ChromeOxide.cpp b/plugins/MacAU/ChromeOxide/ChromeOxide.cpp index 2d4c84f1d..3297ad31d 100755 --- a/plugins/MacAU/ChromeOxide/ChromeOxide.cpp +++ b/plugins/MacAU/ChromeOxide/ChromeOxide.cpp @@ -175,7 +175,7 @@ void ChromeOxide::ChromeOxideKernel::Reset() thirdSample = 0.0; fourthSample = 0.0; fifthSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Cider/Cider.cpp b/plugins/MacAU/Cider/Cider.cpp index 6cf579741..ba4a2e02c 100755 --- a/plugins/MacAU/Cider/Cider.cpp +++ b/plugins/MacAU/Cider/Cider.cpp @@ -184,7 +184,7 @@ void Cider::CiderKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Coils/Coils.cpp b/plugins/MacAU/Coils/Coils.cpp index d3c2fcd87..60ff87fb6 100755 --- a/plugins/MacAU/Coils/Coils.cpp +++ b/plugins/MacAU/Coils/Coils.cpp @@ -175,7 +175,7 @@ ComponentResult Coils::Initialize() void Coils::CoilsKernel::Reset() { for (int x = 0; x < 9; x++) {figure[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Compresaturator/Compresaturator.cpp b/plugins/MacAU/Compresaturator/Compresaturator.cpp index 74a9593bf..593b36f74 100755 --- a/plugins/MacAU/Compresaturator/Compresaturator.cpp +++ b/plugins/MacAU/Compresaturator/Compresaturator.cpp @@ -196,7 +196,7 @@ void Compresaturator::CompresaturatorKernel::Reset() dCount = 0; lastWidth = 500; padFactor = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Console6Buss/Console6Buss.cpp b/plugins/MacAU/Console6Buss/Console6Buss.cpp index 6b52e124b..55c18dfff 100755 --- a/plugins/MacAU/Console6Buss/Console6Buss.cpp +++ b/plugins/MacAU/Console6Buss/Console6Buss.cpp @@ -158,7 +158,7 @@ ComponentResult Console6Buss::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Console6Buss::Console6BussKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Console6Channel/Console6Channel.cpp b/plugins/MacAU/Console6Channel/Console6Channel.cpp index 212ef1b16..fad64ae04 100755 --- a/plugins/MacAU/Console6Channel/Console6Channel.cpp +++ b/plugins/MacAU/Console6Channel/Console6Channel.cpp @@ -158,7 +158,7 @@ ComponentResult Console6Channel::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Console6Channel::Console6ChannelKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Dark/Dark.cpp b/plugins/MacAU/Dark/Dark.cpp index 924e89fa0..6d0c1cad0 100755 --- a/plugins/MacAU/Dark/Dark.cpp +++ b/plugins/MacAU/Dark/Dark.cpp @@ -182,7 +182,7 @@ ComponentResult Dark::Initialize() void Dark::DarkKernel::Reset() { for(int count = 0; count < 99; count++) {lastSample[count] = 0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DeBess/DeBess.cpp b/plugins/MacAU/DeBess/DeBess.cpp index 1fcb1f054..5908fbbcb 100755 --- a/plugins/MacAU/DeBess/DeBess.cpp +++ b/plugins/MacAU/DeBess/DeBess.cpp @@ -195,7 +195,7 @@ void DeBess::DeBessKernel::Reset() iirSampleA = 0.0; iirSampleB = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DeHiss/DeHiss.cpp b/plugins/MacAU/DeHiss/DeHiss.cpp index ec1281561..5ed0e14ab 100755 --- a/plugins/MacAU/DeHiss/DeHiss.cpp +++ b/plugins/MacAU/DeHiss/DeHiss.cpp @@ -170,7 +170,7 @@ void DeHiss::DeHissKernel::Reset() diff[0] = diff[1] = diff[2] = diff[3] = diff[4] = diff[5] = 0.0; gate = 1.0; raw = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DeRez2/DeRez2.cpp b/plugins/MacAU/DeRez2/DeRez2.cpp index e265d612f..156958190 100755 --- a/plugins/MacAU/DeRez2/DeRez2.cpp +++ b/plugins/MacAU/DeRez2/DeRez2.cpp @@ -189,7 +189,7 @@ void DeRez2::DeRez2Kernel::Reset() position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Deckwrecka/Deckwrecka.cpp b/plugins/MacAU/Deckwrecka/Deckwrecka.cpp index 849e962db..40256b458 100755 --- a/plugins/MacAU/Deckwrecka/Deckwrecka.cpp +++ b/plugins/MacAU/Deckwrecka/Deckwrecka.cpp @@ -190,7 +190,7 @@ void Deckwrecka::DeckwreckaKernel::Reset() iirSampleY = 0.0; iirSampleZ = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DigitalBlack/DigitalBlack.cpp b/plugins/MacAU/DigitalBlack/DigitalBlack.cpp index f851f9648..24ad68790 100755 --- a/plugins/MacAU/DigitalBlack/DigitalBlack.cpp +++ b/plugins/MacAU/DigitalBlack/DigitalBlack.cpp @@ -169,7 +169,7 @@ void DigitalBlack::DigitalBlackKernel::Reset() WasNegative = false; ZeroCross = 0; gateroller = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Distortion/Distortion.cpp b/plugins/MacAU/Distortion/Distortion.cpp index d12c423b5..074d3cafb 100755 --- a/plugins/MacAU/Distortion/Distortion.cpp +++ b/plugins/MacAU/Distortion/Distortion.cpp @@ -201,7 +201,7 @@ ComponentResult Distortion::Initialize() void Distortion::DistortionKernel::Reset() { for (int x = 0; x < 9; x++) {previousIn[x] = 0.0; previousOut[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DitherFloat/DitherFloat.cpp b/plugins/MacAU/DitherFloat/DitherFloat.cpp index 47f58ab7f..573c38885 100755 --- a/plugins/MacAU/DitherFloat/DitherFloat.cpp +++ b/plugins/MacAU/DitherFloat/DitherFloat.cpp @@ -165,7 +165,7 @@ ComponentResult DitherFloat::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void DitherFloat::DitherFloatKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/DubCenter/DubCenter.cpp b/plugins/MacAU/DubCenter/DubCenter.cpp index 64777be88..141e77a07 100755 --- a/plugins/MacAU/DubCenter/DubCenter.cpp +++ b/plugins/MacAU/DubCenter/DubCenter.cpp @@ -354,42 +354,8 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -608,14 +574,14 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/DubCenter/DubCenter.h b/plugins/MacAU/DubCenter/DubCenter.h index 2fdc597f6..872b27821 100755 --- a/plugins/MacAU/DubCenter/DubCenter.h +++ b/plugins/MacAU/DubCenter/DubCenter.h @@ -192,8 +192,7 @@ public: Float64 iirSampleZ; Float64 oscGate; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Dyno/Dyno.cpp b/plugins/MacAU/Dyno/Dyno.cpp index c20f02c4a..50d2b0671 100755 --- a/plugins/MacAU/Dyno/Dyno.cpp +++ b/plugins/MacAU/Dyno/Dyno.cpp @@ -158,7 +158,7 @@ ComponentResult Dyno::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Dyno::DynoKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/EdIsDim/EdIsDim.h b/plugins/MacAU/EdIsDim/EdIsDim.h index 4eb106785..c4e926436 100755 --- a/plugins/MacAU/EdIsDim/EdIsDim.h +++ b/plugins/MacAU/EdIsDim/EdIsDim.h @@ -111,8 +111,7 @@ public: virtual ComponentResult Version() { return kEdIsDimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacAU/Elation/Elation.cpp b/plugins/MacAU/Elation/Elation.cpp index 1656de88e..0009e3282 100755 --- a/plugins/MacAU/Elation/Elation.cpp +++ b/plugins/MacAU/Elation/Elation.cpp @@ -186,7 +186,7 @@ void Elation::ElationKernel::Reset() compA = 1.0; compB = 1.0; flip = false; previous = 0.0; compC = 1.0; compD = 1.0; previousB = 0.0; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/EveryTrim/EveryTrim.cpp b/plugins/MacAU/EveryTrim/EveryTrim.cpp index 4b31e467d..4588938ee 100755 --- a/plugins/MacAU/EveryTrim/EveryTrim.cpp +++ b/plugins/MacAU/EveryTrim/EveryTrim.cpp @@ -253,14 +253,14 @@ OSStatus EveryTrim::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = (mid-side) * rightgain; //contains mastergain and the gain trim fixing the mid/side - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/EveryTrim/EveryTrim.h b/plugins/MacAU/EveryTrim/EveryTrim.h index 3aaa10b3c..a52abd9dd 100755 --- a/plugins/MacAU/EveryTrim/EveryTrim.h +++ b/plugins/MacAU/EveryTrim/EveryTrim.h @@ -121,8 +121,7 @@ public: virtual ComponentResult Version() { return kEveryTrimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; diff --git a/plugins/MacAU/Facet/Facet.cpp b/plugins/MacAU/Facet/Facet.cpp index 150437c8b..0c38a5f5c 100755 --- a/plugins/MacAU/Facet/Facet.cpp +++ b/plugins/MacAU/Facet/Facet.cpp @@ -158,7 +158,7 @@ ComponentResult Facet::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Facet::FacetKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Focus/Focus.cpp b/plugins/MacAU/Focus/Focus.cpp index 78e899a3b..157a6c089 100755 --- a/plugins/MacAU/Focus/Focus.cpp +++ b/plugins/MacAU/Focus/Focus.cpp @@ -209,7 +209,7 @@ ComponentResult Focus::Initialize() void Focus::FocusKernel::Reset() { for (int x = 0; x < 9; x++) {figure[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Galactic/Galactic.h b/plugins/MacAU/Galactic/Galactic.h index 44d229cd4..1c27b51d7 100644 --- a/plugins/MacAU/Galactic/Galactic.h +++ b/plugins/MacAU/Galactic/Galactic.h @@ -194,8 +194,7 @@ public: double vibM; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Gatelinked/Gatelinked.cpp b/plugins/MacAU/Gatelinked/Gatelinked.cpp index 0f5203fdf..aeb5f78e7 100755 --- a/plugins/MacAU/Gatelinked/Gatelinked.cpp +++ b/plugins/MacAU/Gatelinked/Gatelinked.cpp @@ -255,42 +255,8 @@ OSStatus Gatelinked::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -412,14 +378,14 @@ OSStatus Gatelinked::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/GlitchShifter/GlitchShifter.cpp b/plugins/MacAU/GlitchShifter/GlitchShifter.cpp index 825d5b180..f734b30b2 100755 --- a/plugins/MacAU/GlitchShifter/GlitchShifter.cpp +++ b/plugins/MacAU/GlitchShifter/GlitchShifter.cpp @@ -208,7 +208,7 @@ void GlitchShifter::GlitchShifterKernel::Reset() position = 0.0; flip = false; splicing = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Golem/Golem.cpp b/plugins/MacAU/Golem/Golem.cpp index 62d15ca75..c24631bc2 100755 --- a/plugins/MacAU/Golem/Golem.cpp +++ b/plugins/MacAU/Golem/Golem.cpp @@ -291,14 +291,14 @@ OSStatus Golem::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleR = inputSampleL; //the output is totally mono - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Golem/Golem.h b/plugins/MacAU/Golem/Golem.h index 8de93792b..0c145d7a4 100755 --- a/plugins/MacAU/Golem/Golem.h +++ b/plugins/MacAU/Golem/Golem.h @@ -132,8 +132,7 @@ public: private: Float64 p[4099]; int count; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Gringer/Gringer.cpp b/plugins/MacAU/Gringer/Gringer.cpp index 8777ac81a..5b488892f 100755 --- a/plugins/MacAU/Gringer/Gringer.cpp +++ b/plugins/MacAU/Gringer/Gringer.cpp @@ -151,7 +151,7 @@ ComponentResult Gringer::Initialize() void Gringer::GringerKernel::Reset() { for (int x = 0; x < 9; x++) {inband[x] = 0.0; outband[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/HermeTrim/HermeTrim.cpp b/plugins/MacAU/HermeTrim/HermeTrim.cpp index 91d6c74c4..44ae19b99 100755 --- a/plugins/MacAU/HermeTrim/HermeTrim.cpp +++ b/plugins/MacAU/HermeTrim/HermeTrim.cpp @@ -253,14 +253,14 @@ OSStatus HermeTrim::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = (mid-side) * rightgain; //contains mastergain and the gain trim fixing the mid/side - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/HermeTrim/HermeTrim.h b/plugins/MacAU/HermeTrim/HermeTrim.h index da24fea06..cc2584ff7 100755 --- a/plugins/MacAU/HermeTrim/HermeTrim.h +++ b/plugins/MacAU/HermeTrim/HermeTrim.h @@ -121,8 +121,7 @@ public: virtual ComponentResult Version() { return kHermeTrimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacAU/Highpass2/Highpass2.cpp b/plugins/MacAU/Highpass2/Highpass2.cpp index e2a1f5d06..f3c1f7b79 100755 --- a/plugins/MacAU/Highpass2/Highpass2.cpp +++ b/plugins/MacAU/Highpass2/Highpass2.cpp @@ -190,7 +190,7 @@ void Highpass2::Highpass2Kernel::Reset() iirSampleF = 0.0; iirSampleG = 0.0; iirSampleH = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; fpFlip = true; } diff --git a/plugins/MacAU/Holt/Holt.cpp b/plugins/MacAU/Holt/Holt.cpp index 4ab765b38..04a7bd0bc 100755 --- a/plugins/MacAU/Holt/Holt.cpp +++ b/plugins/MacAU/Holt/Holt.cpp @@ -198,7 +198,7 @@ void Holt::HoltKernel::Reset() previousTrendC = 0.0; previousSampleD = 0.0; previousTrendD = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Infrasonic/Infrasonic.cpp b/plugins/MacAU/Infrasonic/Infrasonic.cpp index 287fddff2..5a5cecdfc 100755 --- a/plugins/MacAU/Infrasonic/Infrasonic.cpp +++ b/plugins/MacAU/Infrasonic/Infrasonic.cpp @@ -151,7 +151,7 @@ ComponentResult Infrasonic::Initialize() void Infrasonic::InfrasonicKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Interstage/Interstage.cpp b/plugins/MacAU/Interstage/Interstage.cpp index 59f198b83..1bbfeb724 100755 --- a/plugins/MacAU/Interstage/Interstage.cpp +++ b/plugins/MacAU/Interstage/Interstage.cpp @@ -157,7 +157,7 @@ void Interstage::InterstageKernel::Reset() iirSampleE = 0.0; iirSampleF = 0.0; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; } diff --git a/plugins/MacAU/Isolator/Isolator.cpp b/plugins/MacAU/Isolator/Isolator.cpp index 02fd58787..a8c74affd 100755 --- a/plugins/MacAU/Isolator/Isolator.cpp +++ b/plugins/MacAU/Isolator/Isolator.cpp @@ -175,7 +175,7 @@ ComponentResult Isolator::Initialize() void Isolator::IsolatorKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Logical4/Logical4.cpp b/plugins/MacAU/Logical4/Logical4.cpp index 98eff2921..498e9ad8f 100755 --- a/plugins/MacAU/Logical4/Logical4.cpp +++ b/plugins/MacAU/Logical4/Logical4.cpp @@ -1110,14 +1110,14 @@ OSStatus Logical4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag } fpFlip = !fpFlip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Loud/Loud.cpp b/plugins/MacAU/Loud/Loud.cpp index 1debb959f..35de0101d 100755 --- a/plugins/MacAU/Loud/Loud.cpp +++ b/plugins/MacAU/Loud/Loud.cpp @@ -175,7 +175,7 @@ ComponentResult Loud::Initialize() void Loud::LoudKernel::Reset() { lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Lowpass2/Lowpass2.cpp b/plugins/MacAU/Lowpass2/Lowpass2.cpp index 628779392..198d225e8 100755 --- a/plugins/MacAU/Lowpass2/Lowpass2.cpp +++ b/plugins/MacAU/Lowpass2/Lowpass2.cpp @@ -190,7 +190,7 @@ void Lowpass2::Lowpass2Kernel::Reset() iirSampleF = 0.0; iirSampleG = 0.0; iirSampleH = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; fpFlip = true; } diff --git a/plugins/MacAU/Luxor/Luxor.cpp b/plugins/MacAU/Luxor/Luxor.cpp index 5400f8293..e14eb9be4 100755 --- a/plugins/MacAU/Luxor/Luxor.cpp +++ b/plugins/MacAU/Luxor/Luxor.cpp @@ -184,7 +184,7 @@ void Luxor::LuxorKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/MV/MV.cpp b/plugins/MacAU/MV/MV.cpp index 0aa891bd4..fafeb2ec2 100755 --- a/plugins/MacAU/MV/MV.cpp +++ b/plugins/MacAU/MV/MV.cpp @@ -247,7 +247,7 @@ void MV::MVKernel::Reset() feedback = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/MidSide/MidSide.h b/plugins/MacAU/MidSide/MidSide.h index c5dec2ac3..c7481d57c 100755 --- a/plugins/MacAU/MidSide/MidSide.h +++ b/plugins/MacAU/MidSide/MidSide.h @@ -111,8 +111,7 @@ public: virtual ComponentResult Version() { return kMidSideVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacAU/MoNoam/MoNoam.cpp b/plugins/MacAU/MoNoam/MoNoam.cpp index 21dc9fbf3..5729bc886 100755 --- a/plugins/MacAU/MoNoam/MoNoam.cpp +++ b/plugins/MacAU/MoNoam/MoNoam.cpp @@ -194,7 +194,7 @@ ComponentResult MoNoam::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ComponentResult MoNoam::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -220,8 +220,8 @@ OSStatus MoNoam::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; @@ -240,11 +240,11 @@ OSStatus MoNoam::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/Mojo/Mojo.cpp b/plugins/MacAU/Mojo/Mojo.cpp index e86079b24..31fdd7d6f 100755 --- a/plugins/MacAU/Mojo/Mojo.cpp +++ b/plugins/MacAU/Mojo/Mojo.cpp @@ -158,7 +158,7 @@ ComponentResult Mojo::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Mojo::MojoKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Monitoring/Monitoring.cpp b/plugins/MacAU/Monitoring/Monitoring.cpp index 5b7cf29dd..fb555a66d 100755 --- a/plugins/MacAU/Monitoring/Monitoring.cpp +++ b/plugins/MacAU/Monitoring/Monitoring.cpp @@ -250,7 +250,7 @@ ComponentResult Monitoring::Reset(AudioUnitScope inScope, AudioUnitElement inEl //SubsOnly for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} //Bandpasses - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -291,8 +291,8 @@ OSStatus Monitoring::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/MacAU/Monitoring2/Monitoring2.h b/plugins/MacAU/Monitoring2/Monitoring2.h index 32b707a39..a2a8c9039 100644 --- a/plugins/MacAU/Monitoring2/Monitoring2.h +++ b/plugins/MacAU/Monitoring2/Monitoring2.h @@ -182,8 +182,7 @@ public: Float64 iirSampleWR, iirSampleXR, iirSampleYR, iirSampleZR; // o/` //SubsOnly - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Neverland/Neverland.cpp b/plugins/MacAU/Neverland/Neverland.cpp index c8b10775b..48914f1a6 100755 --- a/plugins/MacAU/Neverland/Neverland.cpp +++ b/plugins/MacAU/Neverland/Neverland.cpp @@ -184,7 +184,7 @@ void Neverland::NeverlandKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Nikola/Nikola.cpp b/plugins/MacAU/Nikola/Nikola.cpp index f0f96d9cd..ddb15b19a 100755 --- a/plugins/MacAU/Nikola/Nikola.cpp +++ b/plugins/MacAU/Nikola/Nikola.cpp @@ -169,7 +169,7 @@ void Nikola::NikolaKernel::Reset() WasNegative = false; outlevel = 0.0; framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/NonlinearSpace/NonlinearSpace.cpp b/plugins/MacAU/NonlinearSpace/NonlinearSpace.cpp index e50f05b10..34f86e021 100755 --- a/plugins/MacAU/NonlinearSpace/NonlinearSpace.cpp +++ b/plugins/MacAU/NonlinearSpace/NonlinearSpace.cpp @@ -1119,14 +1119,14 @@ OSStatus NonlinearSpace::ProcessBufferLists(AudioUnitRenderActionFlags & ioActi drySampleR += inputSampleR; //here we combine the tanks with the dry signal - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither flip = !flip; *outputL = drySampleL; diff --git a/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp b/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp index 1af7e0b23..8547a8d09 100755 --- a/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp +++ b/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp @@ -193,7 +193,7 @@ void NotJustAnotherDither::NotJustAnotherDitherKernel::Reset() byn[9] = 46.0; byn[10] = 1000.0; noiseShaping = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PaulDither/PaulDither.cpp b/plugins/MacAU/PaulDither/PaulDither.cpp index b3ae5543f..83418cdd6 100755 --- a/plugins/MacAU/PaulDither/PaulDither.cpp +++ b/plugins/MacAU/PaulDither/PaulDither.cpp @@ -182,7 +182,7 @@ ComponentResult PaulDither::Initialize() void PaulDither::PaulDitherKernel::Reset() { previousDither = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PeaksOnly/PeaksOnly.cpp b/plugins/MacAU/PeaksOnly/PeaksOnly.cpp index c83943bb8..27383fc7b 100755 --- a/plugins/MacAU/PeaksOnly/PeaksOnly.cpp +++ b/plugins/MacAU/PeaksOnly/PeaksOnly.cpp @@ -152,7 +152,7 @@ void PeaksOnly::PeaksOnlyKernel::Reset() { for(int count = 0; count < 1502; count++) {a[count] = 0.0; b[count] = 0.0; c[count] = 0.0; d[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PocketVerbs/PocketVerbs.cpp b/plugins/MacAU/PocketVerbs/PocketVerbs.cpp index 1f7c69286..2c7752cc2 100755 --- a/plugins/MacAU/PocketVerbs/PocketVerbs.cpp +++ b/plugins/MacAU/PocketVerbs/PocketVerbs.cpp @@ -291,7 +291,7 @@ void PocketVerbs::PocketVerbsKernel::Reset() savedRoomsize = -1.0; //force update to begin countdown = -1; peak = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Podcast/Podcast.cpp b/plugins/MacAU/Podcast/Podcast.cpp index e0e043475..c2865ba4c 100755 --- a/plugins/MacAU/Podcast/Podcast.cpp +++ b/plugins/MacAU/Podcast/Podcast.cpp @@ -167,7 +167,7 @@ ComponentResult Podcast::Initialize() void Podcast::PodcastKernel::Reset() { c1 = 2.0; c2 = 2.0; c3 = 2.0; c4 = 2.0; c5 = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PodcastDeluxe/PodcastDeluxe.cpp b/plugins/MacAU/PodcastDeluxe/PodcastDeluxe.cpp index ef1720237..c3ba2314f 100755 --- a/plugins/MacAU/PodcastDeluxe/PodcastDeluxe.cpp +++ b/plugins/MacAU/PodcastDeluxe/PodcastDeluxe.cpp @@ -162,7 +162,7 @@ void PodcastDeluxe::PodcastDeluxeKernel::Reset() tap1 = 1; tap2 = 1; tap3 = 1; tap4 = 1; tap5 = 1; maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1 = 2.0; c2 = 2.0; c3 = 2.0; c4 = 2.0; c5 = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Pop/Pop.cpp b/plugins/MacAU/Pop/Pop.cpp index e934b857a..a823e6813 100755 --- a/plugins/MacAU/Pop/Pop.cpp +++ b/plugins/MacAU/Pop/Pop.cpp @@ -188,7 +188,7 @@ void Pop::PopKernel::Reset() previous3 = 0.0; previous4 = 0.0; previous5 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PowerSag2/PowerSag2.cpp b/plugins/MacAU/PowerSag2/PowerSag2.cpp index 9fc98f656..7516380b7 100755 --- a/plugins/MacAU/PowerSag2/PowerSag2.cpp +++ b/plugins/MacAU/PowerSag2/PowerSag2.cpp @@ -169,7 +169,7 @@ void PowerSag2::PowerSag2Kernel::Reset() for(int count = 0; count < 16385; count++) {d[count] = 0;} control = 0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Precious/Precious.cpp b/plugins/MacAU/Precious/Precious.cpp index ae0d5a104..115fd8dbc 100755 --- a/plugins/MacAU/Precious/Precious.cpp +++ b/plugins/MacAU/Precious/Precious.cpp @@ -184,7 +184,7 @@ void Precious::PreciousKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Pressure4/Pressure4.cpp b/plugins/MacAU/Pressure4/Pressure4.cpp index 69f19af0b..05f8ed281 100755 --- a/plugins/MacAU/Pressure4/Pressure4.cpp +++ b/plugins/MacAU/Pressure4/Pressure4.cpp @@ -368,14 +368,14 @@ OSStatus Pressure4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Pressure5/Pressure5.h b/plugins/MacAU/Pressure5/Pressure5.h index a9a5bfede..4ab62427c 100644 --- a/plugins/MacAU/Pressure5/Pressure5.h +++ b/plugins/MacAU/Pressure5/Pressure5.h @@ -163,8 +163,7 @@ public: double slewMax; //to adust mewiness - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PurestAir/PurestAir.cpp b/plugins/MacAU/PurestAir/PurestAir.cpp index d62e4606d..48c3dabbc 100755 --- a/plugins/MacAU/PurestAir/PurestAir.cpp +++ b/plugins/MacAU/PurestAir/PurestAir.cpp @@ -179,7 +179,7 @@ void PurestAir::PurestAirKernel::Reset() lastSample = 0.0; s1 = s2 = s3 = 0.0; apply = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PurestFade/PurestFade.cpp b/plugins/MacAU/PurestFade/PurestFade.cpp index e18e1ce72..af0c53cb8 100755 --- a/plugins/MacAU/PurestFade/PurestFade.cpp +++ b/plugins/MacAU/PurestFade/PurestFade.cpp @@ -170,7 +170,7 @@ void PurestFade::PurestFadeKernel::Reset() settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/PurestSquish/PurestSquish.cpp b/plugins/MacAU/PurestSquish/PurestSquish.cpp index 71e40b58b..7120ce966 100755 --- a/plugins/MacAU/PurestSquish/PurestSquish.cpp +++ b/plugins/MacAU/PurestSquish/PurestSquish.cpp @@ -205,7 +205,7 @@ void PurestSquish::PurestSquishKernel::Reset() muVary = 1; count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Pyewacket/Pyewacket.cpp b/plugins/MacAU/Pyewacket/Pyewacket.cpp index 944b5ef0b..4279e9538 100755 --- a/plugins/MacAU/Pyewacket/Pyewacket.cpp +++ b/plugins/MacAU/Pyewacket/Pyewacket.cpp @@ -296,14 +296,14 @@ OSStatus Pyewacket::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR *= outputGain; } - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Pyewacket/Pyewacket.h b/plugins/MacAU/Pyewacket/Pyewacket.h index 756f699f1..496f4be33 100755 --- a/plugins/MacAU/Pyewacket/Pyewacket.h +++ b/plugins/MacAU/Pyewacket/Pyewacket.h @@ -116,8 +116,7 @@ public: private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; Float64 chase; Float64 lastrectifierL; Float64 lastrectifierR; diff --git a/plugins/MacAU/RawGlitters/RawGlitters.cpp b/plugins/MacAU/RawGlitters/RawGlitters.cpp index f4d59545e..ca961139d 100755 --- a/plugins/MacAU/RawGlitters/RawGlitters.cpp +++ b/plugins/MacAU/RawGlitters/RawGlitters.cpp @@ -183,7 +183,7 @@ void RawGlitters::RawGlittersKernel::Reset() { lastSample = 0.0; lastSample2 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/RawTimbers/RawTimbers.cpp b/plugins/MacAU/RawTimbers/RawTimbers.cpp index bc882ca2a..4d24fbd52 100755 --- a/plugins/MacAU/RawTimbers/RawTimbers.cpp +++ b/plugins/MacAU/RawTimbers/RawTimbers.cpp @@ -183,7 +183,7 @@ void RawTimbers::RawTimbersKernel::Reset() { lastSample = 0.0; lastSample2 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Recurve/Recurve.cpp b/plugins/MacAU/Recurve/Recurve.cpp index 9886ded8b..8d19d0712 100755 --- a/plugins/MacAU/Recurve/Recurve.cpp +++ b/plugins/MacAU/Recurve/Recurve.cpp @@ -166,7 +166,7 @@ ComponentResult Recurve::Initialize() ComponentResult Recurve::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { gain = 2.0; //default to gain push - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -188,8 +188,8 @@ OSStatus Recurve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -214,11 +214,11 @@ OSStatus Recurve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/Remap/Remap.cpp b/plugins/MacAU/Remap/Remap.cpp index 90c924eb2..4d43fab4f 100755 --- a/plugins/MacAU/Remap/Remap.cpp +++ b/plugins/MacAU/Remap/Remap.cpp @@ -174,7 +174,7 @@ ComponentResult Remap::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Remap::RemapKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/ResEQ/ResEQ.cpp b/plugins/MacAU/ResEQ/ResEQ.cpp index 835073053..921f52a6a 100755 --- a/plugins/MacAU/ResEQ/ResEQ.cpp +++ b/plugins/MacAU/ResEQ/ResEQ.cpp @@ -226,7 +226,7 @@ void ResEQ::ResEQKernel::Reset() register UInt32 count; for(count = 0; count < 60; count++) {b[count] = 0.0; f[count] = 0.0;} framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/SideDull/SideDull.cpp b/plugins/MacAU/SideDull/SideDull.cpp index f8547e940..a90ea8f9a 100755 --- a/plugins/MacAU/SideDull/SideDull.cpp +++ b/plugins/MacAU/SideDull/SideDull.cpp @@ -232,14 +232,14 @@ OSStatus SideDull::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/SideDull/SideDull.h b/plugins/MacAU/SideDull/SideDull.h index 515b969f6..0d7ef8621 100755 --- a/plugins/MacAU/SideDull/SideDull.h +++ b/plugins/MacAU/SideDull/SideDull.h @@ -112,8 +112,7 @@ private: Float64 iirSampleA; Float64 iirSampleB; bool flip; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Sidepass/Sidepass.cpp b/plugins/MacAU/Sidepass/Sidepass.cpp index d4ac2045e..34dd562d8 100755 --- a/plugins/MacAU/Sidepass/Sidepass.cpp +++ b/plugins/MacAU/Sidepass/Sidepass.cpp @@ -233,14 +233,14 @@ OSStatus Sidepass::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Sidepass/Sidepass.h b/plugins/MacAU/Sidepass/Sidepass.h index 6a7f62b42..9fc775f83 100755 --- a/plugins/MacAU/Sidepass/Sidepass.h +++ b/plugins/MacAU/Sidepass/Sidepass.h @@ -112,8 +112,7 @@ private: Float64 iirSampleA; Float64 iirSampleB; bool flip; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Slew3/Slew3.cpp b/plugins/MacAU/Slew3/Slew3.cpp index 375f6f5c3..6c852f846 100755 --- a/plugins/MacAU/Slew3/Slew3.cpp +++ b/plugins/MacAU/Slew3/Slew3.cpp @@ -159,7 +159,7 @@ ComponentResult Slew3::Initialize() void Slew3::Slew3Kernel::Reset() { lastSampleA = lastSampleB = lastSampleC = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Smooth/Smooth.cpp b/plugins/MacAU/Smooth/Smooth.cpp index 24d44a72d..9aa1a2924 100755 --- a/plugins/MacAU/Smooth/Smooth.cpp +++ b/plugins/MacAU/Smooth/Smooth.cpp @@ -184,7 +184,7 @@ void Smooth::SmoothKernel::Reset() gainD = 1.0; lastSampleE = 0.0; gainE = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/SoftGate/SoftGate.cpp b/plugins/MacAU/SoftGate/SoftGate.cpp index f8ce5adc7..643702cb4 100755 --- a/plugins/MacAU/SoftGate/SoftGate.cpp +++ b/plugins/MacAU/SoftGate/SoftGate.cpp @@ -194,7 +194,7 @@ ComponentResult SoftGate::Reset(AudioUnitScope inScope, AudioUnitElement inElem storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -224,8 +224,8 @@ OSStatus SoftGate::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; diffL = storedL[0] - storedL[1]; @@ -255,11 +255,11 @@ OSStatus SoftGate::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/SoftGateMono/SoftGateMono.cpp b/plugins/MacAU/SoftGateMono/SoftGateMono.cpp index be31c59a9..465b5b3c7 100755 --- a/plugins/MacAU/SoftGateMono/SoftGateMono.cpp +++ b/plugins/MacAU/SoftGateMono/SoftGateMono.cpp @@ -177,7 +177,7 @@ void SoftGateMono::SoftGateMonoKernel::Reset() storedL[0] = storedL[1] = 0.0; diffL = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/SpatializeDither/SpatializeDither.cpp b/plugins/MacAU/SpatializeDither/SpatializeDither.cpp index f9f6ca458..181325898 100755 --- a/plugins/MacAU/SpatializeDither/SpatializeDither.cpp +++ b/plugins/MacAU/SpatializeDither/SpatializeDither.cpp @@ -183,7 +183,7 @@ void SpatializeDither::SpatializeDitherKernel::Reset() { contingentErr = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Spiral/Spiral.cpp b/plugins/MacAU/Spiral/Spiral.cpp index 309ef1c0c..c0c3e56bf 100755 --- a/plugins/MacAU/Spiral/Spiral.cpp +++ b/plugins/MacAU/Spiral/Spiral.cpp @@ -150,7 +150,7 @@ ComponentResult Spiral::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Spiral::SpiralKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Spiral2/Spiral2.cpp b/plugins/MacAU/Spiral2/Spiral2.cpp index 0dfe5870a..0daad3541 100755 --- a/plugins/MacAU/Spiral2/Spiral2.cpp +++ b/plugins/MacAU/Spiral2/Spiral2.cpp @@ -194,7 +194,7 @@ void Spiral2::Spiral2Kernel::Reset() iirSampleB = 0.0; prevSample = 0.0; flip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Srsly/Srsly.h b/plugins/MacAU/Srsly/Srsly.h index 42ba47dd6..dcc230e04 100755 --- a/plugins/MacAU/Srsly/Srsly.h +++ b/plugins/MacAU/Srsly/Srsly.h @@ -133,8 +133,7 @@ public: double biquadS3[11]; double biquadS5[11]; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Srsly2/Srsly2.h b/plugins/MacAU/Srsly2/Srsly2.h index b9ae4c51e..4d9c052a3 100755 --- a/plugins/MacAU/Srsly2/Srsly2.h +++ b/plugins/MacAU/Srsly2/Srsly2.h @@ -133,8 +133,7 @@ public: double biquadS3[11]; double biquadS5[11]; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/StereoChorus/StereoChorus.h b/plugins/MacAU/StereoChorus/StereoChorus.h index fc57fff5c..1fa93d10b 100644 --- a/plugins/MacAU/StereoChorus/StereoChorus.h +++ b/plugins/MacAU/StereoChorus/StereoChorus.h @@ -132,8 +132,7 @@ private: double lastRefR[7]; int cycle; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/StereoFX/StereoFX.cpp b/plugins/MacAU/StereoFX/StereoFX.cpp index 3a292a12a..64bad4a8d 100755 --- a/plugins/MacAU/StereoFX/StereoFX.cpp +++ b/plugins/MacAU/StereoFX/StereoFX.cpp @@ -295,14 +295,14 @@ OSStatus StereoFX::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/StereoFX/StereoFX.h b/plugins/MacAU/StereoFX/StereoFX.h index f7f216256..c8fc895df 100755 --- a/plugins/MacAU/StereoFX/StereoFX.h +++ b/plugins/MacAU/StereoFX/StereoFX.h @@ -119,8 +119,7 @@ public: private: Float64 iirSampleA; Float64 iirSampleB; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; bool flip; }; diff --git a/plugins/MacAU/Surge/Surge.cpp b/plugins/MacAU/Surge/Surge.cpp index 200d15dea..82ec7124a 100755 --- a/plugins/MacAU/Surge/Surge.cpp +++ b/plugins/MacAU/Surge/Surge.cpp @@ -269,14 +269,14 @@ OSStatus Surge::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleR = drySampleR - (inputSampleR * intensity); inputSampleR = (drySampleR * dry) + (inputSampleR * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Surge/Surge.h b/plugins/MacAU/Surge/Surge.h index 7649dcb58..7c85fa2c8 100755 --- a/plugins/MacAU/Surge/Surge.h +++ b/plugins/MacAU/Surge/Surge.h @@ -112,8 +112,7 @@ public: virtual ComponentResult Version() { return kSurgeVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; double chaseA; double chaseB; double chaseC; diff --git a/plugins/MacAU/SurgeTide/SurgeTide.cpp b/plugins/MacAU/SurgeTide/SurgeTide.cpp index 54617f206..09cfdd40e 100755 --- a/plugins/MacAU/SurgeTide/SurgeTide.cpp +++ b/plugins/MacAU/SurgeTide/SurgeTide.cpp @@ -266,14 +266,14 @@ OSStatus SurgeTide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = drySampleR - (inputSampleR * intensity); inputSampleR = (drySampleR * dry) + (inputSampleR * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/TPDFDither/TPDFDither.cpp b/plugins/MacAU/TPDFDither/TPDFDither.cpp index b1373a135..50ee551c3 100755 --- a/plugins/MacAU/TPDFDither/TPDFDither.cpp +++ b/plugins/MacAU/TPDFDither/TPDFDither.cpp @@ -181,7 +181,7 @@ ComponentResult TPDFDither::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void TPDFDither::TPDFDitherKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Tape/Tape.cpp b/plugins/MacAU/Tape/Tape.cpp index 582164a18..5796c531e 100755 --- a/plugins/MacAU/Tape/Tape.cpp +++ b/plugins/MacAU/Tape/Tape.cpp @@ -173,7 +173,7 @@ void Tape::TapeKernel::Reset() flip = false; for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/TapeDither/TapeDither.cpp b/plugins/MacAU/TapeDither/TapeDither.cpp index ce144d080..12d5d179d 100755 --- a/plugins/MacAU/TapeDither/TapeDither.cpp +++ b/plugins/MacAU/TapeDither/TapeDither.cpp @@ -185,7 +185,7 @@ void TapeDither::TapeDitherKernel::Reset() previousDither2 = 0.0; previousDither3 = 0.0; previousDither4 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/Thunder/Thunder.cpp b/plugins/MacAU/Thunder/Thunder.cpp index 9c2cdb8e5..8a62d53b6 100755 --- a/plugins/MacAU/Thunder/Thunder.cpp +++ b/plugins/MacAU/Thunder/Thunder.cpp @@ -384,14 +384,14 @@ OSStatus Thunder::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags } flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Thunder/Thunder.h b/plugins/MacAU/Thunder/Thunder.h index ca1606fe5..a9f097b07 100755 --- a/plugins/MacAU/Thunder/Thunder.h +++ b/plugins/MacAU/Thunder/Thunder.h @@ -129,8 +129,7 @@ private: Float64 iirSampleAM; Float64 iirSampleBM; Float64 iirSampleCM; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; bool flip; }; diff --git a/plugins/MacAU/ToTape6/ToTape6.cpp b/plugins/MacAU/ToTape6/ToTape6.cpp index 49ec384d7..1068f4049 100755 --- a/plugins/MacAU/ToTape6/ToTape6.cpp +++ b/plugins/MacAU/ToTape6/ToTape6.cpp @@ -210,7 +210,7 @@ void ToTape6::ToTape6Kernel::Reset() rateof = 0.5; nextmax = 0.5; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/ToVinyl4/ToVinyl4.cpp b/plugins/MacAU/ToVinyl4/ToVinyl4.cpp index 00ccc9b63..0857328a5 100755 --- a/plugins/MacAU/ToVinyl4/ToVinyl4.cpp +++ b/plugins/MacAU/ToVinyl4/ToVinyl4.cpp @@ -698,14 +698,14 @@ OSStatus ToVinyl4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = accumulatorSample; //we just re-use accumulatorSample to do this little shuffle - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/TremoSquare/TremoSquare.cpp b/plugins/MacAU/TremoSquare/TremoSquare.cpp index d32c1eea1..c4dc47627 100755 --- a/plugins/MacAU/TremoSquare/TremoSquare.cpp +++ b/plugins/MacAU/TremoSquare/TremoSquare.cpp @@ -169,7 +169,7 @@ void TremoSquare::TremoSquareKernel::Reset() osc = 0.0; polarity = false; mute = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/TripleSpread/TripleSpread.cpp b/plugins/MacAU/TripleSpread/TripleSpread.cpp index 112afe727..74008a1e7 100755 --- a/plugins/MacAU/TripleSpread/TripleSpread.cpp +++ b/plugins/MacAU/TripleSpread/TripleSpread.cpp @@ -225,7 +225,7 @@ ComponentResult TripleSpread::Reset(AudioUnitScope inScope, AudioUnitElement in gcount = 0; lastwidth = 16386; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -252,8 +252,8 @@ OSStatus TripleSpread::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -538,11 +538,11 @@ OSStatus TripleSpread::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/Ultrasonic/Ultrasonic.cpp b/plugins/MacAU/Ultrasonic/Ultrasonic.cpp index 9d5c184c8..a57bb8e03 100755 --- a/plugins/MacAU/Ultrasonic/Ultrasonic.cpp +++ b/plugins/MacAU/Ultrasonic/Ultrasonic.cpp @@ -151,7 +151,7 @@ ComponentResult Ultrasonic::Initialize() void Ultrasonic::UltrasonicKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/UnBox/UnBox.cpp b/plugins/MacAU/UnBox/UnBox.cpp index 73a97ad07..525c62d17 100755 --- a/plugins/MacAU/UnBox/UnBox.cpp +++ b/plugins/MacAU/UnBox/UnBox.cpp @@ -174,7 +174,7 @@ ComponentResult UnBox::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void UnBox::UnBoxKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 5; count++) {a[count] = 0.0; b[count] = 0.0; e[count] = 0.0;} for(int count = 0; count < 11; count++) {c[count] = 0.0; f[count] = 0.0;} iirSampleA = 0.0; diff --git a/plugins/MacAU/Vibrato/Vibrato.cpp b/plugins/MacAU/Vibrato/Vibrato.cpp index 0b914adba..f52364c2e 100755 --- a/plugins/MacAU/Vibrato/Vibrato.cpp +++ b/plugins/MacAU/Vibrato/Vibrato.cpp @@ -199,7 +199,7 @@ void Vibrato::VibratoKernel::Reset() airOdd = 0.0; airFactor = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/VinylDither/VinylDither.cpp b/plugins/MacAU/VinylDither/VinylDither.cpp index 0542ec1ae..8c6f8c4cf 100755 --- a/plugins/MacAU/VinylDither/VinylDither.cpp +++ b/plugins/MacAU/VinylDither/VinylDither.cpp @@ -199,7 +199,7 @@ void VinylDither::VinylDitherKernel::Reset() ns[13] = 0; ns[14] = 0; ns[15] = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacAU/VoiceTrick/VoiceTrick.cpp b/plugins/MacAU/VoiceTrick/VoiceTrick.cpp index bc272039a..9474e4d7e 100755 --- a/plugins/MacAU/VoiceTrick/VoiceTrick.cpp +++ b/plugins/MacAU/VoiceTrick/VoiceTrick.cpp @@ -183,7 +183,7 @@ ComponentResult VoiceTrick::Reset(AudioUnitScope inScope, AudioUnitElement inEl lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -211,8 +211,8 @@ OSStatus VoiceTrick::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -279,11 +279,11 @@ OSStatus VoiceTrick::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/Wider/Wider.cpp b/plugins/MacAU/Wider/Wider.cpp index 0790d0731..bee16bc07 100755 --- a/plugins/MacAU/Wider/Wider.cpp +++ b/plugins/MacAU/Wider/Wider.cpp @@ -296,14 +296,14 @@ OSStatus Wider::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleL = (drySampleL * dry) + ((mid+side) * wet); inputSampleR = (drySampleR * dry) + ((mid-side) * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacAU/Wider/Wider.h b/plugins/MacAU/Wider/Wider.h index f4788781f..9654bd17d 100755 --- a/plugins/MacAU/Wider/Wider.h +++ b/plugins/MacAU/Wider/Wider.h @@ -118,8 +118,7 @@ public: private: Float64 p[4099]; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; int count; }; diff --git a/plugins/MacAU/curve/curve.cpp b/plugins/MacAU/curve/curve.cpp index bddf8e0bc..4f97cfeef 100755 --- a/plugins/MacAU/curve/curve.cpp +++ b/plugins/MacAU/curve/curve.cpp @@ -166,7 +166,8 @@ ComponentResult curve::Initialize() ComponentResult curve::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { gain = 1.0; - fpd = 17; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; return noErr; } @@ -188,8 +189,8 @@ OSStatus curve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -208,11 +209,11 @@ OSStatus curve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacAU/curvemono/curvemono.cpp b/plugins/MacAU/curvemono/curvemono.cpp index 58298db09..c96542544 100755 --- a/plugins/MacAU/curvemono/curvemono.cpp +++ b/plugins/MacAU/curvemono/curvemono.cpp @@ -151,7 +151,7 @@ ComponentResult curvemono::Initialize() void curvemono::curvemonoKernel::Reset() { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/ADT/ADT.cpp b/plugins/MacSignedAU/ADT/ADT.cpp index 2bd89c27a..89d9285a8 100755 --- a/plugins/MacSignedAU/ADT/ADT.cpp +++ b/plugins/MacSignedAU/ADT/ADT.cpp @@ -202,7 +202,7 @@ void ADT::ADTKernel::Reset() offsetA = 9001; offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp b/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp index 9a583cb05..3a65c66c3 100755 --- a/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp +++ b/plugins/MacSignedAU/Apicolypse/Apicolypse.cpp @@ -184,7 +184,7 @@ void Apicolypse::ApicolypseKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/AutoPan/AutoPan.h b/plugins/MacSignedAU/AutoPan/AutoPan.h index 8bd5d989f..d10a5d473 100644 --- a/plugins/MacSignedAU/AutoPan/AutoPan.h +++ b/plugins/MacSignedAU/AutoPan/AutoPan.h @@ -121,8 +121,7 @@ public: double rate, oldfpd; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/AverMatrix/AverMatrix.cpp b/plugins/MacSignedAU/AverMatrix/AverMatrix.cpp index 971c2b544..903b3302b 100755 --- a/plugins/MacSignedAU/AverMatrix/AverMatrix.cpp +++ b/plugins/MacSignedAU/AverMatrix/AverMatrix.cpp @@ -182,7 +182,7 @@ void AverMatrix::AverMatrixKernel::Reset() f[x] = 0.0; for (int y = 0; y < 11; y++) b[x][y] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BassAmp/BassAmp.cpp b/plugins/MacSignedAU/BassAmp/BassAmp.cpp index 93865a822..b85fb6a5a 100755 --- a/plugins/MacSignedAU/BassAmp/BassAmp.cpp +++ b/plugins/MacSignedAU/BassAmp/BassAmp.cpp @@ -239,7 +239,7 @@ void BassAmp::BassAmpKernel::Reset() iirSampleY = 0.0; iirSampleZ = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BassDrive/BassDrive.cpp b/plugins/MacSignedAU/BassDrive/BassDrive.cpp index 59442f57b..ea9247e8c 100755 --- a/plugins/MacSignedAU/BassDrive/BassDrive.cpp +++ b/plugins/MacSignedAU/BassDrive/BassDrive.cpp @@ -210,7 +210,7 @@ void BassDrive::BassDriveKernel::Reset() lowOutB[fcount] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BassKit/BassKit.cpp b/plugins/MacSignedAU/BassKit/BassKit.cpp index 6815a53a0..2a8a4f99b 100755 --- a/plugins/MacSignedAU/BassKit/BassKit.cpp +++ b/plugins/MacSignedAU/BassKit/BassKit.cpp @@ -286,42 +286,8 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; iirDriveSampleB = (iirDriveSampleB * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleB; @@ -453,14 +419,14 @@ OSStatus BassKit::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/BassKit/BassKit.h b/plugins/MacSignedAU/BassKit/BassKit.h index b6bffd8fb..6f1eaf3c2 100755 --- a/plugins/MacSignedAU/BassKit/BassKit.h +++ b/plugins/MacSignedAU/BassKit/BassKit.h @@ -168,8 +168,7 @@ public: Float64 iirSampleZ; Float64 oscGate; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Baxandall/Baxandall.cpp b/plugins/MacSignedAU/Baxandall/Baxandall.cpp index 218b4f289..d2c078726 100755 --- a/plugins/MacSignedAU/Baxandall/Baxandall.cpp +++ b/plugins/MacSignedAU/Baxandall/Baxandall.cpp @@ -181,7 +181,7 @@ void Baxandall::BaxandallKernel::Reset() bassB[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Beam/Beam.cpp b/plugins/MacSignedAU/Beam/Beam.cpp index 5e17d86a6..9021e00b5 100755 --- a/plugins/MacSignedAU/Beam/Beam.cpp +++ b/plugins/MacSignedAU/Beam/Beam.cpp @@ -190,7 +190,7 @@ ComponentResult Beam::Initialize() void Beam::BeamKernel::Reset() { for(int count = 0; count < 99; count++) {lastSample[count] = 0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Biquad/Biquad.cpp b/plugins/MacSignedAU/Biquad/Biquad.cpp index b566b5085..220c19a18 100755 --- a/plugins/MacSignedAU/Biquad/Biquad.cpp +++ b/plugins/MacSignedAU/Biquad/Biquad.cpp @@ -185,7 +185,7 @@ ComponentResult Biquad::Initialize() void Biquad::BiquadKernel::Reset() { for (int x = 0; x < 9; x++) {biquad[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Biquad2/Biquad2.cpp b/plugins/MacSignedAU/Biquad2/Biquad2.cpp index fbfe9bcc5..a16d1db71 100755 --- a/plugins/MacSignedAU/Biquad2/Biquad2.cpp +++ b/plugins/MacSignedAU/Biquad2/Biquad2.cpp @@ -204,7 +204,7 @@ void Biquad2::Biquad2Kernel::Reset() wetsetting = -2.0; //-1.0 is a possible setting here and this forces an update on chasespeed chasespeed = 500.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BiquadDouble/BiquadDouble.cpp b/plugins/MacSignedAU/BiquadDouble/BiquadDouble.cpp index 6f48cb7ff..53130c65c 100755 --- a/plugins/MacSignedAU/BiquadDouble/BiquadDouble.cpp +++ b/plugins/MacSignedAU/BiquadDouble/BiquadDouble.cpp @@ -185,7 +185,7 @@ ComponentResult BiquadDouble::Initialize() void BiquadDouble::BiquadDoubleKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BiquadOneHalf/BiquadOneHalf.cpp b/plugins/MacSignedAU/BiquadOneHalf/BiquadOneHalf.cpp index 67e2277c3..0fb573367 100755 --- a/plugins/MacSignedAU/BiquadOneHalf/BiquadOneHalf.cpp +++ b/plugins/MacSignedAU/BiquadOneHalf/BiquadOneHalf.cpp @@ -186,7 +186,7 @@ void BiquadOneHalf::BiquadOneHalfKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;} flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BiquadStereo/BiquadStereo.cpp b/plugins/MacSignedAU/BiquadStereo/BiquadStereo.cpp index 7dfb86b28..f16d35902 100755 --- a/plugins/MacSignedAU/BiquadStereo/BiquadStereo.cpp +++ b/plugins/MacSignedAU/BiquadStereo/BiquadStereo.cpp @@ -200,7 +200,7 @@ ComponentResult BiquadStereo::Initialize() ComponentResult BiquadStereo::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -292,8 +292,8 @@ OSStatus BiquadStereo::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -349,11 +349,11 @@ OSStatus BiquadStereo::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/BiquadTriple/BiquadTriple.cpp b/plugins/MacSignedAU/BiquadTriple/BiquadTriple.cpp index 52c59b842..745a77041 100755 --- a/plugins/MacSignedAU/BiquadTriple/BiquadTriple.cpp +++ b/plugins/MacSignedAU/BiquadTriple/BiquadTriple.cpp @@ -185,7 +185,7 @@ ComponentResult BiquadTriple::Initialize() void BiquadTriple::BiquadTripleKernel::Reset() { for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BlockParty/BlockParty.cpp b/plugins/MacSignedAU/BlockParty/BlockParty.cpp index e47d78d3c..49c74a07f 100755 --- a/plugins/MacSignedAU/BlockParty/BlockParty.cpp +++ b/plugins/MacSignedAU/BlockParty/BlockParty.cpp @@ -186,7 +186,7 @@ void BlockParty::BlockPartyKernel::Reset() muVary = 1; count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BrassRider/BrassRider.cpp b/plugins/MacSignedAU/BrassRider/BrassRider.cpp index b6e082098..06c2761a1 100755 --- a/plugins/MacSignedAU/BrassRider/BrassRider.cpp +++ b/plugins/MacSignedAU/BrassRider/BrassRider.cpp @@ -194,7 +194,7 @@ ComponentResult BrassRider::Reset(AudioUnitScope inScope, AudioUnitElement inEl lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -297,12 +297,12 @@ OSStatus BrassRider::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl //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); - //end 32 bit stereo floating point dither + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/BrightAmbience/BrightAmbience.cpp b/plugins/MacSignedAU/BrightAmbience/BrightAmbience.cpp index 5361c6f52..06543ac63 100755 --- a/plugins/MacSignedAU/BrightAmbience/BrightAmbience.cpp +++ b/plugins/MacSignedAU/BrightAmbience/BrightAmbience.cpp @@ -176,7 +176,7 @@ void BrightAmbience::BrightAmbienceKernel::Reset() { for(int count = 0; count < 25360; count++) {p[count] = 0;} gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/BrightAmbience2/BrightAmbience2.cpp b/plugins/MacSignedAU/BrightAmbience2/BrightAmbience2.cpp index 5754f5264..6e3bf29e3 100755 --- a/plugins/MacSignedAU/BrightAmbience2/BrightAmbience2.cpp +++ b/plugins/MacSignedAU/BrightAmbience2/BrightAmbience2.cpp @@ -200,7 +200,7 @@ ComponentResult BrightAmbience2::Reset(AudioUnitScope inScope, AudioUnitElement for(int count = 0; count < 32767; count++) {pL[count] = 0.0; pR[count] = 0.0;} feedbackA = feedbackB = feedbackC = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -227,8 +227,8 @@ OSStatus BrightAmbience2::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -261,11 +261,11 @@ OSStatus BrightAmbience2::ProcessBufferLists(AudioUnitRenderActionFlags & ioAct //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/BrightAmbience3/BrightAmbience3.h b/plugins/MacSignedAU/BrightAmbience3/BrightAmbience3.h index e72eeddea..06105de35 100644 --- a/plugins/MacSignedAU/BrightAmbience3/BrightAmbience3.h +++ b/plugins/MacSignedAU/BrightAmbience3/BrightAmbience3.h @@ -132,8 +132,7 @@ public: double lastRefL[10]; double lastRefR[10]; int cycle; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Calibre/Calibre.cpp b/plugins/MacSignedAU/Calibre/Calibre.cpp index fd58aead7..027dda492 100755 --- a/plugins/MacSignedAU/Calibre/Calibre.cpp +++ b/plugins/MacSignedAU/Calibre/Calibre.cpp @@ -184,7 +184,7 @@ void Calibre::CalibreKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Capacitor2/Capacitor2.cpp b/plugins/MacSignedAU/Capacitor2/Capacitor2.cpp index 488cb9803..4f53121c0 100755 --- a/plugins/MacSignedAU/Capacitor2/Capacitor2.cpp +++ b/plugins/MacSignedAU/Capacitor2/Capacitor2.cpp @@ -204,7 +204,7 @@ void Capacitor2::Capacitor2Kernel::Reset() lastLowpass = 1000.0; lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Channel6/Channel6.cpp b/plugins/MacSignedAU/Channel6/Channel6.cpp index a81cd40e8..db2bb2765 100755 --- a/plugins/MacSignedAU/Channel6/Channel6.cpp +++ b/plugins/MacSignedAU/Channel6/Channel6.cpp @@ -190,7 +190,7 @@ ComponentResult Channel6::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel6::Channel6Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = 0.0; iirSampleB = 0.0; flip = false; diff --git a/plugins/MacSignedAU/Channel7/Channel7.cpp b/plugins/MacSignedAU/Channel7/Channel7.cpp index d88c5b5bb..ba7fd20a3 100755 --- a/plugins/MacSignedAU/Channel7/Channel7.cpp +++ b/plugins/MacSignedAU/Channel7/Channel7.cpp @@ -190,7 +190,7 @@ ComponentResult Channel7::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel7::Channel7Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = 0.0; iirSampleB = 0.0; flip = false; diff --git a/plugins/MacSignedAU/Channel8/Channel8.cpp b/plugins/MacSignedAU/Channel8/Channel8.cpp index 74a0f1aae..05c9112bc 100755 --- a/plugins/MacSignedAU/Channel8/Channel8.cpp +++ b/plugins/MacSignedAU/Channel8/Channel8.cpp @@ -190,7 +190,7 @@ ComponentResult Channel8::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Channel8::Channel8Kernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleA = iirSampleB = 0.0; flip = false; lastSampleA = lastSampleB = lastSampleC = 0.0; diff --git a/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp b/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp index 51902cd1e..c5561041b 100755 --- a/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp +++ b/plugins/MacSignedAU/ChromeOxide/ChromeOxide.cpp @@ -175,7 +175,7 @@ void ChromeOxide::ChromeOxideKernel::Reset() thirdSample = 0.0; fourthSample = 0.0; fifthSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Cider/Cider.cpp b/plugins/MacSignedAU/Cider/Cider.cpp index 26a2f40dd..8a6c15fed 100755 --- a/plugins/MacSignedAU/Cider/Cider.cpp +++ b/plugins/MacSignedAU/Cider/Cider.cpp @@ -184,7 +184,7 @@ void Cider::CiderKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Coils/Coils.cpp b/plugins/MacSignedAU/Coils/Coils.cpp index 88a1d8450..802f9f5df 100755 --- a/plugins/MacSignedAU/Coils/Coils.cpp +++ b/plugins/MacSignedAU/Coils/Coils.cpp @@ -175,7 +175,7 @@ ComponentResult Coils::Initialize() void Coils::CoilsKernel::Reset() { for (int x = 0; x < 9; x++) {figure[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp b/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp index 771ac1460..0b66c3782 100755 --- a/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp +++ b/plugins/MacSignedAU/Compresaturator/Compresaturator.cpp @@ -196,7 +196,7 @@ void Compresaturator::CompresaturatorKernel::Reset() dCount = 0; lastWidth = 500; padFactor = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Console6Buss/Console6Buss.cpp b/plugins/MacSignedAU/Console6Buss/Console6Buss.cpp index 36ac21257..dc23c6a85 100755 --- a/plugins/MacSignedAU/Console6Buss/Console6Buss.cpp +++ b/plugins/MacSignedAU/Console6Buss/Console6Buss.cpp @@ -158,7 +158,7 @@ ComponentResult Console6Buss::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Console6Buss::Console6BussKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Console6Channel/Console6Channel.cpp b/plugins/MacSignedAU/Console6Channel/Console6Channel.cpp index 8860bb600..8db77975f 100755 --- a/plugins/MacSignedAU/Console6Channel/Console6Channel.cpp +++ b/plugins/MacSignedAU/Console6Channel/Console6Channel.cpp @@ -158,7 +158,7 @@ ComponentResult Console6Channel::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Console6Channel::Console6ChannelKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Dark/Dark.cpp b/plugins/MacSignedAU/Dark/Dark.cpp index 4829168ca..ecd7152ba 100755 --- a/plugins/MacSignedAU/Dark/Dark.cpp +++ b/plugins/MacSignedAU/Dark/Dark.cpp @@ -182,7 +182,7 @@ ComponentResult Dark::Initialize() void Dark::DarkKernel::Reset() { for(int count = 0; count < 99; count++) {lastSample[count] = 0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DeBess/DeBess.cpp b/plugins/MacSignedAU/DeBess/DeBess.cpp index 5355576d5..3fdc4a999 100755 --- a/plugins/MacSignedAU/DeBess/DeBess.cpp +++ b/plugins/MacSignedAU/DeBess/DeBess.cpp @@ -195,7 +195,7 @@ void DeBess::DeBessKernel::Reset() iirSampleA = 0.0; iirSampleB = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DeHiss/DeHiss.cpp b/plugins/MacSignedAU/DeHiss/DeHiss.cpp index 57c7a9c88..de943ec83 100755 --- a/plugins/MacSignedAU/DeHiss/DeHiss.cpp +++ b/plugins/MacSignedAU/DeHiss/DeHiss.cpp @@ -170,7 +170,7 @@ void DeHiss::DeHissKernel::Reset() diff[0] = diff[1] = diff[2] = diff[3] = diff[4] = diff[5] = 0.0; gate = 1.0; raw = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DeRez2/DeRez2.cpp b/plugins/MacSignedAU/DeRez2/DeRez2.cpp index 7b5a1d194..b0f253147 100755 --- a/plugins/MacSignedAU/DeRez2/DeRez2.cpp +++ b/plugins/MacSignedAU/DeRez2/DeRez2.cpp @@ -189,7 +189,7 @@ void DeRez2::DeRez2Kernel::Reset() position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp b/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp index 88cad371d..5f342742e 100755 --- a/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp +++ b/plugins/MacSignedAU/Deckwrecka/Deckwrecka.cpp @@ -190,7 +190,7 @@ void Deckwrecka::DeckwreckaKernel::Reset() iirSampleY = 0.0; iirSampleZ = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DigitalBlack/DigitalBlack.cpp b/plugins/MacSignedAU/DigitalBlack/DigitalBlack.cpp index f8723f205..ae0233ca9 100755 --- a/plugins/MacSignedAU/DigitalBlack/DigitalBlack.cpp +++ b/plugins/MacSignedAU/DigitalBlack/DigitalBlack.cpp @@ -169,7 +169,7 @@ void DigitalBlack::DigitalBlackKernel::Reset() WasNegative = false; ZeroCross = 0; gateroller = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Distortion/Distortion.cpp b/plugins/MacSignedAU/Distortion/Distortion.cpp index 186132840..475d7fbef 100755 --- a/plugins/MacSignedAU/Distortion/Distortion.cpp +++ b/plugins/MacSignedAU/Distortion/Distortion.cpp @@ -201,7 +201,7 @@ ComponentResult Distortion::Initialize() void Distortion::DistortionKernel::Reset() { for (int x = 0; x < 9; x++) {previousIn[x] = 0.0; previousOut[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DitherFloat/DitherFloat.cpp b/plugins/MacSignedAU/DitherFloat/DitherFloat.cpp index d066baa87..821c27e95 100755 --- a/plugins/MacSignedAU/DitherFloat/DitherFloat.cpp +++ b/plugins/MacSignedAU/DitherFloat/DitherFloat.cpp @@ -165,7 +165,7 @@ ComponentResult DitherFloat::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void DitherFloat::DitherFloatKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/DubCenter/DubCenter.cpp b/plugins/MacSignedAU/DubCenter/DubCenter.cpp index 4b9f74db5..dc3eb73c9 100755 --- a/plugins/MacSignedAU/DubCenter/DubCenter.cpp +++ b/plugins/MacSignedAU/DubCenter/DubCenter.cpp @@ -354,42 +354,8 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -608,14 +574,14 @@ OSStatus DubCenter::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla bflip++; if (bflip < 1 || bflip > 3) bflip = 1; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/DubCenter/DubCenter.h b/plugins/MacSignedAU/DubCenter/DubCenter.h index 2fdc597f6..872b27821 100755 --- a/plugins/MacSignedAU/DubCenter/DubCenter.h +++ b/plugins/MacSignedAU/DubCenter/DubCenter.h @@ -192,8 +192,7 @@ public: Float64 iirSampleZ; Float64 oscGate; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Dyno/Dyno.cpp b/plugins/MacSignedAU/Dyno/Dyno.cpp index fcd4b14ad..4e216b6f2 100755 --- a/plugins/MacSignedAU/Dyno/Dyno.cpp +++ b/plugins/MacSignedAU/Dyno/Dyno.cpp @@ -158,7 +158,7 @@ ComponentResult Dyno::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Dyno::DynoKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/EdIsDim/EdIsDim.h b/plugins/MacSignedAU/EdIsDim/EdIsDim.h index 4eb106785..c4e926436 100755 --- a/plugins/MacSignedAU/EdIsDim/EdIsDim.h +++ b/plugins/MacSignedAU/EdIsDim/EdIsDim.h @@ -111,8 +111,7 @@ public: virtual ComponentResult Version() { return kEdIsDimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacSignedAU/Elation/Elation.cpp b/plugins/MacSignedAU/Elation/Elation.cpp index b74124bdb..d482ba768 100755 --- a/plugins/MacSignedAU/Elation/Elation.cpp +++ b/plugins/MacSignedAU/Elation/Elation.cpp @@ -186,7 +186,7 @@ void Elation::ElationKernel::Reset() compA = 1.0; compB = 1.0; flip = false; previous = 0.0; compC = 1.0; compD = 1.0; previousB = 0.0; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/EveryTrim/EveryTrim.cpp b/plugins/MacSignedAU/EveryTrim/EveryTrim.cpp index 26f875112..330d4dc68 100755 --- a/plugins/MacSignedAU/EveryTrim/EveryTrim.cpp +++ b/plugins/MacSignedAU/EveryTrim/EveryTrim.cpp @@ -253,14 +253,14 @@ OSStatus EveryTrim::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = (mid-side) * rightgain; //contains mastergain and the gain trim fixing the mid/side - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/EveryTrim/EveryTrim.h b/plugins/MacSignedAU/EveryTrim/EveryTrim.h index 3aaa10b3c..a52abd9dd 100755 --- a/plugins/MacSignedAU/EveryTrim/EveryTrim.h +++ b/plugins/MacSignedAU/EveryTrim/EveryTrim.h @@ -121,8 +121,7 @@ public: virtual ComponentResult Version() { return kEveryTrimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; diff --git a/plugins/MacSignedAU/Facet/Facet.cpp b/plugins/MacSignedAU/Facet/Facet.cpp index d52f4206b..e8aea03d5 100755 --- a/plugins/MacSignedAU/Facet/Facet.cpp +++ b/plugins/MacSignedAU/Facet/Facet.cpp @@ -158,7 +158,7 @@ ComponentResult Facet::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Facet::FacetKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Focus/Focus.cpp b/plugins/MacSignedAU/Focus/Focus.cpp index 47da19348..464d1f9ee 100755 --- a/plugins/MacSignedAU/Focus/Focus.cpp +++ b/plugins/MacSignedAU/Focus/Focus.cpp @@ -209,7 +209,7 @@ ComponentResult Focus::Initialize() void Focus::FocusKernel::Reset() { for (int x = 0; x < 9; x++) {figure[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Galactic/Galactic.h b/plugins/MacSignedAU/Galactic/Galactic.h index 44d229cd4..1c27b51d7 100644 --- a/plugins/MacSignedAU/Galactic/Galactic.h +++ b/plugins/MacSignedAU/Galactic/Galactic.h @@ -194,8 +194,7 @@ public: double vibM; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Gatelinked/Gatelinked.cpp b/plugins/MacSignedAU/Gatelinked/Gatelinked.cpp index 258d3aade..c83980f51 100755 --- a/plugins/MacSignedAU/Gatelinked/Gatelinked.cpp +++ b/plugins/MacSignedAU/Gatelinked/Gatelinked.cpp @@ -255,42 +255,8 @@ OSStatus Gatelinked::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -412,14 +378,14 @@ OSStatus Gatelinked::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/GlitchShifter/GlitchShifter.cpp b/plugins/MacSignedAU/GlitchShifter/GlitchShifter.cpp index 9d474d5a4..2d5e4db38 100755 --- a/plugins/MacSignedAU/GlitchShifter/GlitchShifter.cpp +++ b/plugins/MacSignedAU/GlitchShifter/GlitchShifter.cpp @@ -208,7 +208,7 @@ void GlitchShifter::GlitchShifterKernel::Reset() position = 0.0; flip = false; splicing = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Golem/Golem.cpp b/plugins/MacSignedAU/Golem/Golem.cpp index 190cf0c7a..a136ff816 100755 --- a/plugins/MacSignedAU/Golem/Golem.cpp +++ b/plugins/MacSignedAU/Golem/Golem.cpp @@ -291,14 +291,14 @@ OSStatus Golem::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleR = inputSampleL; //the output is totally mono - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Golem/Golem.h b/plugins/MacSignedAU/Golem/Golem.h index 8de93792b..0c145d7a4 100755 --- a/plugins/MacSignedAU/Golem/Golem.h +++ b/plugins/MacSignedAU/Golem/Golem.h @@ -132,8 +132,7 @@ public: private: Float64 p[4099]; int count; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Gringer/Gringer.cpp b/plugins/MacSignedAU/Gringer/Gringer.cpp index 72b810819..0aa834a3f 100755 --- a/plugins/MacSignedAU/Gringer/Gringer.cpp +++ b/plugins/MacSignedAU/Gringer/Gringer.cpp @@ -151,7 +151,7 @@ ComponentResult Gringer::Initialize() void Gringer::GringerKernel::Reset() { for (int x = 0; x < 9; x++) {inband[x] = 0.0; outband[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/HermeTrim/HermeTrim.cpp b/plugins/MacSignedAU/HermeTrim/HermeTrim.cpp index 405702917..48b17fc8f 100755 --- a/plugins/MacSignedAU/HermeTrim/HermeTrim.cpp +++ b/plugins/MacSignedAU/HermeTrim/HermeTrim.cpp @@ -253,14 +253,14 @@ OSStatus HermeTrim::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = (mid-side) * rightgain; //contains mastergain and the gain trim fixing the mid/side - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/HermeTrim/HermeTrim.h b/plugins/MacSignedAU/HermeTrim/HermeTrim.h index da24fea06..cc2584ff7 100755 --- a/plugins/MacSignedAU/HermeTrim/HermeTrim.h +++ b/plugins/MacSignedAU/HermeTrim/HermeTrim.h @@ -121,8 +121,7 @@ public: virtual ComponentResult Version() { return kHermeTrimVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacSignedAU/Highpass2/Highpass2.cpp b/plugins/MacSignedAU/Highpass2/Highpass2.cpp index bbc6e40d4..826ca857c 100755 --- a/plugins/MacSignedAU/Highpass2/Highpass2.cpp +++ b/plugins/MacSignedAU/Highpass2/Highpass2.cpp @@ -190,7 +190,7 @@ void Highpass2::Highpass2Kernel::Reset() iirSampleF = 0.0; iirSampleG = 0.0; iirSampleH = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; fpFlip = true; } diff --git a/plugins/MacSignedAU/Holt/Holt.cpp b/plugins/MacSignedAU/Holt/Holt.cpp index 894e6edd9..9abcf1390 100755 --- a/plugins/MacSignedAU/Holt/Holt.cpp +++ b/plugins/MacSignedAU/Holt/Holt.cpp @@ -198,7 +198,7 @@ void Holt::HoltKernel::Reset() previousTrendC = 0.0; previousSampleD = 0.0; previousTrendD = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Infrasonic/Infrasonic.cpp b/plugins/MacSignedAU/Infrasonic/Infrasonic.cpp index c84fa5137..20581a788 100755 --- a/plugins/MacSignedAU/Infrasonic/Infrasonic.cpp +++ b/plugins/MacSignedAU/Infrasonic/Infrasonic.cpp @@ -151,7 +151,7 @@ ComponentResult Infrasonic::Initialize() void Infrasonic::InfrasonicKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Interstage/Interstage.cpp b/plugins/MacSignedAU/Interstage/Interstage.cpp index 4b193e539..90a8b6406 100755 --- a/plugins/MacSignedAU/Interstage/Interstage.cpp +++ b/plugins/MacSignedAU/Interstage/Interstage.cpp @@ -157,7 +157,7 @@ void Interstage::InterstageKernel::Reset() iirSampleE = 0.0; iirSampleF = 0.0; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; } diff --git a/plugins/MacSignedAU/Isolator/Isolator.cpp b/plugins/MacSignedAU/Isolator/Isolator.cpp index 3e835c34c..ae8190ddd 100755 --- a/plugins/MacSignedAU/Isolator/Isolator.cpp +++ b/plugins/MacSignedAU/Isolator/Isolator.cpp @@ -175,7 +175,7 @@ ComponentResult Isolator::Initialize() void Isolator::IsolatorKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Logical4/Logical4.cpp b/plugins/MacSignedAU/Logical4/Logical4.cpp index 3786329f8..720c1d2ca 100755 --- a/plugins/MacSignedAU/Logical4/Logical4.cpp +++ b/plugins/MacSignedAU/Logical4/Logical4.cpp @@ -1110,14 +1110,14 @@ OSStatus Logical4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag } fpFlip = !fpFlip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Loud/Loud.cpp b/plugins/MacSignedAU/Loud/Loud.cpp index b77514d2b..80bb94f88 100755 --- a/plugins/MacSignedAU/Loud/Loud.cpp +++ b/plugins/MacSignedAU/Loud/Loud.cpp @@ -175,7 +175,7 @@ ComponentResult Loud::Initialize() void Loud::LoudKernel::Reset() { lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Lowpass2/Lowpass2.cpp b/plugins/MacSignedAU/Lowpass2/Lowpass2.cpp index 2bda027e1..07a41a014 100755 --- a/plugins/MacSignedAU/Lowpass2/Lowpass2.cpp +++ b/plugins/MacSignedAU/Lowpass2/Lowpass2.cpp @@ -190,7 +190,7 @@ void Lowpass2::Lowpass2Kernel::Reset() iirSampleF = 0.0; iirSampleG = 0.0; iirSampleH = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; fpFlip = true; } diff --git a/plugins/MacSignedAU/Luxor/Luxor.cpp b/plugins/MacSignedAU/Luxor/Luxor.cpp index cd39f22f5..139f5e7af 100755 --- a/plugins/MacSignedAU/Luxor/Luxor.cpp +++ b/plugins/MacSignedAU/Luxor/Luxor.cpp @@ -184,7 +184,7 @@ void Luxor::LuxorKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/MV/MV.cpp b/plugins/MacSignedAU/MV/MV.cpp index 3f0df3455..a9e40146e 100755 --- a/plugins/MacSignedAU/MV/MV.cpp +++ b/plugins/MacSignedAU/MV/MV.cpp @@ -247,7 +247,7 @@ void MV::MVKernel::Reset() feedback = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/MidSide/MidSide.h b/plugins/MacSignedAU/MidSide/MidSide.h index c5dec2ac3..c7481d57c 100755 --- a/plugins/MacSignedAU/MidSide/MidSide.h +++ b/plugins/MacSignedAU/MidSide/MidSide.h @@ -111,8 +111,7 @@ public: virtual ComponentResult Version() { return kMidSideVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; //default stuff }; diff --git a/plugins/MacSignedAU/MoNoam/MoNoam.cpp b/plugins/MacSignedAU/MoNoam/MoNoam.cpp index bcee69a3f..6e29417c2 100755 --- a/plugins/MacSignedAU/MoNoam/MoNoam.cpp +++ b/plugins/MacSignedAU/MoNoam/MoNoam.cpp @@ -194,7 +194,7 @@ ComponentResult MoNoam::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ComponentResult MoNoam::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -220,8 +220,8 @@ OSStatus MoNoam::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; @@ -240,11 +240,11 @@ OSStatus MoNoam::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/Mojo/Mojo.cpp b/plugins/MacSignedAU/Mojo/Mojo.cpp index 7fbf1c0b8..754bd3733 100755 --- a/plugins/MacSignedAU/Mojo/Mojo.cpp +++ b/plugins/MacSignedAU/Mojo/Mojo.cpp @@ -158,7 +158,7 @@ ComponentResult Mojo::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Mojo::MojoKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Monitoring/Monitoring.cpp b/plugins/MacSignedAU/Monitoring/Monitoring.cpp index c9d8afeff..7309be0e2 100755 --- a/plugins/MacSignedAU/Monitoring/Monitoring.cpp +++ b/plugins/MacSignedAU/Monitoring/Monitoring.cpp @@ -250,7 +250,7 @@ ComponentResult Monitoring::Reset(AudioUnitScope inScope, AudioUnitElement inEl //SubsOnly for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} //Bandpasses - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -291,8 +291,8 @@ OSStatus Monitoring::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/MacSignedAU/Monitoring2/Monitoring2.h b/plugins/MacSignedAU/Monitoring2/Monitoring2.h index 32b707a39..a2a8c9039 100644 --- a/plugins/MacSignedAU/Monitoring2/Monitoring2.h +++ b/plugins/MacSignedAU/Monitoring2/Monitoring2.h @@ -182,8 +182,7 @@ public: Float64 iirSampleWR, iirSampleXR, iirSampleYR, iirSampleZR; // o/` //SubsOnly - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Neverland/Neverland.cpp b/plugins/MacSignedAU/Neverland/Neverland.cpp index e36bc55ce..bd2311e08 100755 --- a/plugins/MacSignedAU/Neverland/Neverland.cpp +++ b/plugins/MacSignedAU/Neverland/Neverland.cpp @@ -184,7 +184,7 @@ void Neverland::NeverlandKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Nikola/Nikola.cpp b/plugins/MacSignedAU/Nikola/Nikola.cpp index a695bde03..4374fde0c 100755 --- a/plugins/MacSignedAU/Nikola/Nikola.cpp +++ b/plugins/MacSignedAU/Nikola/Nikola.cpp @@ -169,7 +169,7 @@ void Nikola::NikolaKernel::Reset() WasNegative = false; outlevel = 0.0; framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/NonlinearSpace/NonlinearSpace.cpp b/plugins/MacSignedAU/NonlinearSpace/NonlinearSpace.cpp index c2fc6f64a..3db8b37f2 100755 --- a/plugins/MacSignedAU/NonlinearSpace/NonlinearSpace.cpp +++ b/plugins/MacSignedAU/NonlinearSpace/NonlinearSpace.cpp @@ -1119,14 +1119,14 @@ OSStatus NonlinearSpace::ProcessBufferLists(AudioUnitRenderActionFlags & ioActi drySampleR += inputSampleR; //here we combine the tanks with the dry signal - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither flip = !flip; *outputL = drySampleL; diff --git a/plugins/MacSignedAU/NotJustAnotherDither/NotJustAnotherDither.cpp b/plugins/MacSignedAU/NotJustAnotherDither/NotJustAnotherDither.cpp index 02a9e0012..68271256c 100755 --- a/plugins/MacSignedAU/NotJustAnotherDither/NotJustAnotherDither.cpp +++ b/plugins/MacSignedAU/NotJustAnotherDither/NotJustAnotherDither.cpp @@ -193,7 +193,7 @@ void NotJustAnotherDither::NotJustAnotherDitherKernel::Reset() byn[9] = 46.0; byn[10] = 1000.0; noiseShaping = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PaulDither/PaulDither.cpp b/plugins/MacSignedAU/PaulDither/PaulDither.cpp index e5df5960b..45a524a81 100755 --- a/plugins/MacSignedAU/PaulDither/PaulDither.cpp +++ b/plugins/MacSignedAU/PaulDither/PaulDither.cpp @@ -182,7 +182,7 @@ ComponentResult PaulDither::Initialize() void PaulDither::PaulDitherKernel::Reset() { previousDither = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PeaksOnly/PeaksOnly.cpp b/plugins/MacSignedAU/PeaksOnly/PeaksOnly.cpp index c26d1933c..463a0795f 100755 --- a/plugins/MacSignedAU/PeaksOnly/PeaksOnly.cpp +++ b/plugins/MacSignedAU/PeaksOnly/PeaksOnly.cpp @@ -152,7 +152,7 @@ void PeaksOnly::PeaksOnlyKernel::Reset() { for(int count = 0; count < 1502; count++) {a[count] = 0.0; b[count] = 0.0; c[count] = 0.0; d[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PocketVerbs/PocketVerbs.cpp b/plugins/MacSignedAU/PocketVerbs/PocketVerbs.cpp index 92cff00c1..55fe6446e 100755 --- a/plugins/MacSignedAU/PocketVerbs/PocketVerbs.cpp +++ b/plugins/MacSignedAU/PocketVerbs/PocketVerbs.cpp @@ -291,7 +291,7 @@ void PocketVerbs::PocketVerbsKernel::Reset() savedRoomsize = -1.0; //force update to begin countdown = -1; peak = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Podcast/Podcast.cpp b/plugins/MacSignedAU/Podcast/Podcast.cpp index aedebedff..6f3e32bce 100755 --- a/plugins/MacSignedAU/Podcast/Podcast.cpp +++ b/plugins/MacSignedAU/Podcast/Podcast.cpp @@ -167,7 +167,7 @@ ComponentResult Podcast::Initialize() void Podcast::PodcastKernel::Reset() { c1 = 2.0; c2 = 2.0; c3 = 2.0; c4 = 2.0; c5 = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PodcastDeluxe/PodcastDeluxe.cpp b/plugins/MacSignedAU/PodcastDeluxe/PodcastDeluxe.cpp index a4e66a48e..dc7b36eb3 100755 --- a/plugins/MacSignedAU/PodcastDeluxe/PodcastDeluxe.cpp +++ b/plugins/MacSignedAU/PodcastDeluxe/PodcastDeluxe.cpp @@ -162,7 +162,7 @@ void PodcastDeluxe::PodcastDeluxeKernel::Reset() tap1 = 1; tap2 = 1; tap3 = 1; tap4 = 1; tap5 = 1; maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1 = 2.0; c2 = 2.0; c3 = 2.0; c4 = 2.0; c5 = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Pop/Pop.cpp b/plugins/MacSignedAU/Pop/Pop.cpp index 9b8756883..63e491be0 100755 --- a/plugins/MacSignedAU/Pop/Pop.cpp +++ b/plugins/MacSignedAU/Pop/Pop.cpp @@ -188,7 +188,7 @@ void Pop::PopKernel::Reset() previous3 = 0.0; previous4 = 0.0; previous5 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PowerSag2/PowerSag2.cpp b/plugins/MacSignedAU/PowerSag2/PowerSag2.cpp index 9e23f6186..a25546e87 100755 --- a/plugins/MacSignedAU/PowerSag2/PowerSag2.cpp +++ b/plugins/MacSignedAU/PowerSag2/PowerSag2.cpp @@ -169,7 +169,7 @@ void PowerSag2::PowerSag2Kernel::Reset() for(int count = 0; count < 16385; count++) {d[count] = 0;} control = 0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Precious/Precious.cpp b/plugins/MacSignedAU/Precious/Precious.cpp index 884feb34c..1b859ba29 100755 --- a/plugins/MacSignedAU/Precious/Precious.cpp +++ b/plugins/MacSignedAU/Precious/Precious.cpp @@ -184,7 +184,7 @@ void Precious::PreciousKernel::Reset() { for(int count = 0; count < 34; count++) {b[count] = 0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Pressure4/Pressure4.cpp b/plugins/MacSignedAU/Pressure4/Pressure4.cpp index bd82df780..1a4634bfb 100755 --- a/plugins/MacSignedAU/Pressure4/Pressure4.cpp +++ b/plugins/MacSignedAU/Pressure4/Pressure4.cpp @@ -368,14 +368,14 @@ OSStatus Pressure4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Pressure5/Pressure5.h b/plugins/MacSignedAU/Pressure5/Pressure5.h index a9a5bfede..4ab62427c 100644 --- a/plugins/MacSignedAU/Pressure5/Pressure5.h +++ b/plugins/MacSignedAU/Pressure5/Pressure5.h @@ -163,8 +163,7 @@ public: double slewMax; //to adust mewiness - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PurestAir/PurestAir.cpp b/plugins/MacSignedAU/PurestAir/PurestAir.cpp index 315a23e8b..32f2df2bf 100755 --- a/plugins/MacSignedAU/PurestAir/PurestAir.cpp +++ b/plugins/MacSignedAU/PurestAir/PurestAir.cpp @@ -179,7 +179,7 @@ void PurestAir::PurestAirKernel::Reset() lastSample = 0.0; s1 = s2 = s3 = 0.0; apply = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PurestFade/PurestFade.cpp b/plugins/MacSignedAU/PurestFade/PurestFade.cpp index bf46e5c22..f9dd1178d 100755 --- a/plugins/MacSignedAU/PurestFade/PurestFade.cpp +++ b/plugins/MacSignedAU/PurestFade/PurestFade.cpp @@ -170,7 +170,7 @@ void PurestFade::PurestFadeKernel::Reset() settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/PurestSquish/PurestSquish.cpp b/plugins/MacSignedAU/PurestSquish/PurestSquish.cpp index 74a277a60..4ee65d97f 100755 --- a/plugins/MacSignedAU/PurestSquish/PurestSquish.cpp +++ b/plugins/MacSignedAU/PurestSquish/PurestSquish.cpp @@ -205,7 +205,7 @@ void PurestSquish::PurestSquishKernel::Reset() muVary = 1; count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Pyewacket/Pyewacket.cpp b/plugins/MacSignedAU/Pyewacket/Pyewacket.cpp index 61df24b61..742ca7e86 100755 --- a/plugins/MacSignedAU/Pyewacket/Pyewacket.cpp +++ b/plugins/MacSignedAU/Pyewacket/Pyewacket.cpp @@ -296,14 +296,14 @@ OSStatus Pyewacket::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR *= outputGain; } - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Pyewacket/Pyewacket.h b/plugins/MacSignedAU/Pyewacket/Pyewacket.h index 756f699f1..496f4be33 100755 --- a/plugins/MacSignedAU/Pyewacket/Pyewacket.h +++ b/plugins/MacSignedAU/Pyewacket/Pyewacket.h @@ -116,8 +116,7 @@ public: private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; Float64 chase; Float64 lastrectifierL; Float64 lastrectifierR; diff --git a/plugins/MacSignedAU/RawGlitters/RawGlitters.cpp b/plugins/MacSignedAU/RawGlitters/RawGlitters.cpp index a2b109a36..d2a6d3838 100755 --- a/plugins/MacSignedAU/RawGlitters/RawGlitters.cpp +++ b/plugins/MacSignedAU/RawGlitters/RawGlitters.cpp @@ -183,7 +183,7 @@ void RawGlitters::RawGlittersKernel::Reset() { lastSample = 0.0; lastSample2 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/RawTimbers/RawTimbers.cpp b/plugins/MacSignedAU/RawTimbers/RawTimbers.cpp index 2da7ec7c7..20c0e5c7e 100755 --- a/plugins/MacSignedAU/RawTimbers/RawTimbers.cpp +++ b/plugins/MacSignedAU/RawTimbers/RawTimbers.cpp @@ -183,7 +183,7 @@ void RawTimbers::RawTimbersKernel::Reset() { lastSample = 0.0; lastSample2 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Recurve/Recurve.cpp b/plugins/MacSignedAU/Recurve/Recurve.cpp index 793f4d30a..80618bf3b 100755 --- a/plugins/MacSignedAU/Recurve/Recurve.cpp +++ b/plugins/MacSignedAU/Recurve/Recurve.cpp @@ -166,7 +166,7 @@ ComponentResult Recurve::Initialize() ComponentResult Recurve::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { gain = 2.0; //default to gain push - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -188,8 +188,8 @@ OSStatus Recurve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -214,11 +214,11 @@ OSStatus Recurve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/Remap/Remap.cpp b/plugins/MacSignedAU/Remap/Remap.cpp index 780babca3..723d8d32f 100755 --- a/plugins/MacSignedAU/Remap/Remap.cpp +++ b/plugins/MacSignedAU/Remap/Remap.cpp @@ -174,7 +174,7 @@ ComponentResult Remap::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Remap::RemapKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/ResEQ/ResEQ.cpp b/plugins/MacSignedAU/ResEQ/ResEQ.cpp index 985af57d5..faea04151 100755 --- a/plugins/MacSignedAU/ResEQ/ResEQ.cpp +++ b/plugins/MacSignedAU/ResEQ/ResEQ.cpp @@ -226,7 +226,7 @@ void ResEQ::ResEQKernel::Reset() register UInt32 count; for(count = 0; count < 60; count++) {b[count] = 0.0; f[count] = 0.0;} framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/SideDull/SideDull.cpp b/plugins/MacSignedAU/SideDull/SideDull.cpp index b10b1262d..5e5316f58 100755 --- a/plugins/MacSignedAU/SideDull/SideDull.cpp +++ b/plugins/MacSignedAU/SideDull/SideDull.cpp @@ -232,14 +232,14 @@ OSStatus SideDull::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/SideDull/SideDull.h b/plugins/MacSignedAU/SideDull/SideDull.h index 515b969f6..0d7ef8621 100755 --- a/plugins/MacSignedAU/SideDull/SideDull.h +++ b/plugins/MacSignedAU/SideDull/SideDull.h @@ -112,8 +112,7 @@ private: Float64 iirSampleA; Float64 iirSampleB; bool flip; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Sidepass/Sidepass.cpp b/plugins/MacSignedAU/Sidepass/Sidepass.cpp index b6cffc3ed..7a1c9c766 100755 --- a/plugins/MacSignedAU/Sidepass/Sidepass.cpp +++ b/plugins/MacSignedAU/Sidepass/Sidepass.cpp @@ -233,14 +233,14 @@ OSStatus Sidepass::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Sidepass/Sidepass.h b/plugins/MacSignedAU/Sidepass/Sidepass.h index 6a7f62b42..9fc775f83 100755 --- a/plugins/MacSignedAU/Sidepass/Sidepass.h +++ b/plugins/MacSignedAU/Sidepass/Sidepass.h @@ -112,8 +112,7 @@ private: Float64 iirSampleA; Float64 iirSampleB; bool flip; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Slew3/Slew3.cpp b/plugins/MacSignedAU/Slew3/Slew3.cpp index 837d002f9..eb5b0f0d7 100755 --- a/plugins/MacSignedAU/Slew3/Slew3.cpp +++ b/plugins/MacSignedAU/Slew3/Slew3.cpp @@ -159,7 +159,7 @@ ComponentResult Slew3::Initialize() void Slew3::Slew3Kernel::Reset() { lastSampleA = lastSampleB = lastSampleC = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Smooth/Smooth.cpp b/plugins/MacSignedAU/Smooth/Smooth.cpp index 180632660..c4c28332f 100755 --- a/plugins/MacSignedAU/Smooth/Smooth.cpp +++ b/plugins/MacSignedAU/Smooth/Smooth.cpp @@ -184,7 +184,7 @@ void Smooth::SmoothKernel::Reset() gainD = 1.0; lastSampleE = 0.0; gainE = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/SoftGate/SoftGate.cpp b/plugins/MacSignedAU/SoftGate/SoftGate.cpp index 12e719e2a..c79d2b951 100755 --- a/plugins/MacSignedAU/SoftGate/SoftGate.cpp +++ b/plugins/MacSignedAU/SoftGate/SoftGate.cpp @@ -194,7 +194,7 @@ ComponentResult SoftGate::Reset(AudioUnitScope inScope, AudioUnitElement inElem storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -224,8 +224,8 @@ OSStatus SoftGate::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; diffL = storedL[0] - storedL[1]; @@ -255,11 +255,11 @@ OSStatus SoftGate::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/SoftGateMono/SoftGateMono.cpp b/plugins/MacSignedAU/SoftGateMono/SoftGateMono.cpp index 601249502..25715b78e 100755 --- a/plugins/MacSignedAU/SoftGateMono/SoftGateMono.cpp +++ b/plugins/MacSignedAU/SoftGateMono/SoftGateMono.cpp @@ -177,7 +177,7 @@ void SoftGateMono::SoftGateMonoKernel::Reset() storedL[0] = storedL[1] = 0.0; diffL = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp b/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp index 9370b91fb..6b1dcd87d 100755 --- a/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp +++ b/plugins/MacSignedAU/SpatializeDither/SpatializeDither.cpp @@ -183,7 +183,7 @@ void SpatializeDither::SpatializeDitherKernel::Reset() { contingentErr = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Spiral/Spiral.cpp b/plugins/MacSignedAU/Spiral/Spiral.cpp index c1dc054a5..0ccfe1b5d 100755 --- a/plugins/MacSignedAU/Spiral/Spiral.cpp +++ b/plugins/MacSignedAU/Spiral/Spiral.cpp @@ -150,7 +150,7 @@ ComponentResult Spiral::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Spiral::SpiralKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Spiral2/Spiral2.cpp b/plugins/MacSignedAU/Spiral2/Spiral2.cpp index 4578a6514..feff0fcdb 100755 --- a/plugins/MacSignedAU/Spiral2/Spiral2.cpp +++ b/plugins/MacSignedAU/Spiral2/Spiral2.cpp @@ -194,7 +194,7 @@ void Spiral2::Spiral2Kernel::Reset() iirSampleB = 0.0; prevSample = 0.0; flip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/StereoChorus/StereoChorus.h b/plugins/MacSignedAU/StereoChorus/StereoChorus.h index fc57fff5c..1fa93d10b 100644 --- a/plugins/MacSignedAU/StereoChorus/StereoChorus.h +++ b/plugins/MacSignedAU/StereoChorus/StereoChorus.h @@ -132,8 +132,7 @@ private: double lastRefR[7]; int cycle; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/StereoFX/StereoFX.cpp b/plugins/MacSignedAU/StereoFX/StereoFX.cpp index bc94b2d6f..03a53e907 100755 --- a/plugins/MacSignedAU/StereoFX/StereoFX.cpp +++ b/plugins/MacSignedAU/StereoFX/StereoFX.cpp @@ -295,14 +295,14 @@ OSStatus StereoFX::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = (mid-side)/2.0; flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/StereoFX/StereoFX.h b/plugins/MacSignedAU/StereoFX/StereoFX.h index f7f216256..c8fc895df 100755 --- a/plugins/MacSignedAU/StereoFX/StereoFX.h +++ b/plugins/MacSignedAU/StereoFX/StereoFX.h @@ -119,8 +119,7 @@ public: private: Float64 iirSampleA; Float64 iirSampleB; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; bool flip; }; diff --git a/plugins/MacSignedAU/Surge/Surge.cpp b/plugins/MacSignedAU/Surge/Surge.cpp index 7c2d54c3e..93021a20d 100755 --- a/plugins/MacSignedAU/Surge/Surge.cpp +++ b/plugins/MacSignedAU/Surge/Surge.cpp @@ -269,14 +269,14 @@ OSStatus Surge::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleR = drySampleR - (inputSampleR * intensity); inputSampleR = (drySampleR * dry) + (inputSampleR * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Surge/Surge.h b/plugins/MacSignedAU/Surge/Surge.h index 7649dcb58..7c85fa2c8 100755 --- a/plugins/MacSignedAU/Surge/Surge.h +++ b/plugins/MacSignedAU/Surge/Surge.h @@ -112,8 +112,7 @@ public: virtual ComponentResult Version() { return kSurgeVersion; } private: - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; double chaseA; double chaseB; double chaseC; diff --git a/plugins/MacSignedAU/SurgeTide/SurgeTide.cpp b/plugins/MacSignedAU/SurgeTide/SurgeTide.cpp index eb52e3789..2e481c916 100755 --- a/plugins/MacSignedAU/SurgeTide/SurgeTide.cpp +++ b/plugins/MacSignedAU/SurgeTide/SurgeTide.cpp @@ -266,14 +266,14 @@ OSStatus SurgeTide::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla inputSampleR = drySampleR - (inputSampleR * intensity); inputSampleR = (drySampleR * dry) + (inputSampleR * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp b/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp index 1e18945a5..ea6df6b3b 100755 --- a/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp +++ b/plugins/MacSignedAU/TPDFDither/TPDFDither.cpp @@ -181,7 +181,7 @@ ComponentResult TPDFDither::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void TPDFDither::TPDFDitherKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Tape/Tape.cpp b/plugins/MacSignedAU/Tape/Tape.cpp index cf3ff2196..9eb4aec72 100755 --- a/plugins/MacSignedAU/Tape/Tape.cpp +++ b/plugins/MacSignedAU/Tape/Tape.cpp @@ -173,7 +173,7 @@ void Tape::TapeKernel::Reset() flip = false; for (int x = 0; x < 9; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;} lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/TapeDither/TapeDither.cpp b/plugins/MacSignedAU/TapeDither/TapeDither.cpp index 9c392a7ca..f35146e03 100755 --- a/plugins/MacSignedAU/TapeDither/TapeDither.cpp +++ b/plugins/MacSignedAU/TapeDither/TapeDither.cpp @@ -185,7 +185,7 @@ void TapeDither::TapeDitherKernel::Reset() previousDither2 = 0.0; previousDither3 = 0.0; previousDither4 = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/Thunder/Thunder.cpp b/plugins/MacSignedAU/Thunder/Thunder.cpp index 8fa23113b..9bac546aa 100755 --- a/plugins/MacSignedAU/Thunder/Thunder.cpp +++ b/plugins/MacSignedAU/Thunder/Thunder.cpp @@ -384,14 +384,14 @@ OSStatus Thunder::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags } flip = !flip; - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Thunder/Thunder.h b/plugins/MacSignedAU/Thunder/Thunder.h index ca1606fe5..a9f097b07 100755 --- a/plugins/MacSignedAU/Thunder/Thunder.h +++ b/plugins/MacSignedAU/Thunder/Thunder.h @@ -129,8 +129,7 @@ private: Float64 iirSampleAM; Float64 iirSampleBM; Float64 iirSampleCM; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; bool flip; }; diff --git a/plugins/MacSignedAU/ToTape6/ToTape6.cpp b/plugins/MacSignedAU/ToTape6/ToTape6.cpp index 73842ce1e..53e813db1 100755 --- a/plugins/MacSignedAU/ToTape6/ToTape6.cpp +++ b/plugins/MacSignedAU/ToTape6/ToTape6.cpp @@ -210,7 +210,7 @@ void ToTape6::ToTape6Kernel::Reset() rateof = 0.5; nextmax = 0.5; lastSample = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/ToVinyl4/ToVinyl4.cpp b/plugins/MacSignedAU/ToVinyl4/ToVinyl4.cpp index 0cab0cbb5..34fb21de4 100755 --- a/plugins/MacSignedAU/ToVinyl4/ToVinyl4.cpp +++ b/plugins/MacSignedAU/ToVinyl4/ToVinyl4.cpp @@ -698,14 +698,14 @@ OSStatus ToVinyl4::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlag inputSampleR = accumulatorSample; //we just re-use accumulatorSample to do this little shuffle - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/TremoSquare/TremoSquare.cpp b/plugins/MacSignedAU/TremoSquare/TremoSquare.cpp index 6e3d98346..344d5e0aa 100755 --- a/plugins/MacSignedAU/TremoSquare/TremoSquare.cpp +++ b/plugins/MacSignedAU/TremoSquare/TremoSquare.cpp @@ -169,7 +169,7 @@ void TremoSquare::TremoSquareKernel::Reset() osc = 0.0; polarity = false; mute = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/TripleSpread/TripleSpread.cpp b/plugins/MacSignedAU/TripleSpread/TripleSpread.cpp index 33e4979c3..70e2eb512 100755 --- a/plugins/MacSignedAU/TripleSpread/TripleSpread.cpp +++ b/plugins/MacSignedAU/TripleSpread/TripleSpread.cpp @@ -225,7 +225,7 @@ ComponentResult TripleSpread::Reset(AudioUnitScope inScope, AudioUnitElement in gcount = 0; lastwidth = 16386; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -252,8 +252,8 @@ OSStatus TripleSpread::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -538,11 +538,11 @@ OSStatus TripleSpread::ProcessBufferLists(AudioUnitRenderActionFlags & ioAction //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/Ultrasonic/Ultrasonic.cpp b/plugins/MacSignedAU/Ultrasonic/Ultrasonic.cpp index 188106583..b80ea00b6 100755 --- a/plugins/MacSignedAU/Ultrasonic/Ultrasonic.cpp +++ b/plugins/MacSignedAU/Ultrasonic/Ultrasonic.cpp @@ -151,7 +151,7 @@ ComponentResult Ultrasonic::Initialize() void Ultrasonic::UltrasonicKernel::Reset() { for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/UnBox/UnBox.cpp b/plugins/MacSignedAU/UnBox/UnBox.cpp index 1b85e1c99..4da4716cd 100755 --- a/plugins/MacSignedAU/UnBox/UnBox.cpp +++ b/plugins/MacSignedAU/UnBox/UnBox.cpp @@ -174,7 +174,7 @@ ComponentResult UnBox::Initialize() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void UnBox::UnBoxKernel::Reset() { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 5; count++) {a[count] = 0.0; b[count] = 0.0; e[count] = 0.0;} for(int count = 0; count < 11; count++) {c[count] = 0.0; f[count] = 0.0;} iirSampleA = 0.0; diff --git a/plugins/MacSignedAU/Vibrato/Vibrato.cpp b/plugins/MacSignedAU/Vibrato/Vibrato.cpp index a8e1409e4..43c32e54e 100755 --- a/plugins/MacSignedAU/Vibrato/Vibrato.cpp +++ b/plugins/MacSignedAU/Vibrato/Vibrato.cpp @@ -199,7 +199,7 @@ void Vibrato::VibratoKernel::Reset() airOdd = 0.0; airFactor = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/VinylDither/VinylDither.cpp b/plugins/MacSignedAU/VinylDither/VinylDither.cpp index a6651dc32..05e8a7a4c 100755 --- a/plugins/MacSignedAU/VinylDither/VinylDither.cpp +++ b/plugins/MacSignedAU/VinylDither/VinylDither.cpp @@ -199,7 +199,7 @@ void VinylDither::VinylDitherKernel::Reset() ns[13] = 0; ns[14] = 0; ns[15] = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedAU/VoiceTrick/VoiceTrick.cpp b/plugins/MacSignedAU/VoiceTrick/VoiceTrick.cpp index 1f02c4273..90e2b5572 100755 --- a/plugins/MacSignedAU/VoiceTrick/VoiceTrick.cpp +++ b/plugins/MacSignedAU/VoiceTrick/VoiceTrick.cpp @@ -183,7 +183,7 @@ ComponentResult VoiceTrick::Reset(AudioUnitScope inScope, AudioUnitElement inEl lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -211,8 +211,8 @@ OSStatus VoiceTrick::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl while (nSampleFrames-- > 0) { double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -279,11 +279,11 @@ OSStatus VoiceTrick::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/Wider/Wider.cpp b/plugins/MacSignedAU/Wider/Wider.cpp index d5cbf77ca..d231f7e73 100755 --- a/plugins/MacSignedAU/Wider/Wider.cpp +++ b/plugins/MacSignedAU/Wider/Wider.cpp @@ -296,14 +296,14 @@ OSStatus Wider::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, inputSampleL = (drySampleL * dry) + ((mid+side) * wet); inputSampleR = (drySampleR * dry) + ((mid-side) * wet); - //stereo 32 bit dither, made small and tidy. - int expon; frexpf((Float32)inputSampleL, &expon); - double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; - frexpf((Float32)inputSampleR, &expon); - dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); - inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; - //end 32 bit dither + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither *outputL = inputSampleL; *outputR = inputSampleR; diff --git a/plugins/MacSignedAU/Wider/Wider.h b/plugins/MacSignedAU/Wider/Wider.h index f4788781f..9654bd17d 100755 --- a/plugins/MacSignedAU/Wider/Wider.h +++ b/plugins/MacSignedAU/Wider/Wider.h @@ -118,8 +118,7 @@ public: private: Float64 p[4099]; - uint32_t fpdL; - uint32_t fpdR; + uint32_t fpd; int count; }; diff --git a/plugins/MacSignedAU/curve/curve.cpp b/plugins/MacSignedAU/curve/curve.cpp index c677cedee..f23a6e4d7 100755 --- a/plugins/MacSignedAU/curve/curve.cpp +++ b/plugins/MacSignedAU/curve/curve.cpp @@ -166,7 +166,7 @@ ComponentResult curve::Initialize() ComponentResult curve::Reset(AudioUnitScope inScope, AudioUnitElement inElement) { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; return noErr; } @@ -188,8 +188,8 @@ OSStatus curve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, double inputSampleL = *inputL; double inputSampleR = *inputR; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -208,11 +208,11 @@ OSStatus curve::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags, //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 *outputL = inputSampleL; diff --git a/plugins/MacSignedAU/curvemono/curvemono.cpp b/plugins/MacSignedAU/curvemono/curvemono.cpp index c11e6c6ef..3dbfb3b1e 100755 --- a/plugins/MacSignedAU/curvemono/curvemono.cpp +++ b/plugins/MacSignedAU/curvemono/curvemono.cpp @@ -151,7 +151,7 @@ ComponentResult curvemono::Initialize() void curvemono::curvemonoKernel::Reset() { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/plugins/MacSignedVST/ADT/source/ADT.cpp b/plugins/MacSignedVST/ADT/source/ADT.cpp index b05be403d..34db6d535 100755 --- a/plugins/MacSignedVST/ADT/source/ADT.cpp +++ b/plugins/MacSignedVST/ADT/source/ADT.cpp @@ -24,7 +24,7 @@ ADT::ADT(audioMasterCallback audioMaster) : offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/ADT/source/ADT.h b/plugins/MacSignedVST/ADT/source/ADT.h index 4ada4659d..113e371d9 100755 --- a/plugins/MacSignedVST/ADT/source/ADT.h +++ b/plugins/MacSignedVST/ADT/source/ADT.h @@ -64,7 +64,8 @@ private: double offsetB; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacSignedVST/ADT/source/ADTProc.cpp b/plugins/MacSignedVST/ADT/source/ADTProc.cpp index 555f0877e..1d113ad8e 100755 --- a/plugins/MacSignedVST/ADT/source/ADTProc.cpp +++ b/plugins/MacSignedVST/ADT/source/ADTProc.cpp @@ -32,8 +32,8 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + 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; diff --git a/plugins/MacSignedVST/Apicolypse/source/Apicolypse.cpp b/plugins/MacSignedVST/Apicolypse/source/Apicolypse.cpp index b5f4179a9..8c9d15ec5 100755 --- a/plugins/MacSignedVST/Apicolypse/source/Apicolypse.cpp +++ b/plugins/MacSignedVST/Apicolypse/source/Apicolypse.cpp @@ -19,7 +19,7 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp b/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp index bc9e99ab5..c0b954717 100755 --- a/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp +++ b/plugins/MacSignedVST/Apicolypse/source/ApicolypseProc.cpp @@ -39,8 +39,8 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -166,11 +166,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/AtmosphereBuss/source/AtmosphereBussProc.cpp b/plugins/MacSignedVST/AtmosphereBuss/source/AtmosphereBussProc.cpp index add056764..6a5a9a9ba 100755 --- a/plugins/MacSignedVST/AtmosphereBuss/source/AtmosphereBussProc.cpp +++ b/plugins/MacSignedVST/AtmosphereBuss/source/AtmosphereBussProc.cpp @@ -50,42 +50,8 @@ void AtmosphereBuss::processReplacing(float **inputs, float **outputs, VstInt32 inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -311,42 +277,8 @@ void AtmosphereBuss::processDoubleReplacing(double **inputs, double **outputs, V inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/MacSignedVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp b/plugins/MacSignedVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp index 763853004..92a6a7318 100755 --- a/plugins/MacSignedVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp +++ b/plugins/MacSignedVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp @@ -50,42 +50,8 @@ void AtmosphereChannel::processReplacing(float **inputs, float **outputs, VstInt inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -306,42 +272,8 @@ void AtmosphereChannel::processDoubleReplacing(double **inputs, double **outputs inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/MacSignedVST/AverMatrix/source/AverMatrix.cpp b/plugins/MacSignedVST/AverMatrix/source/AverMatrix.cpp index 585bd857a..e2e346a0f 100755 --- a/plugins/MacSignedVST/AverMatrix/source/AverMatrix.cpp +++ b/plugins/MacSignedVST/AverMatrix/source/AverMatrix.cpp @@ -22,7 +22,7 @@ AverMatrix::AverMatrix(audioMasterCallback audioMaster) : } } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp b/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp index af0105057..c04b2ced4 100755 --- a/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp +++ b/plugins/MacSignedVST/AverMatrix/source/AverMatrixProc.cpp @@ -50,8 +50,8 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -81,11 +81,11 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BassAmp/source/BassAmp.cpp b/plugins/MacSignedVST/BassAmp/source/BassAmp.cpp index 506531cf6..330f7ac10 100755 --- a/plugins/MacSignedVST/BassAmp/source/BassAmp.cpp +++ b/plugins/MacSignedVST/BassAmp/source/BassAmp.cpp @@ -135,7 +135,7 @@ BassAmp::BassAmp(audioMasterCallback audioMaster) : ataK3 = 0.114; //add raw to interpolated dry, toughens ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0 ataK5 = 0.122; //subtract this much prev. diff sample, brightens - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BassDrive/source/BassDrive.cpp b/plugins/MacSignedVST/BassDrive/source/BassDrive.cpp index 81f611e82..fd327fac1 100755 --- a/plugins/MacSignedVST/BassDrive/source/BassDrive.cpp +++ b/plugins/MacSignedVST/BassDrive/source/BassDrive.cpp @@ -56,7 +56,7 @@ BassDrive::BassDrive(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BassDrive/source/BassDriveProc.cpp b/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp index 68f67e7f7..8575a9e62 100755 --- a/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp +++ b/plugins/MacSignedVST/BassDrive/source/BassDriveProc.cpp @@ -27,8 +27,8 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sumL = 0.0; sumR = 0.0; @@ -314,11 +314,11 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp b/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp index 3044c5cec..620b4449d 100755 --- a/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp +++ b/plugins/MacSignedVST/BassKit/source/BassKitProc.cpp @@ -36,42 +36,8 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; @@ -252,42 +218,8 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; diff --git a/plugins/MacSignedVST/Baxandall/source/Baxandall.cpp b/plugins/MacSignedVST/Baxandall/source/Baxandall.cpp index d27affada..55be20100 100755 --- a/plugins/MacSignedVST/Baxandall/source/Baxandall.cpp +++ b/plugins/MacSignedVST/Baxandall/source/Baxandall.cpp @@ -26,7 +26,7 @@ Baxandall::Baxandall(audioMasterCallback audioMaster) : bassBR[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Baxandall/source/BaxandallProc.cpp b/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp index f52cba8ec..772a7cadc 100755 --- a/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp +++ b/plugins/MacSignedVST/Baxandall/source/BaxandallProc.cpp @@ -47,8 +47,8 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (output != 1.0) { inputSampleL *= output; @@ -127,11 +127,11 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Beam/source/Beam.cpp b/plugins/MacSignedVST/Beam/source/Beam.cpp index 183b5e57b..a1adf4a2f 100755 --- a/plugins/MacSignedVST/Beam/source/Beam.cpp +++ b/plugins/MacSignedVST/Beam/source/Beam.cpp @@ -19,7 +19,7 @@ Beam::Beam(audioMasterCallback audioMaster) : lastSampleL[count] = 0; lastSampleR[count] = 0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Biquad/source/Biquad.cpp b/plugins/MacSignedVST/Biquad/source/Biquad.cpp index b6196911e..fbcf8b446 100755 --- a/plugins/MacSignedVST/Biquad/source/Biquad.cpp +++ b/plugins/MacSignedVST/Biquad/source/Biquad.cpp @@ -17,7 +17,7 @@ Biquad::Biquad(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Biquad/source/BiquadProc.cpp b/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp index cff2485a6..f872c60ca 100755 --- a/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp +++ b/plugins/MacSignedVST/Biquad/source/BiquadProc.cpp @@ -90,8 +90,8 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -147,11 +147,11 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Biquad2/source/Biquad2.cpp b/plugins/MacSignedVST/Biquad2/source/Biquad2.cpp index 83e1664e0..7b9d33802 100755 --- a/plugins/MacSignedVST/Biquad2/source/Biquad2.cpp +++ b/plugins/MacSignedVST/Biquad2/source/Biquad2.cpp @@ -30,7 +30,7 @@ Biquad2::Biquad2(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; E = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Biquad2/source/Biquad2Proc.cpp b/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp index 9e9d6bce8..db8d29571 100755 --- a/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp +++ b/plugins/MacSignedVST/Biquad2/source/Biquad2Proc.cpp @@ -81,8 +81,8 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -202,11 +202,11 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BiquadDouble/source/BiquadDouble.cpp b/plugins/MacSignedVST/BiquadDouble/source/BiquadDouble.cpp index 64c7b188e..aaacd15b4 100755 --- a/plugins/MacSignedVST/BiquadDouble/source/BiquadDouble.cpp +++ b/plugins/MacSignedVST/BiquadDouble/source/BiquadDouble.cpp @@ -17,7 +17,7 @@ BiquadDouble::BiquadDouble(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp b/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp index 055743d43..a0a47f4f4 100755 --- a/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp +++ b/plugins/MacSignedVST/BiquadDouble/source/BiquadDoubleProc.cpp @@ -91,8 +91,8 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -138,11 +138,11 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalf.cpp b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalf.cpp index c3a11e1ec..ee0943339 100755 --- a/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalf.cpp +++ b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalf.cpp @@ -18,7 +18,7 @@ BiquadOneHalf::BiquadOneHalf(audioMasterCallback audioMaster) : B = 0.0; C = 0.0; D = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp index 87d9763c1..001a00ee1 100755 --- a/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp +++ b/plugins/MacSignedVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp @@ -89,8 +89,8 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -142,11 +142,11 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BiquadTriple/source/BiquadTriple.cpp b/plugins/MacSignedVST/BiquadTriple/source/BiquadTriple.cpp index ce850841d..a56973eca 100755 --- a/plugins/MacSignedVST/BiquadTriple/source/BiquadTriple.cpp +++ b/plugins/MacSignedVST/BiquadTriple/source/BiquadTriple.cpp @@ -17,7 +17,7 @@ BiquadTriple::BiquadTriple(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp b/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp index 84ee1b7f5..84b05ed53 100755 --- a/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp +++ b/plugins/MacSignedVST/BiquadTriple/source/BiquadTripleProc.cpp @@ -92,8 +92,8 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -150,11 +150,11 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BitGlitter/source/BitGlitter.cpp b/plugins/MacSignedVST/BitGlitter/source/BitGlitter.cpp index 438ce6452..88aedaddb 100755 --- a/plugins/MacSignedVST/BitGlitter/source/BitGlitter.cpp +++ b/plugins/MacSignedVST/BitGlitter/source/BitGlitter.cpp @@ -17,7 +17,7 @@ BitGlitter::BitGlitter(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; ataLastSampleL = 0.0; ataHalfwaySampleL = 0.0; diff --git a/plugins/MacSignedVST/BitGlitter/source/BitGlitter.h b/plugins/MacSignedVST/BitGlitter/source/BitGlitter.h index 999920767..2f0702e5a 100755 --- a/plugins/MacSignedVST/BitGlitter/source/BitGlitter.h +++ b/plugins/MacSignedVST/BitGlitter/source/BitGlitter.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double ataLastSampleL; double ataHalfwaySampleL; diff --git a/plugins/MacSignedVST/BitGlitter/source/BitGlitterProc.cpp b/plugins/MacSignedVST/BitGlitter/source/BitGlitterProc.cpp index 38afa37d9..066b93811 100755 --- a/plugins/MacSignedVST/BitGlitter/source/BitGlitterProc.cpp +++ b/plugins/MacSignedVST/BitGlitter/source/BitGlitterProc.cpp @@ -34,8 +34,8 @@ void BitGlitter::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/BlockParty/source/BlockParty.cpp b/plugins/MacSignedVST/BlockParty/source/BlockParty.cpp index 31cc75597..fd9e2ff39 100755 --- a/plugins/MacSignedVST/BlockParty/source/BlockParty.cpp +++ b/plugins/MacSignedVST/BlockParty/source/BlockParty.cpp @@ -14,7 +14,7 @@ BlockParty::BlockParty(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; muSpeedAL = 10000; muSpeedBL = 10000; diff --git a/plugins/MacSignedVST/BlockParty/source/BlockParty.h b/plugins/MacSignedVST/BlockParty/source/BlockParty.h index afcc9739a..006e9dfd0 100755 --- a/plugins/MacSignedVST/BlockParty/source/BlockParty.h +++ b/plugins/MacSignedVST/BlockParty/source/BlockParty.h @@ -53,7 +53,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacSignedVST/BlockParty/source/BlockPartyProc.cpp b/plugins/MacSignedVST/BlockParty/source/BlockPartyProc.cpp index 37c3a6545..42d2924fe 100755 --- a/plugins/MacSignedVST/BlockParty/source/BlockPartyProc.cpp +++ b/plugins/MacSignedVST/BlockParty/source/BlockPartyProc.cpp @@ -32,42 +32,8 @@ void BlockParty::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -593,42 +559,8 @@ void BlockParty::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/BrassRider/source/BrassRider.cpp b/plugins/MacSignedVST/BrassRider/source/BrassRider.cpp index 3c6ac09ce..ff0fdb80d 100755 --- a/plugins/MacSignedVST/BrassRider/source/BrassRider.cpp +++ b/plugins/MacSignedVST/BrassRider/source/BrassRider.cpp @@ -30,7 +30,7 @@ BrassRider::BrassRider(audioMasterCallback audioMaster) : lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BrassRider/source/BrassRiderProc.cpp b/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp index 449a965fc..b53db95e5 100755 --- a/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp +++ b/plugins/MacSignedVST/BrassRider/source/BrassRiderProc.cpp @@ -24,42 +24,8 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -132,11 +98,11 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -166,42 +132,8 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/BrightAmbience/source/BrightAmbience.cpp b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbience.cpp index 0a5e13f5b..afa450178 100755 --- a/plugins/MacSignedVST/BrightAmbience/source/BrightAmbience.cpp +++ b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbience.cpp @@ -17,7 +17,7 @@ BrightAmbience::BrightAmbience(audioMasterCallback audioMaster) : A = 0.0; B = 0.0; C = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp index dc4ecd233..69a6193b7 100755 --- a/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp +++ b/plugins/MacSignedVST/BrightAmbience/source/BrightAmbienceProc.cpp @@ -25,8 +25,8 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 12680) {gcount = 12680;} count = gcount; @@ -322,11 +322,11 @@ void BrightAmbience::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2.cpp b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2.cpp index a89300ea2..65f5728bc 100755 --- a/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2.cpp +++ b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2.cpp @@ -19,7 +19,7 @@ BrightAmbience2::BrightAmbience2(audioMasterCallback audioMaster) : B = 0.2; C = 0.0; D = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp index 95daad017..1e9b85c8b 100755 --- a/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp +++ b/plugins/MacSignedVST/BrightAmbience2/source/BrightAmbience2Proc.cpp @@ -24,8 +24,8 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -58,11 +58,11 @@ void BrightAmbience2::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Calibre/source/Calibre.cpp b/plugins/MacSignedVST/Calibre/source/Calibre.cpp index 214f85ea4..5bf269d0b 100755 --- a/plugins/MacSignedVST/Calibre/source/Calibre.cpp +++ b/plugins/MacSignedVST/Calibre/source/Calibre.cpp @@ -18,7 +18,7 @@ Calibre::Calibre(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Calibre/source/CalibreProc.cpp b/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp index 14350eff2..b51ae2d14 100755 --- a/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp +++ b/plugins/MacSignedVST/Calibre/source/CalibreProc.cpp @@ -39,8 +39,8 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Capacitor2/source/Capacitor2.cpp b/plugins/MacSignedVST/Capacitor2/source/Capacitor2.cpp index 406621915..9dec180d3 100755 --- a/plugins/MacSignedVST/Capacitor2/source/Capacitor2.cpp +++ b/plugins/MacSignedVST/Capacitor2/source/Capacitor2.cpp @@ -52,7 +52,7 @@ Capacitor2::Capacitor2(audioMasterCallback audioMaster) : lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp b/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp index 899aaaa4a..5bd961e2d 100755 --- a/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp +++ b/plugins/MacSignedVST/Capacitor2/source/Capacitor2Proc.cpp @@ -32,8 +32,8 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -153,11 +153,11 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Channel5/source/Channel5Proc.cpp b/plugins/MacSignedVST/Channel5/source/Channel5Proc.cpp index b029d9303..5d25c69e4 100755 --- a/plugins/MacSignedVST/Channel5/source/Channel5Proc.cpp +++ b/plugins/MacSignedVST/Channel5/source/Channel5Proc.cpp @@ -26,42 +26,8 @@ void Channel5::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { @@ -161,42 +127,8 @@ void Channel5::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { diff --git a/plugins/MacSignedVST/Channel6/source/Channel6.cpp b/plugins/MacSignedVST/Channel6/source/Channel6.cpp index 0ad6eddd0..80e17af19 100755 --- a/plugins/MacSignedVST/Channel6/source/Channel6.cpp +++ b/plugins/MacSignedVST/Channel6/source/Channel6.cpp @@ -15,7 +15,7 @@ Channel6::Channel6(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacSignedVST/Channel6/source/Channel6.h b/plugins/MacSignedVST/Channel6/source/Channel6.h index 3945cecbf..ddca3e3ae 100755 --- a/plugins/MacSignedVST/Channel6/source/Channel6.h +++ b/plugins/MacSignedVST/Channel6/source/Channel6.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double iirSampleLA; double iirSampleRA; diff --git a/plugins/MacSignedVST/Channel6/source/Channel6Proc.cpp b/plugins/MacSignedVST/Channel6/source/Channel6Proc.cpp index 777666f14..ad228a8e8 100755 --- a/plugins/MacSignedVST/Channel6/source/Channel6Proc.cpp +++ b/plugins/MacSignedVST/Channel6/source/Channel6Proc.cpp @@ -26,8 +26,8 @@ void Channel6::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) diff --git a/plugins/MacSignedVST/Channel7/source/Channel7.cpp b/plugins/MacSignedVST/Channel7/source/Channel7.cpp index ba73bf565..1b753f1cd 100755 --- a/plugins/MacSignedVST/Channel7/source/Channel7.cpp +++ b/plugins/MacSignedVST/Channel7/source/Channel7.cpp @@ -15,7 +15,7 @@ Channel7::Channel7(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp b/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp index e9e9a6852..bb42ba20a 100755 --- a/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp +++ b/plugins/MacSignedVST/Channel7/source/Channel7Proc.cpp @@ -28,8 +28,8 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) { @@ -96,11 +96,11 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Channel8/source/Channel8.cpp b/plugins/MacSignedVST/Channel8/source/Channel8.cpp index c13fd7c96..3678965d6 100755 --- a/plugins/MacSignedVST/Channel8/source/Channel8.cpp +++ b/plugins/MacSignedVST/Channel8/source/Channel8.cpp @@ -15,7 +15,7 @@ Channel8::Channel8(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp b/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp index afb1a48fe..f62bed44f 100755 --- a/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp +++ b/plugins/MacSignedVST/Channel8/source/Channel8Proc.cpp @@ -29,8 +29,8 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double dielectricScaleL = fabs(2.0-((inputSampleL+nonLin)/nonLin)); double dielectricScaleR = fabs(2.0-((inputSampleR+nonLin)/nonLin)); @@ -120,11 +120,11 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/ChromeOxide/source/ChromeOxide.cpp b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxide.cpp index 40cc31966..183fa9079 100755 --- a/plugins/MacSignedVST/ChromeOxide/source/ChromeOxide.cpp +++ b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxide.cpp @@ -31,7 +31,7 @@ ChromeOxide::ChromeOxide(audioMasterCallback audioMaster) : flip = false; A = 0.5; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp index be036a80e..873c535f1 100755 --- a/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp +++ b/plugins/MacSignedVST/ChromeOxide/source/ChromeOxideProc.cpp @@ -48,8 +48,8 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -152,11 +152,11 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Cider/source/Cider.cpp b/plugins/MacSignedVST/Cider/source/Cider.cpp index 953563eb8..ebdd1a4f4 100755 --- a/plugins/MacSignedVST/Cider/source/Cider.cpp +++ b/plugins/MacSignedVST/Cider/source/Cider.cpp @@ -18,7 +18,7 @@ Cider::Cider(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Cider/source/CiderProc.cpp b/plugins/MacSignedVST/Cider/source/CiderProc.cpp index 9222a2ea7..31be7279f 100755 --- a/plugins/MacSignedVST/Cider/source/CiderProc.cpp +++ b/plugins/MacSignedVST/Cider/source/CiderProc.cpp @@ -39,8 +39,8 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Coils/source/Coils.cpp b/plugins/MacSignedVST/Coils/source/Coils.cpp index b3cc04aab..e40878412 100755 --- a/plugins/MacSignedVST/Coils/source/Coils.cpp +++ b/plugins/MacSignedVST/Coils/source/Coils.cpp @@ -16,7 +16,7 @@ Coils::Coils(audioMasterCallback audioMaster) : B = 0.5; C = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Coils/source/CoilsProc.cpp b/plugins/MacSignedVST/Coils/source/CoilsProc.cpp index d963e9053..278f0690d 100755 --- a/plugins/MacSignedVST/Coils/source/CoilsProc.cpp +++ b/plugins/MacSignedVST/Coils/source/CoilsProc.cpp @@ -34,8 +34,8 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -74,11 +74,11 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Cojones/source/CojonesProc.cpp b/plugins/MacSignedVST/Cojones/source/CojonesProc.cpp index 24606e3af..3b45cea8f 100755 --- a/plugins/MacSignedVST/Cojones/source/CojonesProc.cpp +++ b/plugins/MacSignedVST/Cojones/source/CojonesProc.cpp @@ -27,42 +27,8 @@ void Cojones::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -197,42 +163,8 @@ void Cojones::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Compresaturator/source/Compresaturator.cpp b/plugins/MacSignedVST/Compresaturator/source/Compresaturator.cpp index e975f9cf9..1bb483138 100755 --- a/plugins/MacSignedVST/Compresaturator/source/Compresaturator.cpp +++ b/plugins/MacSignedVST/Compresaturator/source/Compresaturator.cpp @@ -25,7 +25,7 @@ Compresaturator::Compresaturator(audioMasterCallback audioMaster) : lastWidthR = 500; padFactorR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Compresaturator/source/Compresaturator.h b/plugins/MacSignedVST/Compresaturator/source/Compresaturator.h index 62414582e..868b50b4d 100755 --- a/plugins/MacSignedVST/Compresaturator/source/Compresaturator.h +++ b/plugins/MacSignedVST/Compresaturator/source/Compresaturator.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff int dCount; diff --git a/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp b/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp index 921f25b11..9a70ac814 100755 --- a/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp +++ b/plugins/MacSignedVST/Compresaturator/source/CompresaturatorProc.cpp @@ -28,42 +28,8 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -243,42 +209,8 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Console6Buss/source/Console6Buss.cpp b/plugins/MacSignedVST/Console6Buss/source/Console6Buss.cpp index 27681c141..c6658226e 100755 --- a/plugins/MacSignedVST/Console6Buss/source/Console6Buss.cpp +++ b/plugins/MacSignedVST/Console6Buss/source/Console6Buss.cpp @@ -13,7 +13,7 @@ Console6Buss::Console6Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Console6Buss/source/Console6BussProc.cpp b/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp index 03f8fb9a6..6e25bd3a3 100755 --- a/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp +++ b/plugins/MacSignedVST/Console6Buss/source/Console6BussProc.cpp @@ -20,8 +20,8 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Console6Channel/source/Console6Channel.cpp b/plugins/MacSignedVST/Console6Channel/source/Console6Channel.cpp index 5bd28ca6e..d8634744e 100755 --- a/plugins/MacSignedVST/Console6Channel/source/Console6Channel.cpp +++ b/plugins/MacSignedVST/Console6Channel/source/Console6Channel.cpp @@ -13,7 +13,7 @@ Console6Channel::Console6Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp b/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp index 2d835fc8c..a72e3b8f0 100755 --- a/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp +++ b/plugins/MacSignedVST/Console6Channel/source/Console6ChannelProc.cpp @@ -20,8 +20,8 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Channel::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp b/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp index f5d6746b1..d5eef67c8 100755 --- a/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp +++ b/plugins/MacSignedVST/Crystal/source/CrystalProc.cpp @@ -40,42 +40,8 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -243,42 +209,8 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; diff --git a/plugins/MacSignedVST/Dark/source/Dark.cpp b/plugins/MacSignedVST/Dark/source/Dark.cpp index f652aa452..8c038752e 100755 --- a/plugins/MacSignedVST/Dark/source/Dark.cpp +++ b/plugins/MacSignedVST/Dark/source/Dark.cpp @@ -14,7 +14,7 @@ Dark::Dark(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 99; count++) { lastSampleL[count] = 0; lastSampleR[count] = 0; diff --git a/plugins/MacSignedVST/DeBess/source/DeBess.cpp b/plugins/MacSignedVST/DeBess/source/DeBess.cpp index b31a71a46..87d7316b8 100755 --- a/plugins/MacSignedVST/DeBess/source/DeBess.cpp +++ b/plugins/MacSignedVST/DeBess/source/DeBess.cpp @@ -29,7 +29,7 @@ DeBess::DeBess(audioMasterCallback audioMaster) : iirSampleBR = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/DeBess/source/DeBessProc.cpp b/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp index 075c9de3e..f868c8284 100755 --- a/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp +++ b/plugins/MacSignedVST/DeBess/source/DeBessProc.cpp @@ -30,8 +30,8 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sL[0] = inputSampleL; //set up so both [0] and [1] will be input sample sR[0] = inputSampleR; //set up so both [0] and [1] will be input sample @@ -92,11 +92,11 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/DeHiss/source/DeHiss.cpp b/plugins/MacSignedVST/DeHiss/source/DeHiss.cpp index 1f2d5639c..17f386f5d 100755 --- a/plugins/MacSignedVST/DeHiss/source/DeHiss.cpp +++ b/plugins/MacSignedVST/DeHiss/source/DeHiss.cpp @@ -25,7 +25,7 @@ DeHiss::DeHiss(audioMasterCallback audioMaster) : gateR = 1.0; rawR = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/DeHiss/source/DeHissProc.cpp b/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp index 41074f9c5..88547ff75 100755 --- a/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp +++ b/plugins/MacSignedVST/DeHiss/source/DeHissProc.cpp @@ -37,8 +37,8 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -121,11 +121,11 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/DeRez2/source/DeRez2.cpp b/plugins/MacSignedVST/DeRez2/source/DeRez2.cpp index 876d97575..acc092ee5 100755 --- a/plugins/MacSignedVST/DeRez2/source/DeRez2.cpp +++ b/plugins/MacSignedVST/DeRez2/source/DeRez2.cpp @@ -29,7 +29,7 @@ DeRez2::DeRez2(audioMasterCallback audioMaster) : position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/DeRez2/source/DeRez2Proc.cpp b/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp index d43944d9e..4ff6cf82d 100755 --- a/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp +++ b/plugins/MacSignedVST/DeRez2/source/DeRez2Proc.cpp @@ -30,8 +30,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -168,11 +168,11 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Deckwrecka/source/Deckwrecka.cpp b/plugins/MacSignedVST/Deckwrecka/source/Deckwrecka.cpp index 9f7fe61ca..8e4fc6d08 100755 --- a/plugins/MacSignedVST/Deckwrecka/source/Deckwrecka.cpp +++ b/plugins/MacSignedVST/Deckwrecka/source/Deckwrecka.cpp @@ -13,7 +13,7 @@ Deckwrecka::Deckwrecka(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bflip = 1; iirHeadBumpAL = 0.0; diff --git a/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp b/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp index e7146df5d..1e59e635c 100755 --- a/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp +++ b/plugins/MacSignedVST/Deckwrecka/source/DeckwreckaProc.cpp @@ -35,8 +35,8 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; bflip++; if (bflip < 1 || bflip > 3) bflip = 1; @@ -175,11 +175,11 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/DigitalBlack/source/DigitalBlack.cpp b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlack.cpp index 9208be4f4..89a10236a 100755 --- a/plugins/MacSignedVST/DigitalBlack/source/DigitalBlack.cpp +++ b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlack.cpp @@ -20,7 +20,7 @@ DigitalBlack::DigitalBlack(audioMasterCallback audioMaster) : WasNegativeR = false; ZeroCrossR = 0; gaterollerR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp index 8caeff273..efd520f21 100755 --- a/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp +++ b/plugins/MacSignedVST/DigitalBlack/source/DigitalBlackProc.cpp @@ -26,8 +26,8 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -91,11 +91,11 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Distance2/source/Distance2Proc.cpp b/plugins/MacSignedVST/Distance2/source/Distance2Proc.cpp index 0a92a9268..8017d9303 100755 --- a/plugins/MacSignedVST/Distance2/source/Distance2Proc.cpp +++ b/plugins/MacSignedVST/Distance2/source/Distance2Proc.cpp @@ -46,42 +46,8 @@ void Distance2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,42 +290,8 @@ void Distance2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Distortion/source/Distortion.cpp b/plugins/MacSignedVST/Distortion/source/Distortion.cpp index 34dd08274..373ec3574 100755 --- a/plugins/MacSignedVST/Distortion/source/Distortion.cpp +++ b/plugins/MacSignedVST/Distortion/source/Distortion.cpp @@ -20,7 +20,7 @@ Distortion::Distortion(audioMasterCallback audioMaster) : previousInL[x] = 0.0; previousOutL[x] = 0.0; previousInR[x] = 0.0; previousOutR[x] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Distortion/source/DistortionProc.cpp b/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp index 8d6a4f8b0..17240d1cf 100755 --- a/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp +++ b/plugins/MacSignedVST/Distortion/source/DistortionProc.cpp @@ -25,8 +25,8 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -111,11 +111,11 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -146,8 +146,8 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/DitherFloat/source/DitherFloat.cpp b/plugins/MacSignedVST/DitherFloat/source/DitherFloat.cpp index 05213a6ce..9443a2daa 100755 --- a/plugins/MacSignedVST/DitherFloat/source/DitherFloat.cpp +++ b/plugins/MacSignedVST/DitherFloat/source/DitherFloat.cpp @@ -14,7 +14,7 @@ DitherFloat::DitherFloat(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/DubCenter/source/DubCenterProc.cpp b/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp index 49806b773..ff4d70dbf 100755 --- a/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp +++ b/plugins/MacSignedVST/DubCenter/source/DubCenterProc.cpp @@ -52,42 +52,8 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -369,42 +335,8 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Dyno/source/Dyno.cpp b/plugins/MacSignedVST/Dyno/source/Dyno.cpp index b02585f9d..0239412a3 100755 --- a/plugins/MacSignedVST/Dyno/source/Dyno.cpp +++ b/plugins/MacSignedVST/Dyno/source/Dyno.cpp @@ -13,7 +13,7 @@ Dyno::Dyno(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Dyno/source/DynoProc.cpp b/plugins/MacSignedVST/Dyno/source/DynoProc.cpp index 3e9052c73..c2db122db 100755 --- a/plugins/MacSignedVST/Dyno/source/DynoProc.cpp +++ b/plugins/MacSignedVST/Dyno/source/DynoProc.cpp @@ -20,8 +20,8 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Elation/source/Elation.cpp b/plugins/MacSignedVST/Elation/source/Elation.cpp index fc8d4367f..d4740eca0 100755 --- a/plugins/MacSignedVST/Elation/source/Elation.cpp +++ b/plugins/MacSignedVST/Elation/source/Elation.cpp @@ -23,7 +23,7 @@ Elation::Elation(audioMasterCallback audioMaster) : compCR = 1.0; compDR = 1.0; previousBR = 0.0; flip = false; lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Elation/source/ElationProc.cpp b/plugins/MacSignedVST/Elation/source/ElationProc.cpp index 359c931b3..8df4ce867 100755 --- a/plugins/MacSignedVST/Elation/source/ElationProc.cpp +++ b/plugins/MacSignedVST/Elation/source/ElationProc.cpp @@ -36,8 +36,8 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -270,11 +270,11 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Energy/source/EnergyProc.cpp b/plugins/MacSignedVST/Energy/source/EnergyProc.cpp index dbe218778..1d29f1479 100755 --- a/plugins/MacSignedVST/Energy/source/EnergyProc.cpp +++ b/plugins/MacSignedVST/Energy/source/EnergyProc.cpp @@ -30,42 +30,8 @@ void Energy::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; @@ -784,42 +750,8 @@ void Energy::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; diff --git a/plugins/MacSignedVST/Facet/source/Facet.cpp b/plugins/MacSignedVST/Facet/source/Facet.cpp index e12d20343..a6a5614fb 100755 --- a/plugins/MacSignedVST/Facet/source/Facet.cpp +++ b/plugins/MacSignedVST/Facet/source/Facet.cpp @@ -13,7 +13,7 @@ Facet::Facet(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Facet/source/FacetProc.cpp b/plugins/MacSignedVST/Facet/source/FacetProc.cpp index fb5cdbd6e..85af36f42 100755 --- a/plugins/MacSignedVST/Facet/source/FacetProc.cpp +++ b/plugins/MacSignedVST/Facet/source/FacetProc.cpp @@ -20,8 +20,8 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; @@ -47,11 +47,11 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Floor/source/FloorProc.cpp b/plugins/MacSignedVST/Floor/source/FloorProc.cpp index 0cfa58c69..758360f65 100755 --- a/plugins/MacSignedVST/Floor/source/FloorProc.cpp +++ b/plugins/MacSignedVST/Floor/source/FloorProc.cpp @@ -39,42 +39,8 @@ void Floor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -298,42 +264,8 @@ void Floor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Focus/source/Focus.cpp b/plugins/MacSignedVST/Focus/source/Focus.cpp index f77560c82..a9e66020d 100755 --- a/plugins/MacSignedVST/Focus/source/Focus.cpp +++ b/plugins/MacSignedVST/Focus/source/Focus.cpp @@ -18,7 +18,7 @@ Focus::Focus(audioMasterCallback audioMaster) : D = 1.0; E = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Focus/source/FocusProc.cpp b/plugins/MacSignedVST/Focus/source/FocusProc.cpp index 9e1c9c070..fd7624e72 100755 --- a/plugins/MacSignedVST/Focus/source/FocusProc.cpp +++ b/plugins/MacSignedVST/Focus/source/FocusProc.cpp @@ -34,8 +34,8 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -128,11 +128,11 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Gatelope/source/GatelopeProc.cpp b/plugins/MacSignedVST/Gatelope/source/GatelopeProc.cpp index b5f1d67d7..5dbcb19c3 100755 --- a/plugins/MacSignedVST/Gatelope/source/GatelopeProc.cpp +++ b/plugins/MacSignedVST/Gatelope/source/GatelopeProc.cpp @@ -39,42 +39,8 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -247,42 +213,8 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/GlitchShifter/source/GlitchShifter.cpp b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifter.cpp index f9456e1f3..2bd39758e 100755 --- a/plugins/MacSignedVST/GlitchShifter/source/GlitchShifter.cpp +++ b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifter.cpp @@ -53,7 +53,7 @@ GlitchShifter::GlitchShifter(audioMasterCallback audioMaster) : C = 0.5; D = 0.0; E = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp index 852c3bc0f..06ebe4bae 100755 --- a/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp +++ b/plugins/MacSignedVST/GlitchShifter/source/GlitchShifterProc.cpp @@ -28,8 +28,8 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -307,11 +307,11 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Gringer/source/Gringer.cpp b/plugins/MacSignedVST/Gringer/source/Gringer.cpp index 5f92a8860..f071dedb8 100755 --- a/plugins/MacSignedVST/Gringer/source/Gringer.cpp +++ b/plugins/MacSignedVST/Gringer/source/Gringer.cpp @@ -13,7 +13,7 @@ Gringer::Gringer(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 9; x++) {inbandL[x] = 0.0; outbandL[x] = 0.0; inbandR[x] = 0.0; outbandR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Gringer/source/GringerProc.cpp b/plugins/MacSignedVST/Gringer/source/GringerProc.cpp index b76693f2e..b59800001 100755 --- a/plugins/MacSignedVST/Gringer/source/GringerProc.cpp +++ b/plugins/MacSignedVST/Gringer/source/GringerProc.cpp @@ -60,8 +60,8 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); @@ -105,11 +105,11 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Highpass2/source/Highpass2.cpp b/plugins/MacSignedVST/Highpass2/source/Highpass2.cpp index bcb2ce133..c88927ae2 100755 --- a/plugins/MacSignedVST/Highpass2/source/Highpass2.cpp +++ b/plugins/MacSignedVST/Highpass2/source/Highpass2.cpp @@ -16,7 +16,7 @@ Highpass2::Highpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp b/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp index e5f6a8066..e87194339 100755 --- a/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp +++ b/plugins/MacSignedVST/Highpass2/source/Highpass2Proc.cpp @@ -41,42 +41,8 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -211,42 +177,8 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Holt/source/Holt.cpp b/plugins/MacSignedVST/Holt/source/Holt.cpp index 4262453e1..499217c23 100755 --- a/plugins/MacSignedVST/Holt/source/Holt.cpp +++ b/plugins/MacSignedVST/Holt/source/Holt.cpp @@ -36,7 +36,7 @@ Holt::Holt(audioMasterCallback audioMaster) : previousSampleDR = 0.0; previousTrendDR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Holt/source/Holt.h b/plugins/MacSignedVST/Holt/source/Holt.h index d9d61e929..8026fa40d 100755 --- a/plugins/MacSignedVST/Holt/source/Holt.h +++ b/plugins/MacSignedVST/Holt/source/Holt.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double previousSampleAL; diff --git a/plugins/MacSignedVST/Holt/source/HoltProc.cpp b/plugins/MacSignedVST/Holt/source/HoltProc.cpp index ca90811ad..c243b82ff 100755 --- a/plugins/MacSignedVST/Holt/source/HoltProc.cpp +++ b/plugins/MacSignedVST/Holt/source/HoltProc.cpp @@ -45,8 +45,8 @@ void Holt::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Infrasonic/source/Infrasonic.cpp b/plugins/MacSignedVST/Infrasonic/source/Infrasonic.cpp index cf5ba9c6c..bfd10d163 100755 --- a/plugins/MacSignedVST/Infrasonic/source/Infrasonic.cpp +++ b/plugins/MacSignedVST/Infrasonic/source/Infrasonic.cpp @@ -13,7 +13,7 @@ Infrasonic::Infrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp b/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp index 135fd5e33..653fac502 100755 --- a/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp +++ b/plugins/MacSignedVST/Infrasonic/source/InfrasonicProc.cpp @@ -65,8 +65,8 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Interstage/source/Interstage.cpp b/plugins/MacSignedVST/Interstage/source/Interstage.cpp index 9c8acdd11..92acc46cc 100755 --- a/plugins/MacSignedVST/Interstage/source/Interstage.cpp +++ b/plugins/MacSignedVST/Interstage/source/Interstage.cpp @@ -26,7 +26,7 @@ Interstage::Interstage(audioMasterCallback audioMaster) : iirSampleER = 0.0; iirSampleFR = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp b/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp index 181983f57..2707bd744 100755 --- a/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp +++ b/plugins/MacSignedVST/Interstage/source/InterstageProc.cpp @@ -26,8 +26,8 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -77,11 +77,11 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Isolator/source/Isolator.cpp b/plugins/MacSignedVST/Isolator/source/Isolator.cpp index 651a10ac6..c8222a86f 100755 --- a/plugins/MacSignedVST/Isolator/source/Isolator.cpp +++ b/plugins/MacSignedVST/Isolator/source/Isolator.cpp @@ -16,7 +16,7 @@ Isolator::Isolator(audioMasterCallback audioMaster) : A = 1.0; B = 0.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Isolator/source/IsolatorProc.cpp b/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp index ca777d947..4f7178a86 100755 --- a/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp +++ b/plugins/MacSignedVST/Isolator/source/IsolatorProc.cpp @@ -64,8 +64,8 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = *in1; double drySampleR = *in2; @@ -110,11 +110,11 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Loud/source/Loud.cpp b/plugins/MacSignedVST/Loud/source/Loud.cpp index a8338382a..1f884deb1 100755 --- a/plugins/MacSignedVST/Loud/source/Loud.cpp +++ b/plugins/MacSignedVST/Loud/source/Loud.cpp @@ -17,7 +17,7 @@ Loud::Loud(audioMasterCallback audioMaster) : C = 1.0; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Loud/source/Loud.h b/plugins/MacSignedVST/Loud/source/Loud.h index 610c99cde..14e613399 100755 --- a/plugins/MacSignedVST/Loud/source/Loud.h +++ b/plugins/MacSignedVST/Loud/source/Loud.h @@ -56,7 +56,8 @@ private: double lastSampleL; double lastSampleR; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacSignedVST/Loud/source/LoudProc.cpp b/plugins/MacSignedVST/Loud/source/LoudProc.cpp index 906f51dbd..260ba230d 100755 --- a/plugins/MacSignedVST/Loud/source/LoudProc.cpp +++ b/plugins/MacSignedVST/Loud/source/LoudProc.cpp @@ -31,8 +31,8 @@ void Loud::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { inputSampleL = *in1; inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; drySampleL = inputSampleL; drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Lowpass2/source/Lowpass2.cpp b/plugins/MacSignedVST/Lowpass2/source/Lowpass2.cpp index 6c463993f..1de69450a 100755 --- a/plugins/MacSignedVST/Lowpass2/source/Lowpass2.cpp +++ b/plugins/MacSignedVST/Lowpass2/source/Lowpass2.cpp @@ -16,7 +16,7 @@ Lowpass2::Lowpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp b/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp index 1dd3af06f..1bed77696 100755 --- a/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp +++ b/plugins/MacSignedVST/Lowpass2/source/Lowpass2Proc.cpp @@ -41,42 +41,8 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -212,42 +178,8 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Luxor/source/Luxor.cpp b/plugins/MacSignedVST/Luxor/source/Luxor.cpp index d00c67d05..001286dd8 100755 --- a/plugins/MacSignedVST/Luxor/source/Luxor.cpp +++ b/plugins/MacSignedVST/Luxor/source/Luxor.cpp @@ -18,7 +18,7 @@ Luxor::Luxor(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Luxor/source/LuxorProc.cpp b/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp index c8d0add39..89c8487ba 100755 --- a/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp +++ b/plugins/MacSignedVST/Luxor/source/LuxorProc.cpp @@ -39,8 +39,8 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/MV/source/MV.cpp b/plugins/MacSignedVST/MV/source/MV.cpp index 3db80c46b..90246abae 100755 --- a/plugins/MacSignedVST/MV/source/MV.cpp +++ b/plugins/MacSignedVST/MV/source/MV.cpp @@ -76,7 +76,7 @@ MV::MV(audioMasterCallback audioMaster) : feedbackL = 0.0; feedbackR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/MV/source/MV.h b/plugins/MacSignedVST/MV/source/MV.h index 1586d41cc..5a60fa653 100755 --- a/plugins/MacSignedVST/MV/source/MV.h +++ b/plugins/MacSignedVST/MV/source/MV.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacSignedVST/MV/source/MVProc.cpp b/plugins/MacSignedVST/MV/source/MVProc.cpp index 11da2fce9..5a0b96333 100755 --- a/plugins/MacSignedVST/MV/source/MVProc.cpp +++ b/plugins/MacSignedVST/MV/source/MVProc.cpp @@ -34,42 +34,8 @@ void MV::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -830,42 +796,8 @@ void MV::processDoubleReplacing(double **inputs, double **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/MoNoam/source/MoNoam.cpp b/plugins/MacSignedVST/MoNoam/source/MoNoam.cpp index 3612604d1..746f43edb 100755 --- a/plugins/MacSignedVST/MoNoam/source/MoNoam.cpp +++ b/plugins/MacSignedVST/MoNoam/source/MoNoam.cpp @@ -13,7 +13,7 @@ MoNoam::MoNoam(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/MoNoam/source/MoNoamProc.cpp b/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp index 64cc63a99..c7835d557 100755 --- a/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp +++ b/plugins/MacSignedVST/MoNoam/source/MoNoamProc.cpp @@ -20,8 +20,8 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; double side; side = inputSampleL - inputSampleR; @@ -41,11 +41,11 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Mojo/source/Mojo.cpp b/plugins/MacSignedVST/Mojo/source/Mojo.cpp index 7b34fbafd..78bb5c9c3 100755 --- a/plugins/MacSignedVST/Mojo/source/Mojo.cpp +++ b/plugins/MacSignedVST/Mojo/source/Mojo.cpp @@ -13,7 +13,7 @@ Mojo::Mojo(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Mojo/source/MojoProc.cpp b/plugins/MacSignedVST/Mojo/source/MojoProc.cpp index 6687feea8..2597aae9e 100755 --- a/plugins/MacSignedVST/Mojo/source/MojoProc.cpp +++ b/plugins/MacSignedVST/Mojo/source/MojoProc.cpp @@ -20,8 +20,8 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Monitoring/source/Monitoring.cpp b/plugins/MacSignedVST/Monitoring/source/Monitoring.cpp index 556e27cb2..635ca615b 100755 --- a/plugins/MacSignedVST/Monitoring/source/Monitoring.cpp +++ b/plugins/MacSignedVST/Monitoring/source/Monitoring.cpp @@ -60,7 +60,7 @@ Monitoring::Monitoring(audioMasterCallback audioMaster) : for (int x = 0; x < 11; x++) {biquadL[x] = 0.0; biquadR[x] = 0.0;} //Bandpasses A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Monitoring/source/MonitoringProc.cpp b/plugins/MacSignedVST/Monitoring/source/MonitoringProc.cpp index 397d31b12..385884d3c 100755 --- a/plugins/MacSignedVST/Monitoring/source/MonitoringProc.cpp +++ b/plugins/MacSignedVST/Monitoring/source/MonitoringProc.cpp @@ -50,8 +50,8 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/MacSignedVST/Neverland/source/Neverland.cpp b/plugins/MacSignedVST/Neverland/source/Neverland.cpp index e0c4d5f9e..fae1d9216 100755 --- a/plugins/MacSignedVST/Neverland/source/Neverland.cpp +++ b/plugins/MacSignedVST/Neverland/source/Neverland.cpp @@ -19,7 +19,7 @@ Neverland::Neverland(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Neverland/source/NeverlandProc.cpp b/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp index 58493f8a3..02dcb04b7 100755 --- a/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp +++ b/plugins/MacSignedVST/Neverland/source/NeverlandProc.cpp @@ -39,8 +39,8 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -167,11 +167,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Nikola/source/Nikola.cpp b/plugins/MacSignedVST/Nikola/source/Nikola.cpp index 001eb37ef..6938af08c 100755 --- a/plugins/MacSignedVST/Nikola/source/Nikola.cpp +++ b/plugins/MacSignedVST/Nikola/source/Nikola.cpp @@ -23,7 +23,7 @@ Nikola::Nikola(audioMasterCallback audioMaster) : outlevelR = 0.0; framenumberR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Nikola/source/NikolaProc.cpp b/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp index 59738686d..3c049ce59 100755 --- a/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp +++ b/plugins/MacSignedVST/Nikola/source/NikolaProc.cpp @@ -22,8 +22,8 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -1010,11 +1010,11 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp b/plugins/MacSignedVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp index 7727b5010..e90337260 100755 --- a/plugins/MacSignedVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp +++ b/plugins/MacSignedVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp @@ -14,7 +14,7 @@ NotJustAnotherDither::NotJustAnotherDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bynL[0] = 1000; bynL[1] = 301; bynL[2] = 176; diff --git a/plugins/MacSignedVST/Pafnuty/source/PafnutyProc.cpp b/plugins/MacSignedVST/Pafnuty/source/PafnutyProc.cpp index 79d2326a1..38e2b05a3 100755 --- a/plugins/MacSignedVST/Pafnuty/source/PafnutyProc.cpp +++ b/plugins/MacSignedVST/Pafnuty/source/PafnutyProc.cpp @@ -61,42 +61,8 @@ void Pafnuty::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; @@ -331,42 +297,8 @@ void Pafnuty::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; diff --git a/plugins/MacSignedVST/PaulDither/source/PaulDither.cpp b/plugins/MacSignedVST/PaulDither/source/PaulDither.cpp index faa056409..f9a8de8b7 100755 --- a/plugins/MacSignedVST/PaulDither/source/PaulDither.cpp +++ b/plugins/MacSignedVST/PaulDither/source/PaulDither.cpp @@ -14,7 +14,7 @@ PaulDither::PaulDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDitherL = 0.0; previousDitherR = 0.0; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/MacSignedVST/PeaksOnly/source/PeaksOnly.cpp b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnly.cpp index db59ae94f..73fd7bacc 100755 --- a/plugins/MacSignedVST/PeaksOnly/source/PeaksOnly.cpp +++ b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnly.cpp @@ -14,7 +14,7 @@ PeaksOnly::PeaksOnly(audioMasterCallback audioMaster) : { for(int count = 0; count < 1502; count++) {aL[count] = 0.0; bL[count] = 0.0; cL[count] = 0.0; dL[count] = 0.0;aR[count] = 0.0; bR[count] = 0.0; cR[count] = 0.0; dR[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp index 39a49e8c1..d7d4af84c 100755 --- a/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp +++ b/plugins/MacSignedVST/PeaksOnly/source/PeaksOnlyProc.cpp @@ -28,8 +28,8 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; @@ -129,11 +129,11 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/PocketVerbs/source/PocketVerbs.cpp b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbs.cpp index 4426e4b76..f4102466c 100755 --- a/plugins/MacSignedVST/PocketVerbs/source/PocketVerbs.cpp +++ b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbs.cpp @@ -191,7 +191,7 @@ PocketVerbs::PocketVerbs(audioMasterCallback audioMaster) : countdown = -1; peakL = 1.0; peakR = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp index c6ab00834..5d8a7d157 100755 --- a/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp +++ b/plugins/MacSignedVST/PocketVerbs/source/PocketVerbsProc.cpp @@ -472,8 +472,8 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -9168,11 +9168,11 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Podcast/source/Podcast.cpp b/plugins/MacSignedVST/Podcast/source/Podcast.cpp index a29cc27da..decf86e4d 100755 --- a/plugins/MacSignedVST/Podcast/source/Podcast.cpp +++ b/plugins/MacSignedVST/Podcast/source/Podcast.cpp @@ -18,7 +18,7 @@ Podcast::Podcast(audioMasterCallback audioMaster) : c1L = 2.0; c2L = 2.0; c3L = 2.0; c4L = 2.0; c5L = 2.0; //startup comp gains c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Podcast/source/PodcastProc.cpp b/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp index 4a4c4fdd6..a6bd88d45 100755 --- a/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp +++ b/plugins/MacSignedVST/Podcast/source/PodcastProc.cpp @@ -32,8 +32,8 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -149,11 +149,11 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxe.cpp b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxe.cpp index 2b48a0d56..6765486f7 100755 --- a/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxe.cpp +++ b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxe.cpp @@ -32,7 +32,7 @@ PodcastDeluxe::PodcastDeluxe(audioMasterCallback audioMaster) : maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp index eafe49669..2f306c079 100755 --- a/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp +++ b/plugins/MacSignedVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp @@ -47,8 +47,8 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; allpasstemp = tap1 - 1; @@ -316,11 +316,11 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Pop/source/Pop.cpp b/plugins/MacSignedVST/Pop/source/Pop.cpp index 9ebd38106..a48aea872 100755 --- a/plugins/MacSignedVST/Pop/source/Pop.cpp +++ b/plugins/MacSignedVST/Pop/source/Pop.cpp @@ -15,7 +15,7 @@ Pop::Pop(audioMasterCallback audioMaster) : A = 0.3; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 10000; count++) {dL[count] = 0; dR[count] = 0;} delay = 0; diff --git a/plugins/MacSignedVST/Pop/source/Pop.h b/plugins/MacSignedVST/Pop/source/Pop.h index 9784b4ee5..9411334aa 100755 --- a/plugins/MacSignedVST/Pop/source/Pop.h +++ b/plugins/MacSignedVST/Pop/source/Pop.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double muVaryL; diff --git a/plugins/MacSignedVST/Pop/source/PopProc.cpp b/plugins/MacSignedVST/Pop/source/PopProc.cpp index 44e7efd3a..85422c511 100755 --- a/plugins/MacSignedVST/Pop/source/PopProc.cpp +++ b/plugins/MacSignedVST/Pop/source/PopProc.cpp @@ -37,8 +37,8 @@ void Pop::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/PowerSag2/source/PowerSag2.cpp b/plugins/MacSignedVST/PowerSag2/source/PowerSag2.cpp index bcf7fdad6..2e68a9376 100755 --- a/plugins/MacSignedVST/PowerSag2/source/PowerSag2.cpp +++ b/plugins/MacSignedVST/PowerSag2/source/PowerSag2.cpp @@ -20,7 +20,7 @@ PowerSag2::PowerSag2(audioMasterCallback audioMaster) : A = 0.3; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp b/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp index 69e12f697..4b637c3ff 100755 --- a/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp +++ b/plugins/MacSignedVST/PowerSag2/source/PowerSag2Proc.cpp @@ -22,8 +22,8 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Precious/source/Precious.cpp b/plugins/MacSignedVST/Precious/source/Precious.cpp index ee2061a86..78a045cf8 100755 --- a/plugins/MacSignedVST/Precious/source/Precious.cpp +++ b/plugins/MacSignedVST/Precious/source/Precious.cpp @@ -18,7 +18,7 @@ Precious::Precious(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Precious/source/PreciousProc.cpp b/plugins/MacSignedVST/Precious/source/PreciousProc.cpp index d15680a95..a2de05c32 100755 --- a/plugins/MacSignedVST/Precious/source/PreciousProc.cpp +++ b/plugins/MacSignedVST/Precious/source/PreciousProc.cpp @@ -39,8 +39,8 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/PurestAir/source/PurestAir.cpp b/plugins/MacSignedVST/PurestAir/source/PurestAir.cpp index 3314d21b2..66e9e4d72 100755 --- a/plugins/MacSignedVST/PurestAir/source/PurestAir.cpp +++ b/plugins/MacSignedVST/PurestAir/source/PurestAir.cpp @@ -25,7 +25,7 @@ PurestAir::PurestAir(audioMasterCallback audioMaster) : lastSampleR = 0.0; s1R = s2R = s3R = 0.0; applyR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PurestAir/source/PurestAirProc.cpp b/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp index 362e27217..d2df18951 100755 --- a/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp +++ b/plugins/MacSignedVST/PurestAir/source/PurestAirProc.cpp @@ -25,8 +25,8 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -95,11 +95,11 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/PurestFade/source/PurestFade.cpp b/plugins/MacSignedVST/PurestFade/source/PurestFade.cpp index 5c0fd45b4..b86eea6b7 100755 --- a/plugins/MacSignedVST/PurestFade/source/PurestFade.cpp +++ b/plugins/MacSignedVST/PurestFade/source/PurestFade.cpp @@ -18,7 +18,7 @@ PurestFade::PurestFade(audioMasterCallback audioMaster) : settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PurestFade/source/PurestFadeProc.cpp b/plugins/MacSignedVST/PurestFade/source/PurestFadeProc.cpp index 31f0a9d17..98f7d8d70 100755 --- a/plugins/MacSignedVST/PurestFade/source/PurestFadeProc.cpp +++ b/plugins/MacSignedVST/PurestFade/source/PurestFadeProc.cpp @@ -49,8 +49,8 @@ void PurestFade::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; targetgain = pow(10.0,settingchase/20.0); //now we have the target in our temp variable diff --git a/plugins/MacSignedVST/PurestSquish/source/PurestSquish.cpp b/plugins/MacSignedVST/PurestSquish/source/PurestSquish.cpp index 16543c40a..1ea9b70fe 100755 --- a/plugins/MacSignedVST/PurestSquish/source/PurestSquish.cpp +++ b/plugins/MacSignedVST/PurestSquish/source/PurestSquish.cpp @@ -64,7 +64,7 @@ PurestSquish::PurestSquish(audioMasterCallback audioMaster) : count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/PurestSquish/source/PurestSquish.h b/plugins/MacSignedVST/PurestSquish/source/PurestSquish.h index d5b93a9cb..a1c96fccb 100755 --- a/plugins/MacSignedVST/PurestSquish/source/PurestSquish.h +++ b/plugins/MacSignedVST/PurestSquish/source/PurestSquish.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacSignedVST/PurestSquish/source/PurestSquishProc.cpp b/plugins/MacSignedVST/PurestSquish/source/PurestSquishProc.cpp index 946d23963..e763aa5ce 100755 --- a/plugins/MacSignedVST/PurestSquish/source/PurestSquishProc.cpp +++ b/plugins/MacSignedVST/PurestSquish/source/PurestSquishProc.cpp @@ -32,42 +32,8 @@ void PurestSquish::processReplacing(float **inputs, float **outputs, VstInt32 sa double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -536,42 +502,8 @@ void PurestSquish::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/RawGlitters/source/RawGlitters.cpp b/plugins/MacSignedVST/RawGlitters/source/RawGlitters.cpp index 30804e218..cdd0c545f 100755 --- a/plugins/MacSignedVST/RawGlitters/source/RawGlitters.cpp +++ b/plugins/MacSignedVST/RawGlitters/source/RawGlitters.cpp @@ -14,7 +14,7 @@ RawGlitters::RawGlitters(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/MacSignedVST/RawTimbers/source/RawTimbers.cpp b/plugins/MacSignedVST/RawTimbers/source/RawTimbers.cpp index 65ad02672..da85dbaf2 100755 --- a/plugins/MacSignedVST/RawTimbers/source/RawTimbers.cpp +++ b/plugins/MacSignedVST/RawTimbers/source/RawTimbers.cpp @@ -14,7 +14,7 @@ RawTimbers::RawTimbers(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/MacSignedVST/Recurve/source/Recurve.cpp b/plugins/MacSignedVST/Recurve/source/Recurve.cpp index 611289eee..a669540a9 100755 --- a/plugins/MacSignedVST/Recurve/source/Recurve.cpp +++ b/plugins/MacSignedVST/Recurve/source/Recurve.cpp @@ -13,7 +13,7 @@ Recurve::Recurve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Recurve/source/RecurveProc.cpp b/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp index fc20e5b25..1b56af4a1 100755 --- a/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp +++ b/plugins/MacSignedVST/Recurve/source/RecurveProc.cpp @@ -19,8 +19,8 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -45,11 +45,11 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Remap/source/Remap.cpp b/plugins/MacSignedVST/Remap/source/Remap.cpp index aef092060..b4663c529 100755 --- a/plugins/MacSignedVST/Remap/source/Remap.cpp +++ b/plugins/MacSignedVST/Remap/source/Remap.cpp @@ -15,7 +15,7 @@ Remap::Remap(audioMasterCallback audioMaster) : A = 0.5; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Remap/source/RemapProc.cpp b/plugins/MacSignedVST/Remap/source/RemapProc.cpp index b9227743f..32bb5b9e6 100755 --- a/plugins/MacSignedVST/Remap/source/RemapProc.cpp +++ b/plugins/MacSignedVST/Remap/source/RemapProc.cpp @@ -23,8 +23,8 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -64,11 +64,11 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/ResEQ/source/ResEQ.cpp b/plugins/MacSignedVST/ResEQ/source/ResEQ.cpp index 37a7b4244..feffbda53 100755 --- a/plugins/MacSignedVST/ResEQ/source/ResEQ.cpp +++ b/plugins/MacSignedVST/ResEQ/source/ResEQ.cpp @@ -26,7 +26,7 @@ ResEQ::ResEQ(audioMasterCallback audioMaster) : bR[count] = 0.0; fR[count] = 0.0; } framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/ResEQ/source/ResEQProc.cpp b/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp index c9c21c0dd..22c389843 100755 --- a/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp +++ b/plugins/MacSignedVST/ResEQ/source/ResEQProc.cpp @@ -130,8 +130,8 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -284,11 +284,11 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Slew3/source/Slew3.cpp b/plugins/MacSignedVST/Slew3/source/Slew3.cpp index 03a8dc410..5bf29f586 100755 --- a/plugins/MacSignedVST/Slew3/source/Slew3.cpp +++ b/plugins/MacSignedVST/Slew3/source/Slew3.cpp @@ -15,7 +15,7 @@ Slew3::Slew3(audioMasterCallback audioMaster) : A = 0.0; lastSampleAL = lastSampleBL = lastSampleCL = 0.0; lastSampleAR = lastSampleBR = lastSampleCR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Slew3/source/Slew3Proc.cpp b/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp index 18177c5ea..297a4f6e3 100755 --- a/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp +++ b/plugins/MacSignedVST/Slew3/source/Slew3Proc.cpp @@ -24,8 +24,8 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //begin L double clamp = (lastSampleBL - lastSampleCL) * 0.381966011250105; @@ -63,11 +63,11 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/Smooth/source/Smooth.cpp b/plugins/MacSignedVST/Smooth/source/Smooth.cpp index a8b656ff3..6509d2aeb 100755 --- a/plugins/MacSignedVST/Smooth/source/Smooth.cpp +++ b/plugins/MacSignedVST/Smooth/source/Smooth.cpp @@ -38,7 +38,7 @@ Smooth::Smooth(audioMasterCallback audioMaster) : lastSampleER = 0.0; gainER = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Smooth/source/SmoothProc.cpp b/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp index 81df54143..9d532987c 100755 --- a/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp +++ b/plugins/MacSignedVST/Smooth/source/SmoothProc.cpp @@ -31,42 +31,8 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -176,11 +142,11 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -217,42 +183,8 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/SoftGate/source/SoftGate.cpp b/plugins/MacSignedVST/SoftGate/source/SoftGate.cpp index aae0129b0..4db4f8f2f 100755 --- a/plugins/MacSignedVST/SoftGate/source/SoftGate.cpp +++ b/plugins/MacSignedVST/SoftGate/source/SoftGate.cpp @@ -20,7 +20,7 @@ SoftGate::SoftGate(audioMasterCallback audioMaster) : storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/SoftGate/source/SoftGateProc.cpp b/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp index ba8d6358c..f08b9563c 100755 --- a/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp +++ b/plugins/MacSignedVST/SoftGate/source/SoftGateProc.cpp @@ -28,8 +28,8 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; @@ -59,11 +59,11 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/SpatializeDither/source/SpatializeDither.cpp b/plugins/MacSignedVST/SpatializeDither/source/SpatializeDither.cpp index 68cac32e0..e4ebc5549 100755 --- a/plugins/MacSignedVST/SpatializeDither/source/SpatializeDither.cpp +++ b/plugins/MacSignedVST/SpatializeDither/source/SpatializeDither.cpp @@ -14,7 +14,7 @@ SpatializeDither::SpatializeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; contingentErrL = 0.0; contingentErrR = 0.0; flip = false; diff --git a/plugins/MacSignedVST/Spiral/source/Spiral.cpp b/plugins/MacSignedVST/Spiral/source/Spiral.cpp index 9a1c0bec3..88106caf6 100755 --- a/plugins/MacSignedVST/Spiral/source/Spiral.cpp +++ b/plugins/MacSignedVST/Spiral/source/Spiral.cpp @@ -12,7 +12,7 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new S Spiral::Spiral(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Spiral/source/Spiral.h b/plugins/MacSignedVST/Spiral/source/Spiral.h index f20476204..439f7cecc 100755 --- a/plugins/MacSignedVST/Spiral/source/Spiral.h +++ b/plugins/MacSignedVST/Spiral/source/Spiral.h @@ -51,7 +51,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff }; diff --git a/plugins/MacSignedVST/Spiral/source/SpiralProc.cpp b/plugins/MacSignedVST/Spiral/source/SpiralProc.cpp index f672d63d1..5e75e82c4 100755 --- a/plugins/MacSignedVST/Spiral/source/SpiralProc.cpp +++ b/plugins/MacSignedVST/Spiral/source/SpiralProc.cpp @@ -19,8 +19,8 @@ void Spiral::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //clip to 1.2533141373155 to reach maximum output diff --git a/plugins/MacSignedVST/Spiral2/source/Spiral2.cpp b/plugins/MacSignedVST/Spiral2/source/Spiral2.cpp index 44703eeb4..4d1f8bb1e 100755 --- a/plugins/MacSignedVST/Spiral2/source/Spiral2.cpp +++ b/plugins/MacSignedVST/Spiral2/source/Spiral2.cpp @@ -20,7 +20,7 @@ Spiral2::Spiral2(audioMasterCallback audioMaster) : iirSampleAL = 0.0; iirSampleBL = 0.0; prevSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAR = 0.0; iirSampleBR = 0.0; diff --git a/plugins/MacSignedVST/Spiral2/source/Spiral2.h b/plugins/MacSignedVST/Spiral2/source/Spiral2.h index 7da43323c..3f64ec340 100755 --- a/plugins/MacSignedVST/Spiral2/source/Spiral2.h +++ b/plugins/MacSignedVST/Spiral2/source/Spiral2.h @@ -59,7 +59,8 @@ private: double iirSampleAL; double iirSampleBL; double prevSampleL; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double iirSampleAR; double iirSampleBR; diff --git a/plugins/MacSignedVST/Spiral2/source/Spiral2Proc.cpp b/plugins/MacSignedVST/Spiral2/source/Spiral2Proc.cpp index 36f15560c..d29127db5 100755 --- a/plugins/MacSignedVST/Spiral2/source/Spiral2Proc.cpp +++ b/plugins/MacSignedVST/Spiral2/source/Spiral2Proc.cpp @@ -29,8 +29,8 @@ void Spiral2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/TPDFDither/source/TPDFDither.cpp b/plugins/MacSignedVST/TPDFDither/source/TPDFDither.cpp index 6ba4c807d..2e8df5daa 100755 --- a/plugins/MacSignedVST/TPDFDither/source/TPDFDither.cpp +++ b/plugins/MacSignedVST/TPDFDither/source/TPDFDither.cpp @@ -14,7 +14,7 @@ TPDFDither::TPDFDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. diff --git a/plugins/MacSignedVST/Tape/source/Tape.cpp b/plugins/MacSignedVST/Tape/source/Tape.cpp index a34d8b788..8631f6bf1 100755 --- a/plugins/MacSignedVST/Tape/source/Tape.cpp +++ b/plugins/MacSignedVST/Tape/source/Tape.cpp @@ -29,7 +29,7 @@ Tape::Tape(audioMasterCallback audioMaster) : flip = false; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Tape/source/TapeProc.cpp b/plugins/MacSignedVST/Tape/source/TapeProc.cpp index 4d498b2cd..2f26675ed 100755 --- a/plugins/MacSignedVST/Tape/source/TapeProc.cpp +++ b/plugins/MacSignedVST/Tape/source/TapeProc.cpp @@ -47,8 +47,8 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -269,11 +269,11 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/TapeDelay/source/TapeDelayProc.cpp b/plugins/MacSignedVST/TapeDelay/source/TapeDelayProc.cpp index ef32867b9..6f42b02ff 100755 --- a/plugins/MacSignedVST/TapeDelay/source/TapeDelayProc.cpp +++ b/plugins/MacSignedVST/TapeDelay/source/TapeDelayProc.cpp @@ -38,42 +38,8 @@ void TapeDelay::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -205,42 +171,8 @@ void TapeDelay::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/MacSignedVST/TapeDither/source/TapeDither.cpp b/plugins/MacSignedVST/TapeDither/source/TapeDither.cpp index f9ba70917..be85fcdb2 100755 --- a/plugins/MacSignedVST/TapeDither/source/TapeDither.cpp +++ b/plugins/MacSignedVST/TapeDither/source/TapeDither.cpp @@ -14,7 +14,7 @@ TapeDither::TapeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDither1L = 0.0; previousDither2L = 0.0; previousDither3L = 0.0; diff --git a/plugins/MacSignedVST/TapeFat/source/TapeFatProc.cpp b/plugins/MacSignedVST/TapeFat/source/TapeFatProc.cpp index 7d0e52a57..1411a1454 100755 --- a/plugins/MacSignedVST/TapeFat/source/TapeFatProc.cpp +++ b/plugins/MacSignedVST/TapeFat/source/TapeFatProc.cpp @@ -28,42 +28,8 @@ void TapeFat::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -159,42 +125,8 @@ void TapeFat::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/MacSignedVST/ToTape6/source/ToTape6.cpp b/plugins/MacSignedVST/ToTape6/source/ToTape6.cpp index d9dd27d8d..741b7565e 100755 --- a/plugins/MacSignedVST/ToTape6/source/ToTape6.cpp +++ b/plugins/MacSignedVST/ToTape6/source/ToTape6.cpp @@ -43,7 +43,7 @@ ToTape6::ToTape6(audioMasterCallback audioMaster) : lastSampleR = 0.0; flip = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/ToTape6/source/ToTape6Proc.cpp b/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp index 49e72323b..f3a052485 100755 --- a/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp +++ b/plugins/MacSignedVST/ToTape6/source/ToTape6Proc.cpp @@ -56,8 +56,8 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,11 +324,11 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/TremoSquare/source/TremoSquare.cpp b/plugins/MacSignedVST/TremoSquare/source/TremoSquare.cpp index 29422d4f1..e854b11ac 100755 --- a/plugins/MacSignedVST/TremoSquare/source/TremoSquare.cpp +++ b/plugins/MacSignedVST/TremoSquare/source/TremoSquare.cpp @@ -19,7 +19,7 @@ TremoSquare::TremoSquare(audioMasterCallback audioMaster) : muteL = false; polarityR = false; muteR = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp b/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp index 1c627a8e6..ec7d1b27b 100755 --- a/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp +++ b/plugins/MacSignedVST/TremoSquare/source/TremoSquareProc.cpp @@ -25,8 +25,8 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/TripleSpread/source/TripleSpread.cpp b/plugins/MacSignedVST/TripleSpread/source/TripleSpread.cpp index 736b3f379..7e4926290 100755 --- a/plugins/MacSignedVST/TripleSpread/source/TripleSpread.cpp +++ b/plugins/MacSignedVST/TripleSpread/source/TripleSpread.cpp @@ -51,7 +51,7 @@ TripleSpread::TripleSpread(audioMasterCallback audioMaster) : A = 0.5; B = 0.5; C = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp b/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp index 6bd70e790..ef7721197 100755 --- a/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp +++ b/plugins/MacSignedVST/TripleSpread/source/TripleSpreadProc.cpp @@ -23,8 +23,8 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -309,11 +309,11 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -342,8 +342,8 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Ultrasonic/source/Ultrasonic.cpp b/plugins/MacSignedVST/Ultrasonic/source/Ultrasonic.cpp index 6c0b6fc6f..e58027991 100755 --- a/plugins/MacSignedVST/Ultrasonic/source/Ultrasonic.cpp +++ b/plugins/MacSignedVST/Ultrasonic/source/Ultrasonic.cpp @@ -13,7 +13,7 @@ Ultrasonic::Ultrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp b/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp index 0bb52e5e0..96ee029c7 100755 --- a/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp +++ b/plugins/MacSignedVST/Ultrasonic/source/UltrasonicProc.cpp @@ -65,8 +65,8 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp b/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp index 8bf48c273..cbce9a998 100755 --- a/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp +++ b/plugins/MacSignedVST/UltrasonicLite/source/UltrasonicLiteProc.cpp @@ -30,8 +30,8 @@ void UltrasonicLite::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -41,11 +41,11 @@ void UltrasonicLite::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp b/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp index 152e5b0ce..8e3cb8250 100755 --- a/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp +++ b/plugins/MacSignedVST/UltrasonicMed/source/UltrasonicMedProc.cpp @@ -43,8 +43,8 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -60,11 +60,11 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/UnBox/source/UnBox.cpp b/plugins/MacSignedVST/UnBox/source/UnBox.cpp index 7916ea55e..221f617d6 100755 --- a/plugins/MacSignedVST/UnBox/source/UnBox.cpp +++ b/plugins/MacSignedVST/UnBox/source/UnBox.cpp @@ -23,7 +23,7 @@ UnBox::UnBox(audioMasterCallback audioMaster) : iirSampleAR = 0.0; iirSampleBR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/UnBox/source/UnBox.h b/plugins/MacSignedVST/UnBox/source/UnBox.h index 0de78a63d..838b6062e 100755 --- a/plugins/MacSignedVST/UnBox/source/UnBox.h +++ b/plugins/MacSignedVST/UnBox/source/UnBox.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double aL[5]; double bL[5]; diff --git a/plugins/MacSignedVST/UnBox/source/UnBoxProc.cpp b/plugins/MacSignedVST/UnBox/source/UnBoxProc.cpp index e45e21e08..7ebfc88fe 100755 --- a/plugins/MacSignedVST/UnBox/source/UnBoxProc.cpp +++ b/plugins/MacSignedVST/UnBox/source/UnBoxProc.cpp @@ -73,8 +73,8 @@ void UnBox::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (input != 1.0) {inputSampleL *= input; inputSampleR *= input;} - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacSignedVST/Vibrato/source/Vibrato.cpp b/plugins/MacSignedVST/Vibrato/source/Vibrato.cpp index 6ea3c86d2..6b32cea10 100755 --- a/plugins/MacSignedVST/Vibrato/source/Vibrato.cpp +++ b/plugins/MacSignedVST/Vibrato/source/Vibrato.cpp @@ -34,7 +34,7 @@ Vibrato::Vibrato(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/Vibrato/source/VibratoProc.cpp b/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp index 150da0987..f196e90e2 100755 --- a/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp +++ b/plugins/MacSignedVST/Vibrato/source/VibratoProc.cpp @@ -24,8 +24,8 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -88,11 +88,11 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/VinylDither/source/VinylDither.cpp b/plugins/MacSignedVST/VinylDither/source/VinylDither.cpp index 2d719fd56..9123d5431 100755 --- a/plugins/MacSignedVST/VinylDither/source/VinylDither.cpp +++ b/plugins/MacSignedVST/VinylDither/source/VinylDither.cpp @@ -14,7 +14,7 @@ VinylDither::VinylDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; NSOddL = 0.0; prevL = 0.0; nsL[0] = 0; diff --git a/plugins/MacSignedVST/VoiceTrick/source/VoiceTrick.cpp b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrick.cpp index ee066c80d..1553a504a 100755 --- a/plugins/MacSignedVST/VoiceTrick/source/VoiceTrick.cpp +++ b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrick.cpp @@ -23,7 +23,7 @@ VoiceTrick::VoiceTrick(audioMasterCallback audioMaster) : lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp index 0de1f49ae..53ecb0fff 100755 --- a/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp +++ b/plugins/MacSignedVST/VoiceTrick/source/VoiceTrickProc.cpp @@ -25,8 +25,8 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -93,11 +93,11 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/curve/source/curve.cpp b/plugins/MacSignedVST/curve/source/curve.cpp index c814f421d..8c4e78f40 100755 --- a/plugins/MacSignedVST/curve/source/curve.cpp +++ b/plugins/MacSignedVST/curve/source/curve.cpp @@ -13,7 +13,7 @@ curve::curve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MacSignedVST/curve/source/curveProc.cpp b/plugins/MacSignedVST/curve/source/curveProc.cpp index 3a3f18b86..1b607c120 100755 --- a/plugins/MacSignedVST/curve/source/curveProc.cpp +++ b/plugins/MacSignedVST/curve/source/curveProc.cpp @@ -19,8 +19,8 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -39,11 +39,11 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacSignedVST/uLawDecode/source/uLawDecodeProc.cpp b/plugins/MacSignedVST/uLawDecode/source/uLawDecodeProc.cpp index 0c0ee1f1f..45a85c80a 100755 --- a/plugins/MacSignedVST/uLawDecode/source/uLawDecodeProc.cpp +++ b/plugins/MacSignedVST/uLawDecode/source/uLawDecodeProc.cpp @@ -27,42 +27,8 @@ void uLawDecode::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -127,42 +93,8 @@ void uLawDecode::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/ADT/source/ADT.cpp b/plugins/MacVST/ADT/source/ADT.cpp index b05be403d..34db6d535 100755 --- a/plugins/MacVST/ADT/source/ADT.cpp +++ b/plugins/MacVST/ADT/source/ADT.cpp @@ -24,7 +24,7 @@ ADT::ADT(audioMasterCallback audioMaster) : offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/ADT.h b/plugins/MacVST/ADT/source/ADT.h index 4ada4659d..113e371d9 100755 --- a/plugins/MacVST/ADT/source/ADT.h +++ b/plugins/MacVST/ADT/source/ADT.h @@ -64,7 +64,8 @@ private: double offsetB; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/ADT/source/ADTProc.cpp b/plugins/MacVST/ADT/source/ADTProc.cpp index 555f0877e..1d113ad8e 100755 --- a/plugins/MacVST/ADT/source/ADTProc.cpp +++ b/plugins/MacVST/ADT/source/ADTProc.cpp @@ -32,8 +32,8 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + 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; diff --git a/plugins/MacVST/Apicolypse/source/Apicolypse.cpp b/plugins/MacVST/Apicolypse/source/Apicolypse.cpp index b5f4179a9..8c9d15ec5 100755 --- a/plugins/MacVST/Apicolypse/source/Apicolypse.cpp +++ b/plugins/MacVST/Apicolypse/source/Apicolypse.cpp @@ -19,7 +19,7 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/ApicolypseProc.cpp b/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp index bc9e99ab5..c0b954717 100755 --- a/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp +++ b/plugins/MacVST/Apicolypse/source/ApicolypseProc.cpp @@ -39,8 +39,8 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -166,11 +166,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/AtmosphereBuss/source/AtmosphereBussProc.cpp b/plugins/MacVST/AtmosphereBuss/source/AtmosphereBussProc.cpp index add056764..6a5a9a9ba 100755 --- a/plugins/MacVST/AtmosphereBuss/source/AtmosphereBussProc.cpp +++ b/plugins/MacVST/AtmosphereBuss/source/AtmosphereBussProc.cpp @@ -50,42 +50,8 @@ void AtmosphereBuss::processReplacing(float **inputs, float **outputs, VstInt32 inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -311,42 +277,8 @@ void AtmosphereBuss::processDoubleReplacing(double **inputs, double **outputs, V inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp b/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp index 763853004..92a6a7318 100755 --- a/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp +++ b/plugins/MacVST/AtmosphereChannel/source/AtmosphereChannelProc.cpp @@ -50,42 +50,8 @@ void AtmosphereChannel::processReplacing(float **inputs, float **outputs, VstInt inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -306,42 +272,8 @@ void AtmosphereChannel::processDoubleReplacing(double **inputs, double **outputs inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/MacVST/AverMatrix/source/AverMatrix.cpp b/plugins/MacVST/AverMatrix/source/AverMatrix.cpp index 585bd857a..e2e346a0f 100755 --- a/plugins/MacVST/AverMatrix/source/AverMatrix.cpp +++ b/plugins/MacVST/AverMatrix/source/AverMatrix.cpp @@ -22,7 +22,7 @@ AverMatrix::AverMatrix(audioMasterCallback audioMaster) : } } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/AverMatrix/source/AverMatrixProc.cpp b/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp index af0105057..c04b2ced4 100755 --- a/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp +++ b/plugins/MacVST/AverMatrix/source/AverMatrixProc.cpp @@ -50,8 +50,8 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -81,11 +81,11 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BassAmp/source/BassAmp.cpp b/plugins/MacVST/BassAmp/source/BassAmp.cpp index 506531cf6..330f7ac10 100755 --- a/plugins/MacVST/BassAmp/source/BassAmp.cpp +++ b/plugins/MacVST/BassAmp/source/BassAmp.cpp @@ -135,7 +135,7 @@ BassAmp::BassAmp(audioMasterCallback audioMaster) : ataK3 = 0.114; //add raw to interpolated dry, toughens ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0 ataK5 = 0.122; //subtract this much prev. diff sample, brightens - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BassDrive/source/BassDrive.cpp b/plugins/MacVST/BassDrive/source/BassDrive.cpp index 81f611e82..fd327fac1 100755 --- a/plugins/MacVST/BassDrive/source/BassDrive.cpp +++ b/plugins/MacVST/BassDrive/source/BassDrive.cpp @@ -56,7 +56,7 @@ BassDrive::BassDrive(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BassDrive/source/BassDriveProc.cpp b/plugins/MacVST/BassDrive/source/BassDriveProc.cpp index 68f67e7f7..8575a9e62 100755 --- a/plugins/MacVST/BassDrive/source/BassDriveProc.cpp +++ b/plugins/MacVST/BassDrive/source/BassDriveProc.cpp @@ -27,8 +27,8 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sumL = 0.0; sumR = 0.0; @@ -314,11 +314,11 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BassKit/source/BassKitProc.cpp b/plugins/MacVST/BassKit/source/BassKitProc.cpp index 3044c5cec..620b4449d 100755 --- a/plugins/MacVST/BassKit/source/BassKitProc.cpp +++ b/plugins/MacVST/BassKit/source/BassKitProc.cpp @@ -36,42 +36,8 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; @@ -252,42 +218,8 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; diff --git a/plugins/MacVST/Baxandall/source/Baxandall.cpp b/plugins/MacVST/Baxandall/source/Baxandall.cpp index d27affada..55be20100 100755 --- a/plugins/MacVST/Baxandall/source/Baxandall.cpp +++ b/plugins/MacVST/Baxandall/source/Baxandall.cpp @@ -26,7 +26,7 @@ Baxandall::Baxandall(audioMasterCallback audioMaster) : bassBR[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Baxandall/source/BaxandallProc.cpp b/plugins/MacVST/Baxandall/source/BaxandallProc.cpp index f52cba8ec..772a7cadc 100755 --- a/plugins/MacVST/Baxandall/source/BaxandallProc.cpp +++ b/plugins/MacVST/Baxandall/source/BaxandallProc.cpp @@ -47,8 +47,8 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (output != 1.0) { inputSampleL *= output; @@ -127,11 +127,11 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Beam/source/Beam.cpp b/plugins/MacVST/Beam/source/Beam.cpp index 183b5e57b..a1adf4a2f 100755 --- a/plugins/MacVST/Beam/source/Beam.cpp +++ b/plugins/MacVST/Beam/source/Beam.cpp @@ -19,7 +19,7 @@ Beam::Beam(audioMasterCallback audioMaster) : lastSampleL[count] = 0; lastSampleR[count] = 0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Biquad/source/Biquad.cpp b/plugins/MacVST/Biquad/source/Biquad.cpp index b6196911e..fbcf8b446 100755 --- a/plugins/MacVST/Biquad/source/Biquad.cpp +++ b/plugins/MacVST/Biquad/source/Biquad.cpp @@ -17,7 +17,7 @@ Biquad::Biquad(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Biquad/source/BiquadProc.cpp b/plugins/MacVST/Biquad/source/BiquadProc.cpp index cff2485a6..f872c60ca 100755 --- a/plugins/MacVST/Biquad/source/BiquadProc.cpp +++ b/plugins/MacVST/Biquad/source/BiquadProc.cpp @@ -90,8 +90,8 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -147,11 +147,11 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Biquad2/source/Biquad2.cpp b/plugins/MacVST/Biquad2/source/Biquad2.cpp index 83e1664e0..7b9d33802 100755 --- a/plugins/MacVST/Biquad2/source/Biquad2.cpp +++ b/plugins/MacVST/Biquad2/source/Biquad2.cpp @@ -30,7 +30,7 @@ Biquad2::Biquad2(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; E = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Biquad2/source/Biquad2Proc.cpp b/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp index 9e9d6bce8..db8d29571 100755 --- a/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp +++ b/plugins/MacVST/Biquad2/source/Biquad2Proc.cpp @@ -81,8 +81,8 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -202,11 +202,11 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BiquadDouble/source/BiquadDouble.cpp b/plugins/MacVST/BiquadDouble/source/BiquadDouble.cpp index 64c7b188e..aaacd15b4 100755 --- a/plugins/MacVST/BiquadDouble/source/BiquadDouble.cpp +++ b/plugins/MacVST/BiquadDouble/source/BiquadDouble.cpp @@ -17,7 +17,7 @@ BiquadDouble::BiquadDouble(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BiquadDouble/source/BiquadDoubleProc.cpp b/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp index 055743d43..a0a47f4f4 100755 --- a/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp +++ b/plugins/MacVST/BiquadDouble/source/BiquadDoubleProc.cpp @@ -91,8 +91,8 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -138,11 +138,11 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalf.cpp b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalf.cpp index c3a11e1ec..ee0943339 100755 --- a/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalf.cpp +++ b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalf.cpp @@ -18,7 +18,7 @@ BiquadOneHalf::BiquadOneHalf(audioMasterCallback audioMaster) : B = 0.0; C = 0.0; D = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BiquadOneHalf/source/BiquadOneHalfProc.cpp b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp index 87d9763c1..001a00ee1 100755 --- a/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp +++ b/plugins/MacVST/BiquadOneHalf/source/BiquadOneHalfProc.cpp @@ -89,8 +89,8 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -142,11 +142,11 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BiquadTriple/source/BiquadTriple.cpp b/plugins/MacVST/BiquadTriple/source/BiquadTriple.cpp index ce850841d..a56973eca 100755 --- a/plugins/MacVST/BiquadTriple/source/BiquadTriple.cpp +++ b/plugins/MacVST/BiquadTriple/source/BiquadTriple.cpp @@ -17,7 +17,7 @@ BiquadTriple::BiquadTriple(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BiquadTriple/source/BiquadTripleProc.cpp b/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp index 84ee1b7f5..84b05ed53 100755 --- a/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp +++ b/plugins/MacVST/BiquadTriple/source/BiquadTripleProc.cpp @@ -92,8 +92,8 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -150,11 +150,11 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BitGlitter/source/BitGlitter.cpp b/plugins/MacVST/BitGlitter/source/BitGlitter.cpp index 438ce6452..88aedaddb 100755 --- a/plugins/MacVST/BitGlitter/source/BitGlitter.cpp +++ b/plugins/MacVST/BitGlitter/source/BitGlitter.cpp @@ -17,7 +17,7 @@ BitGlitter::BitGlitter(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; ataLastSampleL = 0.0; ataHalfwaySampleL = 0.0; diff --git a/plugins/MacVST/BitGlitter/source/BitGlitter.h b/plugins/MacVST/BitGlitter/source/BitGlitter.h index 999920767..2f0702e5a 100755 --- a/plugins/MacVST/BitGlitter/source/BitGlitter.h +++ b/plugins/MacVST/BitGlitter/source/BitGlitter.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double ataLastSampleL; double ataHalfwaySampleL; diff --git a/plugins/MacVST/BitGlitter/source/BitGlitterProc.cpp b/plugins/MacVST/BitGlitter/source/BitGlitterProc.cpp index 38afa37d9..066b93811 100755 --- a/plugins/MacVST/BitGlitter/source/BitGlitterProc.cpp +++ b/plugins/MacVST/BitGlitter/source/BitGlitterProc.cpp @@ -34,8 +34,8 @@ void BitGlitter::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/BlockParty/source/BlockParty.cpp b/plugins/MacVST/BlockParty/source/BlockParty.cpp index 31cc75597..fd9e2ff39 100755 --- a/plugins/MacVST/BlockParty/source/BlockParty.cpp +++ b/plugins/MacVST/BlockParty/source/BlockParty.cpp @@ -14,7 +14,7 @@ BlockParty::BlockParty(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; muSpeedAL = 10000; muSpeedBL = 10000; diff --git a/plugins/MacVST/BlockParty/source/BlockParty.h b/plugins/MacVST/BlockParty/source/BlockParty.h index afcc9739a..006e9dfd0 100755 --- a/plugins/MacVST/BlockParty/source/BlockParty.h +++ b/plugins/MacVST/BlockParty/source/BlockParty.h @@ -53,7 +53,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/BlockParty/source/BlockPartyProc.cpp b/plugins/MacVST/BlockParty/source/BlockPartyProc.cpp index 37c3a6545..42d2924fe 100755 --- a/plugins/MacVST/BlockParty/source/BlockPartyProc.cpp +++ b/plugins/MacVST/BlockParty/source/BlockPartyProc.cpp @@ -32,42 +32,8 @@ void BlockParty::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -593,42 +559,8 @@ void BlockParty::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/BrassRider/source/BrassRider.cpp b/plugins/MacVST/BrassRider/source/BrassRider.cpp index 3c6ac09ce..ff0fdb80d 100755 --- a/plugins/MacVST/BrassRider/source/BrassRider.cpp +++ b/plugins/MacVST/BrassRider/source/BrassRider.cpp @@ -30,7 +30,7 @@ BrassRider::BrassRider(audioMasterCallback audioMaster) : lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BrassRider/source/BrassRiderProc.cpp b/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp index 449a965fc..b53db95e5 100755 --- a/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp +++ b/plugins/MacVST/BrassRider/source/BrassRiderProc.cpp @@ -24,42 +24,8 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -132,11 +98,11 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -166,42 +132,8 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/BrightAmbience/source/BrightAmbience.cpp b/plugins/MacVST/BrightAmbience/source/BrightAmbience.cpp index 0a5e13f5b..afa450178 100755 --- a/plugins/MacVST/BrightAmbience/source/BrightAmbience.cpp +++ b/plugins/MacVST/BrightAmbience/source/BrightAmbience.cpp @@ -17,7 +17,7 @@ BrightAmbience::BrightAmbience(audioMasterCallback audioMaster) : A = 0.0; B = 0.0; C = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BrightAmbience/source/BrightAmbienceProc.cpp b/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp index dc4ecd233..69a6193b7 100755 --- a/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp +++ b/plugins/MacVST/BrightAmbience/source/BrightAmbienceProc.cpp @@ -25,8 +25,8 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 12680) {gcount = 12680;} count = gcount; @@ -322,11 +322,11 @@ void BrightAmbience::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/BrightAmbience2/source/BrightAmbience2.cpp b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2.cpp index a89300ea2..65f5728bc 100755 --- a/plugins/MacVST/BrightAmbience2/source/BrightAmbience2.cpp +++ b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2.cpp @@ -19,7 +19,7 @@ BrightAmbience2::BrightAmbience2(audioMasterCallback audioMaster) : B = 0.2; C = 0.0; D = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/BrightAmbience2/source/BrightAmbience2Proc.cpp b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp index 95daad017..1e9b85c8b 100755 --- a/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp +++ b/plugins/MacVST/BrightAmbience2/source/BrightAmbience2Proc.cpp @@ -24,8 +24,8 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -58,11 +58,11 @@ void BrightAmbience2::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Calibre/source/Calibre.cpp b/plugins/MacVST/Calibre/source/Calibre.cpp index 214f85ea4..5bf269d0b 100755 --- a/plugins/MacVST/Calibre/source/Calibre.cpp +++ b/plugins/MacVST/Calibre/source/Calibre.cpp @@ -18,7 +18,7 @@ Calibre::Calibre(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Calibre/source/CalibreProc.cpp b/plugins/MacVST/Calibre/source/CalibreProc.cpp index 14350eff2..b51ae2d14 100755 --- a/plugins/MacVST/Calibre/source/CalibreProc.cpp +++ b/plugins/MacVST/Calibre/source/CalibreProc.cpp @@ -39,8 +39,8 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Capacitor2/source/Capacitor2.cpp b/plugins/MacVST/Capacitor2/source/Capacitor2.cpp index 406621915..9dec180d3 100755 --- a/plugins/MacVST/Capacitor2/source/Capacitor2.cpp +++ b/plugins/MacVST/Capacitor2/source/Capacitor2.cpp @@ -52,7 +52,7 @@ Capacitor2::Capacitor2(audioMasterCallback audioMaster) : lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Capacitor2/source/Capacitor2Proc.cpp b/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp index 899aaaa4a..5bd961e2d 100755 --- a/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp +++ b/plugins/MacVST/Capacitor2/source/Capacitor2Proc.cpp @@ -32,8 +32,8 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -153,11 +153,11 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Channel5/source/Channel5Proc.cpp b/plugins/MacVST/Channel5/source/Channel5Proc.cpp index b029d9303..5d25c69e4 100755 --- a/plugins/MacVST/Channel5/source/Channel5Proc.cpp +++ b/plugins/MacVST/Channel5/source/Channel5Proc.cpp @@ -26,42 +26,8 @@ void Channel5::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { @@ -161,42 +127,8 @@ void Channel5::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { diff --git a/plugins/MacVST/Channel6/source/Channel6.cpp b/plugins/MacVST/Channel6/source/Channel6.cpp index 0ad6eddd0..80e17af19 100755 --- a/plugins/MacVST/Channel6/source/Channel6.cpp +++ b/plugins/MacVST/Channel6/source/Channel6.cpp @@ -15,7 +15,7 @@ Channel6::Channel6(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacVST/Channel6/source/Channel6.h b/plugins/MacVST/Channel6/source/Channel6.h index 3945cecbf..ddca3e3ae 100755 --- a/plugins/MacVST/Channel6/source/Channel6.h +++ b/plugins/MacVST/Channel6/source/Channel6.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double iirSampleLA; double iirSampleRA; diff --git a/plugins/MacVST/Channel6/source/Channel6Proc.cpp b/plugins/MacVST/Channel6/source/Channel6Proc.cpp index 777666f14..ad228a8e8 100755 --- a/plugins/MacVST/Channel6/source/Channel6Proc.cpp +++ b/plugins/MacVST/Channel6/source/Channel6Proc.cpp @@ -26,8 +26,8 @@ void Channel6::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) diff --git a/plugins/MacVST/Channel7/source/Channel7.cpp b/plugins/MacVST/Channel7/source/Channel7.cpp index ba73bf565..1b753f1cd 100755 --- a/plugins/MacVST/Channel7/source/Channel7.cpp +++ b/plugins/MacVST/Channel7/source/Channel7.cpp @@ -15,7 +15,7 @@ Channel7::Channel7(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacVST/Channel7/source/Channel7Proc.cpp b/plugins/MacVST/Channel7/source/Channel7Proc.cpp index e9e9a6852..bb42ba20a 100755 --- a/plugins/MacVST/Channel7/source/Channel7Proc.cpp +++ b/plugins/MacVST/Channel7/source/Channel7Proc.cpp @@ -28,8 +28,8 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) { @@ -96,11 +96,11 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Channel8/source/Channel8.cpp b/plugins/MacVST/Channel8/source/Channel8.cpp index c13fd7c96..3678965d6 100755 --- a/plugins/MacVST/Channel8/source/Channel8.cpp +++ b/plugins/MacVST/Channel8/source/Channel8.cpp @@ -15,7 +15,7 @@ Channel8::Channel8(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/MacVST/Channel8/source/Channel8Proc.cpp b/plugins/MacVST/Channel8/source/Channel8Proc.cpp index afb1a48fe..f62bed44f 100755 --- a/plugins/MacVST/Channel8/source/Channel8Proc.cpp +++ b/plugins/MacVST/Channel8/source/Channel8Proc.cpp @@ -29,8 +29,8 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double dielectricScaleL = fabs(2.0-((inputSampleL+nonLin)/nonLin)); double dielectricScaleR = fabs(2.0-((inputSampleR+nonLin)/nonLin)); @@ -120,11 +120,11 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/ChromeOxide/source/ChromeOxide.cpp b/plugins/MacVST/ChromeOxide/source/ChromeOxide.cpp index 40cc31966..183fa9079 100755 --- a/plugins/MacVST/ChromeOxide/source/ChromeOxide.cpp +++ b/plugins/MacVST/ChromeOxide/source/ChromeOxide.cpp @@ -31,7 +31,7 @@ ChromeOxide::ChromeOxide(audioMasterCallback audioMaster) : flip = false; A = 0.5; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/ChromeOxide/source/ChromeOxideProc.cpp b/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp index be036a80e..873c535f1 100755 --- a/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp +++ b/plugins/MacVST/ChromeOxide/source/ChromeOxideProc.cpp @@ -48,8 +48,8 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -152,11 +152,11 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Cider/source/Cider.cpp b/plugins/MacVST/Cider/source/Cider.cpp index 953563eb8..ebdd1a4f4 100755 --- a/plugins/MacVST/Cider/source/Cider.cpp +++ b/plugins/MacVST/Cider/source/Cider.cpp @@ -18,7 +18,7 @@ Cider::Cider(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Cider/source/CiderProc.cpp b/plugins/MacVST/Cider/source/CiderProc.cpp index 9222a2ea7..31be7279f 100755 --- a/plugins/MacVST/Cider/source/CiderProc.cpp +++ b/plugins/MacVST/Cider/source/CiderProc.cpp @@ -39,8 +39,8 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Coils/source/Coils.cpp b/plugins/MacVST/Coils/source/Coils.cpp index b3cc04aab..e40878412 100755 --- a/plugins/MacVST/Coils/source/Coils.cpp +++ b/plugins/MacVST/Coils/source/Coils.cpp @@ -16,7 +16,7 @@ Coils::Coils(audioMasterCallback audioMaster) : B = 0.5; C = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Coils/source/CoilsProc.cpp b/plugins/MacVST/Coils/source/CoilsProc.cpp index d963e9053..278f0690d 100755 --- a/plugins/MacVST/Coils/source/CoilsProc.cpp +++ b/plugins/MacVST/Coils/source/CoilsProc.cpp @@ -34,8 +34,8 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -74,11 +74,11 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Cojones/source/CojonesProc.cpp b/plugins/MacVST/Cojones/source/CojonesProc.cpp index 24606e3af..3b45cea8f 100755 --- a/plugins/MacVST/Cojones/source/CojonesProc.cpp +++ b/plugins/MacVST/Cojones/source/CojonesProc.cpp @@ -27,42 +27,8 @@ void Cojones::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -197,42 +163,8 @@ void Cojones::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Compresaturator/source/Compresaturator.cpp b/plugins/MacVST/Compresaturator/source/Compresaturator.cpp index e975f9cf9..1bb483138 100755 --- a/plugins/MacVST/Compresaturator/source/Compresaturator.cpp +++ b/plugins/MacVST/Compresaturator/source/Compresaturator.cpp @@ -25,7 +25,7 @@ Compresaturator::Compresaturator(audioMasterCallback audioMaster) : lastWidthR = 500; padFactorR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Compresaturator/source/Compresaturator.h b/plugins/MacVST/Compresaturator/source/Compresaturator.h index 62414582e..868b50b4d 100755 --- a/plugins/MacVST/Compresaturator/source/Compresaturator.h +++ b/plugins/MacVST/Compresaturator/source/Compresaturator.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff int dCount; diff --git a/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp b/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp index 921f25b11..9a70ac814 100755 --- a/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp +++ b/plugins/MacVST/Compresaturator/source/CompresaturatorProc.cpp @@ -28,42 +28,8 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -243,42 +209,8 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Console6Buss/source/Console6Buss.cpp b/plugins/MacVST/Console6Buss/source/Console6Buss.cpp index 27681c141..c6658226e 100755 --- a/plugins/MacVST/Console6Buss/source/Console6Buss.cpp +++ b/plugins/MacVST/Console6Buss/source/Console6Buss.cpp @@ -13,7 +13,7 @@ Console6Buss::Console6Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Console6Buss/source/Console6BussProc.cpp b/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp index 03f8fb9a6..6e25bd3a3 100755 --- a/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp +++ b/plugins/MacVST/Console6Buss/source/Console6BussProc.cpp @@ -20,8 +20,8 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Console6Channel/source/Console6Channel.cpp b/plugins/MacVST/Console6Channel/source/Console6Channel.cpp index 5bd28ca6e..d8634744e 100755 --- a/plugins/MacVST/Console6Channel/source/Console6Channel.cpp +++ b/plugins/MacVST/Console6Channel/source/Console6Channel.cpp @@ -13,7 +13,7 @@ Console6Channel::Console6Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Console6Channel/source/Console6ChannelProc.cpp b/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp index 2d835fc8c..a72e3b8f0 100755 --- a/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp +++ b/plugins/MacVST/Console6Channel/source/Console6ChannelProc.cpp @@ -20,8 +20,8 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Channel::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Crystal/source/CrystalProc.cpp b/plugins/MacVST/Crystal/source/CrystalProc.cpp index f5d6746b1..d5eef67c8 100755 --- a/plugins/MacVST/Crystal/source/CrystalProc.cpp +++ b/plugins/MacVST/Crystal/source/CrystalProc.cpp @@ -40,42 +40,8 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -243,42 +209,8 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; diff --git a/plugins/MacVST/Dark/source/Dark.cpp b/plugins/MacVST/Dark/source/Dark.cpp index f652aa452..8c038752e 100755 --- a/plugins/MacVST/Dark/source/Dark.cpp +++ b/plugins/MacVST/Dark/source/Dark.cpp @@ -14,7 +14,7 @@ Dark::Dark(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 99; count++) { lastSampleL[count] = 0; lastSampleR[count] = 0; diff --git a/plugins/MacVST/DeBess/source/DeBess.cpp b/plugins/MacVST/DeBess/source/DeBess.cpp index b31a71a46..87d7316b8 100755 --- a/plugins/MacVST/DeBess/source/DeBess.cpp +++ b/plugins/MacVST/DeBess/source/DeBess.cpp @@ -29,7 +29,7 @@ DeBess::DeBess(audioMasterCallback audioMaster) : iirSampleBR = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/DeBess/source/DeBessProc.cpp b/plugins/MacVST/DeBess/source/DeBessProc.cpp index 075c9de3e..f868c8284 100755 --- a/plugins/MacVST/DeBess/source/DeBessProc.cpp +++ b/plugins/MacVST/DeBess/source/DeBessProc.cpp @@ -30,8 +30,8 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sL[0] = inputSampleL; //set up so both [0] and [1] will be input sample sR[0] = inputSampleR; //set up so both [0] and [1] will be input sample @@ -92,11 +92,11 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/DeHiss/source/DeHiss.cpp b/plugins/MacVST/DeHiss/source/DeHiss.cpp index 1f2d5639c..17f386f5d 100755 --- a/plugins/MacVST/DeHiss/source/DeHiss.cpp +++ b/plugins/MacVST/DeHiss/source/DeHiss.cpp @@ -25,7 +25,7 @@ DeHiss::DeHiss(audioMasterCallback audioMaster) : gateR = 1.0; rawR = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/DeHiss/source/DeHissProc.cpp b/plugins/MacVST/DeHiss/source/DeHissProc.cpp index 41074f9c5..88547ff75 100755 --- a/plugins/MacVST/DeHiss/source/DeHissProc.cpp +++ b/plugins/MacVST/DeHiss/source/DeHissProc.cpp @@ -37,8 +37,8 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -121,11 +121,11 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/DeRez2/source/DeRez2.cpp b/plugins/MacVST/DeRez2/source/DeRez2.cpp index 876d97575..acc092ee5 100755 --- a/plugins/MacVST/DeRez2/source/DeRez2.cpp +++ b/plugins/MacVST/DeRez2/source/DeRez2.cpp @@ -29,7 +29,7 @@ DeRez2::DeRez2(audioMasterCallback audioMaster) : position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/DeRez2/source/DeRez2Proc.cpp b/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp index d43944d9e..4ff6cf82d 100755 --- a/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp +++ b/plugins/MacVST/DeRez2/source/DeRez2Proc.cpp @@ -30,8 +30,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -168,11 +168,11 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Deckwrecka/source/Deckwrecka.cpp b/plugins/MacVST/Deckwrecka/source/Deckwrecka.cpp index 9f7fe61ca..8e4fc6d08 100755 --- a/plugins/MacVST/Deckwrecka/source/Deckwrecka.cpp +++ b/plugins/MacVST/Deckwrecka/source/Deckwrecka.cpp @@ -13,7 +13,7 @@ Deckwrecka::Deckwrecka(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bflip = 1; iirHeadBumpAL = 0.0; diff --git a/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp b/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp index e7146df5d..1e59e635c 100755 --- a/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp +++ b/plugins/MacVST/Deckwrecka/source/DeckwreckaProc.cpp @@ -35,8 +35,8 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; bflip++; if (bflip < 1 || bflip > 3) bflip = 1; @@ -175,11 +175,11 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/DigitalBlack/source/DigitalBlack.cpp b/plugins/MacVST/DigitalBlack/source/DigitalBlack.cpp index 9208be4f4..89a10236a 100755 --- a/plugins/MacVST/DigitalBlack/source/DigitalBlack.cpp +++ b/plugins/MacVST/DigitalBlack/source/DigitalBlack.cpp @@ -20,7 +20,7 @@ DigitalBlack::DigitalBlack(audioMasterCallback audioMaster) : WasNegativeR = false; ZeroCrossR = 0; gaterollerR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/DigitalBlack/source/DigitalBlackProc.cpp b/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp index 8caeff273..efd520f21 100755 --- a/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp +++ b/plugins/MacVST/DigitalBlack/source/DigitalBlackProc.cpp @@ -26,8 +26,8 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -91,11 +91,11 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Distance2/source/Distance2Proc.cpp b/plugins/MacVST/Distance2/source/Distance2Proc.cpp index 0a92a9268..8017d9303 100755 --- a/plugins/MacVST/Distance2/source/Distance2Proc.cpp +++ b/plugins/MacVST/Distance2/source/Distance2Proc.cpp @@ -46,42 +46,8 @@ void Distance2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,42 +290,8 @@ void Distance2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Distortion/source/Distortion.cpp b/plugins/MacVST/Distortion/source/Distortion.cpp index 34dd08274..373ec3574 100755 --- a/plugins/MacVST/Distortion/source/Distortion.cpp +++ b/plugins/MacVST/Distortion/source/Distortion.cpp @@ -20,7 +20,7 @@ Distortion::Distortion(audioMasterCallback audioMaster) : previousInL[x] = 0.0; previousOutL[x] = 0.0; previousInR[x] = 0.0; previousOutR[x] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Distortion/source/DistortionProc.cpp b/plugins/MacVST/Distortion/source/DistortionProc.cpp index 8d6a4f8b0..17240d1cf 100755 --- a/plugins/MacVST/Distortion/source/DistortionProc.cpp +++ b/plugins/MacVST/Distortion/source/DistortionProc.cpp @@ -25,8 +25,8 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -111,11 +111,11 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -146,8 +146,8 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/DitherFloat/source/DitherFloat.cpp b/plugins/MacVST/DitherFloat/source/DitherFloat.cpp index 05213a6ce..9443a2daa 100755 --- a/plugins/MacVST/DitherFloat/source/DitherFloat.cpp +++ b/plugins/MacVST/DitherFloat/source/DitherFloat.cpp @@ -14,7 +14,7 @@ DitherFloat::DitherFloat(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/DubCenter/source/DubCenterProc.cpp b/plugins/MacVST/DubCenter/source/DubCenterProc.cpp index 49806b773..ff4d70dbf 100755 --- a/plugins/MacVST/DubCenter/source/DubCenterProc.cpp +++ b/plugins/MacVST/DubCenter/source/DubCenterProc.cpp @@ -52,42 +52,8 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -369,42 +335,8 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Dyno/source/Dyno.cpp b/plugins/MacVST/Dyno/source/Dyno.cpp index b02585f9d..0239412a3 100755 --- a/plugins/MacVST/Dyno/source/Dyno.cpp +++ b/plugins/MacVST/Dyno/source/Dyno.cpp @@ -13,7 +13,7 @@ Dyno::Dyno(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Dyno/source/DynoProc.cpp b/plugins/MacVST/Dyno/source/DynoProc.cpp index 3e9052c73..c2db122db 100755 --- a/plugins/MacVST/Dyno/source/DynoProc.cpp +++ b/plugins/MacVST/Dyno/source/DynoProc.cpp @@ -20,8 +20,8 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Elation/source/Elation.cpp b/plugins/MacVST/Elation/source/Elation.cpp index fc8d4367f..d4740eca0 100755 --- a/plugins/MacVST/Elation/source/Elation.cpp +++ b/plugins/MacVST/Elation/source/Elation.cpp @@ -23,7 +23,7 @@ Elation::Elation(audioMasterCallback audioMaster) : compCR = 1.0; compDR = 1.0; previousBR = 0.0; flip = false; lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Elation/source/ElationProc.cpp b/plugins/MacVST/Elation/source/ElationProc.cpp index 359c931b3..8df4ce867 100755 --- a/plugins/MacVST/Elation/source/ElationProc.cpp +++ b/plugins/MacVST/Elation/source/ElationProc.cpp @@ -36,8 +36,8 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -270,11 +270,11 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Energy/source/EnergyProc.cpp b/plugins/MacVST/Energy/source/EnergyProc.cpp index dbe218778..1d29f1479 100755 --- a/plugins/MacVST/Energy/source/EnergyProc.cpp +++ b/plugins/MacVST/Energy/source/EnergyProc.cpp @@ -30,42 +30,8 @@ void Energy::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; @@ -784,42 +750,8 @@ void Energy::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; diff --git a/plugins/MacVST/Facet/source/Facet.cpp b/plugins/MacVST/Facet/source/Facet.cpp index e12d20343..a6a5614fb 100755 --- a/plugins/MacVST/Facet/source/Facet.cpp +++ b/plugins/MacVST/Facet/source/Facet.cpp @@ -13,7 +13,7 @@ Facet::Facet(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Facet/source/FacetProc.cpp b/plugins/MacVST/Facet/source/FacetProc.cpp index fb5cdbd6e..85af36f42 100755 --- a/plugins/MacVST/Facet/source/FacetProc.cpp +++ b/plugins/MacVST/Facet/source/FacetProc.cpp @@ -20,8 +20,8 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; @@ -47,11 +47,11 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Floor/source/FloorProc.cpp b/plugins/MacVST/Floor/source/FloorProc.cpp index 0cfa58c69..758360f65 100755 --- a/plugins/MacVST/Floor/source/FloorProc.cpp +++ b/plugins/MacVST/Floor/source/FloorProc.cpp @@ -39,42 +39,8 @@ void Floor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -298,42 +264,8 @@ void Floor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Focus/source/Focus.cpp b/plugins/MacVST/Focus/source/Focus.cpp index f77560c82..a9e66020d 100755 --- a/plugins/MacVST/Focus/source/Focus.cpp +++ b/plugins/MacVST/Focus/source/Focus.cpp @@ -18,7 +18,7 @@ Focus::Focus(audioMasterCallback audioMaster) : D = 1.0; E = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Focus/source/FocusProc.cpp b/plugins/MacVST/Focus/source/FocusProc.cpp index 9e1c9c070..fd7624e72 100755 --- a/plugins/MacVST/Focus/source/FocusProc.cpp +++ b/plugins/MacVST/Focus/source/FocusProc.cpp @@ -34,8 +34,8 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -128,11 +128,11 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Gatelope/source/GatelopeProc.cpp b/plugins/MacVST/Gatelope/source/GatelopeProc.cpp index b5f1d67d7..5dbcb19c3 100755 --- a/plugins/MacVST/Gatelope/source/GatelopeProc.cpp +++ b/plugins/MacVST/Gatelope/source/GatelopeProc.cpp @@ -39,42 +39,8 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -247,42 +213,8 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/GlitchShifter/source/GlitchShifter.cpp b/plugins/MacVST/GlitchShifter/source/GlitchShifter.cpp index f9456e1f3..2bd39758e 100755 --- a/plugins/MacVST/GlitchShifter/source/GlitchShifter.cpp +++ b/plugins/MacVST/GlitchShifter/source/GlitchShifter.cpp @@ -53,7 +53,7 @@ GlitchShifter::GlitchShifter(audioMasterCallback audioMaster) : C = 0.5; D = 0.0; E = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/GlitchShifter/source/GlitchShifterProc.cpp b/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp index 852c3bc0f..06ebe4bae 100755 --- a/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp +++ b/plugins/MacVST/GlitchShifter/source/GlitchShifterProc.cpp @@ -28,8 +28,8 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -307,11 +307,11 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Gringer/source/Gringer.cpp b/plugins/MacVST/Gringer/source/Gringer.cpp index 5f92a8860..f071dedb8 100755 --- a/plugins/MacVST/Gringer/source/Gringer.cpp +++ b/plugins/MacVST/Gringer/source/Gringer.cpp @@ -13,7 +13,7 @@ Gringer::Gringer(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 9; x++) {inbandL[x] = 0.0; outbandL[x] = 0.0; inbandR[x] = 0.0; outbandR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Gringer/source/GringerProc.cpp b/plugins/MacVST/Gringer/source/GringerProc.cpp index b76693f2e..b59800001 100755 --- a/plugins/MacVST/Gringer/source/GringerProc.cpp +++ b/plugins/MacVST/Gringer/source/GringerProc.cpp @@ -60,8 +60,8 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); @@ -105,11 +105,11 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Highpass2/source/Highpass2.cpp b/plugins/MacVST/Highpass2/source/Highpass2.cpp index bcb2ce133..c88927ae2 100755 --- a/plugins/MacVST/Highpass2/source/Highpass2.cpp +++ b/plugins/MacVST/Highpass2/source/Highpass2.cpp @@ -16,7 +16,7 @@ Highpass2::Highpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp b/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp index e5f6a8066..e87194339 100755 --- a/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp +++ b/plugins/MacVST/Highpass2/source/Highpass2Proc.cpp @@ -41,42 +41,8 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -211,42 +177,8 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Holt/source/Holt.cpp b/plugins/MacVST/Holt/source/Holt.cpp index 4262453e1..499217c23 100755 --- a/plugins/MacVST/Holt/source/Holt.cpp +++ b/plugins/MacVST/Holt/source/Holt.cpp @@ -36,7 +36,7 @@ Holt::Holt(audioMasterCallback audioMaster) : previousSampleDR = 0.0; previousTrendDR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Holt/source/Holt.h b/plugins/MacVST/Holt/source/Holt.h index d9d61e929..8026fa40d 100755 --- a/plugins/MacVST/Holt/source/Holt.h +++ b/plugins/MacVST/Holt/source/Holt.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double previousSampleAL; diff --git a/plugins/MacVST/Holt/source/HoltProc.cpp b/plugins/MacVST/Holt/source/HoltProc.cpp index ca90811ad..c243b82ff 100755 --- a/plugins/MacVST/Holt/source/HoltProc.cpp +++ b/plugins/MacVST/Holt/source/HoltProc.cpp @@ -45,8 +45,8 @@ void Holt::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Infrasonic/source/Infrasonic.cpp b/plugins/MacVST/Infrasonic/source/Infrasonic.cpp index cf5ba9c6c..bfd10d163 100755 --- a/plugins/MacVST/Infrasonic/source/Infrasonic.cpp +++ b/plugins/MacVST/Infrasonic/source/Infrasonic.cpp @@ -13,7 +13,7 @@ Infrasonic::Infrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Infrasonic/source/InfrasonicProc.cpp b/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp index 135fd5e33..653fac502 100755 --- a/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp +++ b/plugins/MacVST/Infrasonic/source/InfrasonicProc.cpp @@ -65,8 +65,8 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Interstage/source/Interstage.cpp b/plugins/MacVST/Interstage/source/Interstage.cpp index 9c8acdd11..92acc46cc 100755 --- a/plugins/MacVST/Interstage/source/Interstage.cpp +++ b/plugins/MacVST/Interstage/source/Interstage.cpp @@ -26,7 +26,7 @@ Interstage::Interstage(audioMasterCallback audioMaster) : iirSampleER = 0.0; iirSampleFR = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/MacVST/Interstage/source/InterstageProc.cpp b/plugins/MacVST/Interstage/source/InterstageProc.cpp index 181983f57..2707bd744 100755 --- a/plugins/MacVST/Interstage/source/InterstageProc.cpp +++ b/plugins/MacVST/Interstage/source/InterstageProc.cpp @@ -26,8 +26,8 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -77,11 +77,11 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Isolator/source/Isolator.cpp b/plugins/MacVST/Isolator/source/Isolator.cpp index 651a10ac6..c8222a86f 100755 --- a/plugins/MacVST/Isolator/source/Isolator.cpp +++ b/plugins/MacVST/Isolator/source/Isolator.cpp @@ -16,7 +16,7 @@ Isolator::Isolator(audioMasterCallback audioMaster) : A = 1.0; B = 0.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Isolator/source/IsolatorProc.cpp b/plugins/MacVST/Isolator/source/IsolatorProc.cpp index ca777d947..4f7178a86 100755 --- a/plugins/MacVST/Isolator/source/IsolatorProc.cpp +++ b/plugins/MacVST/Isolator/source/IsolatorProc.cpp @@ -64,8 +64,8 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = *in1; double drySampleR = *in2; @@ -110,11 +110,11 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Loud/source/Loud.cpp b/plugins/MacVST/Loud/source/Loud.cpp index a8338382a..1f884deb1 100755 --- a/plugins/MacVST/Loud/source/Loud.cpp +++ b/plugins/MacVST/Loud/source/Loud.cpp @@ -17,7 +17,7 @@ Loud::Loud(audioMasterCallback audioMaster) : C = 1.0; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Loud/source/Loud.h b/plugins/MacVST/Loud/source/Loud.h index 610c99cde..14e613399 100755 --- a/plugins/MacVST/Loud/source/Loud.h +++ b/plugins/MacVST/Loud/source/Loud.h @@ -56,7 +56,8 @@ private: double lastSampleL; double lastSampleR; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/Loud/source/LoudProc.cpp b/plugins/MacVST/Loud/source/LoudProc.cpp index 906f51dbd..260ba230d 100755 --- a/plugins/MacVST/Loud/source/LoudProc.cpp +++ b/plugins/MacVST/Loud/source/LoudProc.cpp @@ -31,8 +31,8 @@ void Loud::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { inputSampleL = *in1; inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; drySampleL = inputSampleL; drySampleR = inputSampleR; diff --git a/plugins/MacVST/Lowpass2/source/Lowpass2.cpp b/plugins/MacVST/Lowpass2/source/Lowpass2.cpp index 6c463993f..1de69450a 100755 --- a/plugins/MacVST/Lowpass2/source/Lowpass2.cpp +++ b/plugins/MacVST/Lowpass2/source/Lowpass2.cpp @@ -16,7 +16,7 @@ Lowpass2::Lowpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp b/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp index 1dd3af06f..1bed77696 100755 --- a/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp +++ b/plugins/MacVST/Lowpass2/source/Lowpass2Proc.cpp @@ -41,42 +41,8 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -212,42 +178,8 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Luxor/source/Luxor.cpp b/plugins/MacVST/Luxor/source/Luxor.cpp index d00c67d05..001286dd8 100755 --- a/plugins/MacVST/Luxor/source/Luxor.cpp +++ b/plugins/MacVST/Luxor/source/Luxor.cpp @@ -18,7 +18,7 @@ Luxor::Luxor(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Luxor/source/LuxorProc.cpp b/plugins/MacVST/Luxor/source/LuxorProc.cpp index c8d0add39..89c8487ba 100755 --- a/plugins/MacVST/Luxor/source/LuxorProc.cpp +++ b/plugins/MacVST/Luxor/source/LuxorProc.cpp @@ -39,8 +39,8 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/MV/source/MV.cpp b/plugins/MacVST/MV/source/MV.cpp index 3db80c46b..90246abae 100755 --- a/plugins/MacVST/MV/source/MV.cpp +++ b/plugins/MacVST/MV/source/MV.cpp @@ -76,7 +76,7 @@ MV::MV(audioMasterCallback audioMaster) : feedbackL = 0.0; feedbackR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MV/source/MV.h b/plugins/MacVST/MV/source/MV.h index 1586d41cc..5a60fa653 100755 --- a/plugins/MacVST/MV/source/MV.h +++ b/plugins/MacVST/MV/source/MV.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/MV/source/MVProc.cpp b/plugins/MacVST/MV/source/MVProc.cpp index 11da2fce9..5a0b96333 100755 --- a/plugins/MacVST/MV/source/MVProc.cpp +++ b/plugins/MacVST/MV/source/MVProc.cpp @@ -34,42 +34,8 @@ void MV::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -830,42 +796,8 @@ void MV::processDoubleReplacing(double **inputs, double **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/MoNoam/source/MoNoam.cpp b/plugins/MacVST/MoNoam/source/MoNoam.cpp index 3612604d1..746f43edb 100755 --- a/plugins/MacVST/MoNoam/source/MoNoam.cpp +++ b/plugins/MacVST/MoNoam/source/MoNoam.cpp @@ -13,7 +13,7 @@ MoNoam::MoNoam(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/MoNoam/source/MoNoamProc.cpp b/plugins/MacVST/MoNoam/source/MoNoamProc.cpp index 64cc63a99..c7835d557 100755 --- a/plugins/MacVST/MoNoam/source/MoNoamProc.cpp +++ b/plugins/MacVST/MoNoam/source/MoNoamProc.cpp @@ -20,8 +20,8 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; double side; side = inputSampleL - inputSampleR; @@ -41,11 +41,11 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Mojo/source/Mojo.cpp b/plugins/MacVST/Mojo/source/Mojo.cpp index 7b34fbafd..78bb5c9c3 100755 --- a/plugins/MacVST/Mojo/source/Mojo.cpp +++ b/plugins/MacVST/Mojo/source/Mojo.cpp @@ -13,7 +13,7 @@ Mojo::Mojo(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Mojo/source/MojoProc.cpp b/plugins/MacVST/Mojo/source/MojoProc.cpp index 6687feea8..2597aae9e 100755 --- a/plugins/MacVST/Mojo/source/MojoProc.cpp +++ b/plugins/MacVST/Mojo/source/MojoProc.cpp @@ -20,8 +20,8 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Monitoring/source/Monitoring.cpp b/plugins/MacVST/Monitoring/source/Monitoring.cpp index 556e27cb2..635ca615b 100755 --- a/plugins/MacVST/Monitoring/source/Monitoring.cpp +++ b/plugins/MacVST/Monitoring/source/Monitoring.cpp @@ -60,7 +60,7 @@ Monitoring::Monitoring(audioMasterCallback audioMaster) : for (int x = 0; x < 11; x++) {biquadL[x] = 0.0; biquadR[x] = 0.0;} //Bandpasses A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Monitoring/source/MonitoringProc.cpp b/plugins/MacVST/Monitoring/source/MonitoringProc.cpp index 397d31b12..385884d3c 100755 --- a/plugins/MacVST/Monitoring/source/MonitoringProc.cpp +++ b/plugins/MacVST/Monitoring/source/MonitoringProc.cpp @@ -50,8 +50,8 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/MacVST/Neverland/source/Neverland.cpp b/plugins/MacVST/Neverland/source/Neverland.cpp index e0c4d5f9e..fae1d9216 100755 --- a/plugins/MacVST/Neverland/source/Neverland.cpp +++ b/plugins/MacVST/Neverland/source/Neverland.cpp @@ -19,7 +19,7 @@ Neverland::Neverland(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Neverland/source/NeverlandProc.cpp b/plugins/MacVST/Neverland/source/NeverlandProc.cpp index 58493f8a3..02dcb04b7 100755 --- a/plugins/MacVST/Neverland/source/NeverlandProc.cpp +++ b/plugins/MacVST/Neverland/source/NeverlandProc.cpp @@ -39,8 +39,8 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -167,11 +167,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Nikola/source/Nikola.cpp b/plugins/MacVST/Nikola/source/Nikola.cpp index 001eb37ef..6938af08c 100755 --- a/plugins/MacVST/Nikola/source/Nikola.cpp +++ b/plugins/MacVST/Nikola/source/Nikola.cpp @@ -23,7 +23,7 @@ Nikola::Nikola(audioMasterCallback audioMaster) : outlevelR = 0.0; framenumberR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Nikola/source/NikolaProc.cpp b/plugins/MacVST/Nikola/source/NikolaProc.cpp index 59738686d..3c049ce59 100755 --- a/plugins/MacVST/Nikola/source/NikolaProc.cpp +++ b/plugins/MacVST/Nikola/source/NikolaProc.cpp @@ -22,8 +22,8 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -1010,11 +1010,11 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp b/plugins/MacVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp index 7727b5010..e90337260 100755 --- a/plugins/MacVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp +++ b/plugins/MacVST/NotJustAnotherDither/source/NotJustAnotherDither.cpp @@ -14,7 +14,7 @@ NotJustAnotherDither::NotJustAnotherDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bynL[0] = 1000; bynL[1] = 301; bynL[2] = 176; diff --git a/plugins/MacVST/Pafnuty/source/PafnutyProc.cpp b/plugins/MacVST/Pafnuty/source/PafnutyProc.cpp index 79d2326a1..38e2b05a3 100755 --- a/plugins/MacVST/Pafnuty/source/PafnutyProc.cpp +++ b/plugins/MacVST/Pafnuty/source/PafnutyProc.cpp @@ -61,42 +61,8 @@ void Pafnuty::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; @@ -331,42 +297,8 @@ void Pafnuty::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; diff --git a/plugins/MacVST/PaulDither/source/PaulDither.cpp b/plugins/MacVST/PaulDither/source/PaulDither.cpp index faa056409..f9a8de8b7 100755 --- a/plugins/MacVST/PaulDither/source/PaulDither.cpp +++ b/plugins/MacVST/PaulDither/source/PaulDither.cpp @@ -14,7 +14,7 @@ PaulDither::PaulDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDitherL = 0.0; previousDitherR = 0.0; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/MacVST/PeaksOnly/source/PeaksOnly.cpp b/plugins/MacVST/PeaksOnly/source/PeaksOnly.cpp index db59ae94f..73fd7bacc 100755 --- a/plugins/MacVST/PeaksOnly/source/PeaksOnly.cpp +++ b/plugins/MacVST/PeaksOnly/source/PeaksOnly.cpp @@ -14,7 +14,7 @@ PeaksOnly::PeaksOnly(audioMasterCallback audioMaster) : { for(int count = 0; count < 1502; count++) {aL[count] = 0.0; bL[count] = 0.0; cL[count] = 0.0; dL[count] = 0.0;aR[count] = 0.0; bR[count] = 0.0; cR[count] = 0.0; dR[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PeaksOnly/source/PeaksOnlyProc.cpp b/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp index 39a49e8c1..d7d4af84c 100755 --- a/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp +++ b/plugins/MacVST/PeaksOnly/source/PeaksOnlyProc.cpp @@ -28,8 +28,8 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; @@ -129,11 +129,11 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/PocketVerbs/source/PocketVerbs.cpp b/plugins/MacVST/PocketVerbs/source/PocketVerbs.cpp index 4426e4b76..f4102466c 100755 --- a/plugins/MacVST/PocketVerbs/source/PocketVerbs.cpp +++ b/plugins/MacVST/PocketVerbs/source/PocketVerbs.cpp @@ -191,7 +191,7 @@ PocketVerbs::PocketVerbs(audioMasterCallback audioMaster) : countdown = -1; peakL = 1.0; peakR = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PocketVerbs/source/PocketVerbsProc.cpp b/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp index c6ab00834..5d8a7d157 100755 --- a/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp +++ b/plugins/MacVST/PocketVerbs/source/PocketVerbsProc.cpp @@ -472,8 +472,8 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -9168,11 +9168,11 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Podcast/source/Podcast.cpp b/plugins/MacVST/Podcast/source/Podcast.cpp index a29cc27da..decf86e4d 100755 --- a/plugins/MacVST/Podcast/source/Podcast.cpp +++ b/plugins/MacVST/Podcast/source/Podcast.cpp @@ -18,7 +18,7 @@ Podcast::Podcast(audioMasterCallback audioMaster) : c1L = 2.0; c2L = 2.0; c3L = 2.0; c4L = 2.0; c5L = 2.0; //startup comp gains c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Podcast/source/PodcastProc.cpp b/plugins/MacVST/Podcast/source/PodcastProc.cpp index 4a4c4fdd6..a6bd88d45 100755 --- a/plugins/MacVST/Podcast/source/PodcastProc.cpp +++ b/plugins/MacVST/Podcast/source/PodcastProc.cpp @@ -32,8 +32,8 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -149,11 +149,11 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxe.cpp b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxe.cpp index 2b48a0d56..6765486f7 100755 --- a/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxe.cpp +++ b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxe.cpp @@ -32,7 +32,7 @@ PodcastDeluxe::PodcastDeluxe(audioMasterCallback audioMaster) : maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PodcastDeluxe/source/PodcastDeluxeProc.cpp b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp index eafe49669..2f306c079 100755 --- a/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp +++ b/plugins/MacVST/PodcastDeluxe/source/PodcastDeluxeProc.cpp @@ -47,8 +47,8 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; allpasstemp = tap1 - 1; @@ -316,11 +316,11 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Pop/source/Pop.cpp b/plugins/MacVST/Pop/source/Pop.cpp index 9ebd38106..a48aea872 100755 --- a/plugins/MacVST/Pop/source/Pop.cpp +++ b/plugins/MacVST/Pop/source/Pop.cpp @@ -15,7 +15,7 @@ Pop::Pop(audioMasterCallback audioMaster) : A = 0.3; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 10000; count++) {dL[count] = 0; dR[count] = 0;} delay = 0; diff --git a/plugins/MacVST/Pop/source/Pop.h b/plugins/MacVST/Pop/source/Pop.h index 9784b4ee5..9411334aa 100755 --- a/plugins/MacVST/Pop/source/Pop.h +++ b/plugins/MacVST/Pop/source/Pop.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double muVaryL; diff --git a/plugins/MacVST/Pop/source/PopProc.cpp b/plugins/MacVST/Pop/source/PopProc.cpp index 44e7efd3a..85422c511 100755 --- a/plugins/MacVST/Pop/source/PopProc.cpp +++ b/plugins/MacVST/Pop/source/PopProc.cpp @@ -37,8 +37,8 @@ void Pop::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/PowerSag2/source/PowerSag2.cpp b/plugins/MacVST/PowerSag2/source/PowerSag2.cpp index bcf7fdad6..2e68a9376 100755 --- a/plugins/MacVST/PowerSag2/source/PowerSag2.cpp +++ b/plugins/MacVST/PowerSag2/source/PowerSag2.cpp @@ -20,7 +20,7 @@ PowerSag2::PowerSag2(audioMasterCallback audioMaster) : A = 0.3; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PowerSag2/source/PowerSag2Proc.cpp b/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp index 69e12f697..4b637c3ff 100755 --- a/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp +++ b/plugins/MacVST/PowerSag2/source/PowerSag2Proc.cpp @@ -22,8 +22,8 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Precious/source/Precious.cpp b/plugins/MacVST/Precious/source/Precious.cpp index ee2061a86..78a045cf8 100755 --- a/plugins/MacVST/Precious/source/Precious.cpp +++ b/plugins/MacVST/Precious/source/Precious.cpp @@ -18,7 +18,7 @@ Precious::Precious(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Precious/source/PreciousProc.cpp b/plugins/MacVST/Precious/source/PreciousProc.cpp index d15680a95..a2de05c32 100755 --- a/plugins/MacVST/Precious/source/PreciousProc.cpp +++ b/plugins/MacVST/Precious/source/PreciousProc.cpp @@ -39,8 +39,8 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/PurestAir/source/PurestAir.cpp b/plugins/MacVST/PurestAir/source/PurestAir.cpp index 3314d21b2..66e9e4d72 100755 --- a/plugins/MacVST/PurestAir/source/PurestAir.cpp +++ b/plugins/MacVST/PurestAir/source/PurestAir.cpp @@ -25,7 +25,7 @@ PurestAir::PurestAir(audioMasterCallback audioMaster) : lastSampleR = 0.0; s1R = s2R = s3R = 0.0; applyR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PurestAir/source/PurestAirProc.cpp b/plugins/MacVST/PurestAir/source/PurestAirProc.cpp index 362e27217..d2df18951 100755 --- a/plugins/MacVST/PurestAir/source/PurestAirProc.cpp +++ b/plugins/MacVST/PurestAir/source/PurestAirProc.cpp @@ -25,8 +25,8 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -95,11 +95,11 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/PurestFade/source/PurestFade.cpp b/plugins/MacVST/PurestFade/source/PurestFade.cpp index 5c0fd45b4..b86eea6b7 100755 --- a/plugins/MacVST/PurestFade/source/PurestFade.cpp +++ b/plugins/MacVST/PurestFade/source/PurestFade.cpp @@ -18,7 +18,7 @@ PurestFade::PurestFade(audioMasterCallback audioMaster) : settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PurestFade/source/PurestFadeProc.cpp b/plugins/MacVST/PurestFade/source/PurestFadeProc.cpp index 31f0a9d17..98f7d8d70 100755 --- a/plugins/MacVST/PurestFade/source/PurestFadeProc.cpp +++ b/plugins/MacVST/PurestFade/source/PurestFadeProc.cpp @@ -49,8 +49,8 @@ void PurestFade::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; targetgain = pow(10.0,settingchase/20.0); //now we have the target in our temp variable diff --git a/plugins/MacVST/PurestSquish/source/PurestSquish.cpp b/plugins/MacVST/PurestSquish/source/PurestSquish.cpp index 16543c40a..1ea9b70fe 100755 --- a/plugins/MacVST/PurestSquish/source/PurestSquish.cpp +++ b/plugins/MacVST/PurestSquish/source/PurestSquish.cpp @@ -64,7 +64,7 @@ PurestSquish::PurestSquish(audioMasterCallback audioMaster) : count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/PurestSquish/source/PurestSquish.h b/plugins/MacVST/PurestSquish/source/PurestSquish.h index d5b93a9cb..a1c96fccb 100755 --- a/plugins/MacVST/PurestSquish/source/PurestSquish.h +++ b/plugins/MacVST/PurestSquish/source/PurestSquish.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/MacVST/PurestSquish/source/PurestSquishProc.cpp b/plugins/MacVST/PurestSquish/source/PurestSquishProc.cpp index 946d23963..e763aa5ce 100755 --- a/plugins/MacVST/PurestSquish/source/PurestSquishProc.cpp +++ b/plugins/MacVST/PurestSquish/source/PurestSquishProc.cpp @@ -32,42 +32,8 @@ void PurestSquish::processReplacing(float **inputs, float **outputs, VstInt32 sa double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -536,42 +502,8 @@ void PurestSquish::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/RawGlitters/source/RawGlitters.cpp b/plugins/MacVST/RawGlitters/source/RawGlitters.cpp index 30804e218..cdd0c545f 100755 --- a/plugins/MacVST/RawGlitters/source/RawGlitters.cpp +++ b/plugins/MacVST/RawGlitters/source/RawGlitters.cpp @@ -14,7 +14,7 @@ RawGlitters::RawGlitters(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/MacVST/RawTimbers/source/RawTimbers.cpp b/plugins/MacVST/RawTimbers/source/RawTimbers.cpp index 65ad02672..da85dbaf2 100755 --- a/plugins/MacVST/RawTimbers/source/RawTimbers.cpp +++ b/plugins/MacVST/RawTimbers/source/RawTimbers.cpp @@ -14,7 +14,7 @@ RawTimbers::RawTimbers(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/MacVST/Recurve/source/Recurve.cpp b/plugins/MacVST/Recurve/source/Recurve.cpp index 611289eee..a669540a9 100755 --- a/plugins/MacVST/Recurve/source/Recurve.cpp +++ b/plugins/MacVST/Recurve/source/Recurve.cpp @@ -13,7 +13,7 @@ Recurve::Recurve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Recurve/source/RecurveProc.cpp b/plugins/MacVST/Recurve/source/RecurveProc.cpp index fc20e5b25..1b56af4a1 100755 --- a/plugins/MacVST/Recurve/source/RecurveProc.cpp +++ b/plugins/MacVST/Recurve/source/RecurveProc.cpp @@ -19,8 +19,8 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -45,11 +45,11 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Remap/source/Remap.cpp b/plugins/MacVST/Remap/source/Remap.cpp index aef092060..b4663c529 100755 --- a/plugins/MacVST/Remap/source/Remap.cpp +++ b/plugins/MacVST/Remap/source/Remap.cpp @@ -15,7 +15,7 @@ Remap::Remap(audioMasterCallback audioMaster) : A = 0.5; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Remap/source/RemapProc.cpp b/plugins/MacVST/Remap/source/RemapProc.cpp index b9227743f..32bb5b9e6 100755 --- a/plugins/MacVST/Remap/source/RemapProc.cpp +++ b/plugins/MacVST/Remap/source/RemapProc.cpp @@ -23,8 +23,8 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -64,11 +64,11 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/ResEQ/source/ResEQ.cpp b/plugins/MacVST/ResEQ/source/ResEQ.cpp index 37a7b4244..feffbda53 100755 --- a/plugins/MacVST/ResEQ/source/ResEQ.cpp +++ b/plugins/MacVST/ResEQ/source/ResEQ.cpp @@ -26,7 +26,7 @@ ResEQ::ResEQ(audioMasterCallback audioMaster) : bR[count] = 0.0; fR[count] = 0.0; } framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/ResEQ/source/ResEQProc.cpp b/plugins/MacVST/ResEQ/source/ResEQProc.cpp index c9c21c0dd..22c389843 100755 --- a/plugins/MacVST/ResEQ/source/ResEQProc.cpp +++ b/plugins/MacVST/ResEQ/source/ResEQProc.cpp @@ -130,8 +130,8 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -284,11 +284,11 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Slew3/source/Slew3.cpp b/plugins/MacVST/Slew3/source/Slew3.cpp index 03a8dc410..5bf29f586 100755 --- a/plugins/MacVST/Slew3/source/Slew3.cpp +++ b/plugins/MacVST/Slew3/source/Slew3.cpp @@ -15,7 +15,7 @@ Slew3::Slew3(audioMasterCallback audioMaster) : A = 0.0; lastSampleAL = lastSampleBL = lastSampleCL = 0.0; lastSampleAR = lastSampleBR = lastSampleCR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Slew3/source/Slew3Proc.cpp b/plugins/MacVST/Slew3/source/Slew3Proc.cpp index 18177c5ea..297a4f6e3 100755 --- a/plugins/MacVST/Slew3/source/Slew3Proc.cpp +++ b/plugins/MacVST/Slew3/source/Slew3Proc.cpp @@ -24,8 +24,8 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //begin L double clamp = (lastSampleBL - lastSampleCL) * 0.381966011250105; @@ -63,11 +63,11 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/Smooth/source/Smooth.cpp b/plugins/MacVST/Smooth/source/Smooth.cpp index a8b656ff3..6509d2aeb 100755 --- a/plugins/MacVST/Smooth/source/Smooth.cpp +++ b/plugins/MacVST/Smooth/source/Smooth.cpp @@ -38,7 +38,7 @@ Smooth::Smooth(audioMasterCallback audioMaster) : lastSampleER = 0.0; gainER = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Smooth/source/SmoothProc.cpp b/plugins/MacVST/Smooth/source/SmoothProc.cpp index 81df54143..9d532987c 100755 --- a/plugins/MacVST/Smooth/source/SmoothProc.cpp +++ b/plugins/MacVST/Smooth/source/SmoothProc.cpp @@ -31,42 +31,8 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -176,11 +142,11 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -217,42 +183,8 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/SoftGate/source/SoftGate.cpp b/plugins/MacVST/SoftGate/source/SoftGate.cpp index aae0129b0..4db4f8f2f 100755 --- a/plugins/MacVST/SoftGate/source/SoftGate.cpp +++ b/plugins/MacVST/SoftGate/source/SoftGate.cpp @@ -20,7 +20,7 @@ SoftGate::SoftGate(audioMasterCallback audioMaster) : storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/SoftGate/source/SoftGateProc.cpp b/plugins/MacVST/SoftGate/source/SoftGateProc.cpp index ba8d6358c..f08b9563c 100755 --- a/plugins/MacVST/SoftGate/source/SoftGateProc.cpp +++ b/plugins/MacVST/SoftGate/source/SoftGateProc.cpp @@ -28,8 +28,8 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; @@ -59,11 +59,11 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/SpatializeDither/source/SpatializeDither.cpp b/plugins/MacVST/SpatializeDither/source/SpatializeDither.cpp index 68cac32e0..e4ebc5549 100755 --- a/plugins/MacVST/SpatializeDither/source/SpatializeDither.cpp +++ b/plugins/MacVST/SpatializeDither/source/SpatializeDither.cpp @@ -14,7 +14,7 @@ SpatializeDither::SpatializeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; contingentErrL = 0.0; contingentErrR = 0.0; flip = false; diff --git a/plugins/MacVST/Spiral/source/Spiral.cpp b/plugins/MacVST/Spiral/source/Spiral.cpp index 9a1c0bec3..88106caf6 100755 --- a/plugins/MacVST/Spiral/source/Spiral.cpp +++ b/plugins/MacVST/Spiral/source/Spiral.cpp @@ -12,7 +12,7 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new S Spiral::Spiral(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Spiral/source/Spiral.h b/plugins/MacVST/Spiral/source/Spiral.h index f20476204..439f7cecc 100755 --- a/plugins/MacVST/Spiral/source/Spiral.h +++ b/plugins/MacVST/Spiral/source/Spiral.h @@ -51,7 +51,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff }; diff --git a/plugins/MacVST/Spiral/source/SpiralProc.cpp b/plugins/MacVST/Spiral/source/SpiralProc.cpp index f672d63d1..5e75e82c4 100755 --- a/plugins/MacVST/Spiral/source/SpiralProc.cpp +++ b/plugins/MacVST/Spiral/source/SpiralProc.cpp @@ -19,8 +19,8 @@ void Spiral::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //clip to 1.2533141373155 to reach maximum output diff --git a/plugins/MacVST/Spiral2/source/Spiral2.cpp b/plugins/MacVST/Spiral2/source/Spiral2.cpp index 44703eeb4..4d1f8bb1e 100755 --- a/plugins/MacVST/Spiral2/source/Spiral2.cpp +++ b/plugins/MacVST/Spiral2/source/Spiral2.cpp @@ -20,7 +20,7 @@ Spiral2::Spiral2(audioMasterCallback audioMaster) : iirSampleAL = 0.0; iirSampleBL = 0.0; prevSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAR = 0.0; iirSampleBR = 0.0; diff --git a/plugins/MacVST/Spiral2/source/Spiral2.h b/plugins/MacVST/Spiral2/source/Spiral2.h index 7da43323c..3f64ec340 100755 --- a/plugins/MacVST/Spiral2/source/Spiral2.h +++ b/plugins/MacVST/Spiral2/source/Spiral2.h @@ -59,7 +59,8 @@ private: double iirSampleAL; double iirSampleBL; double prevSampleL; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double iirSampleAR; double iirSampleBR; diff --git a/plugins/MacVST/Spiral2/source/Spiral2Proc.cpp b/plugins/MacVST/Spiral2/source/Spiral2Proc.cpp index 36f15560c..d29127db5 100755 --- a/plugins/MacVST/Spiral2/source/Spiral2Proc.cpp +++ b/plugins/MacVST/Spiral2/source/Spiral2Proc.cpp @@ -29,8 +29,8 @@ void Spiral2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/TPDFDither/source/TPDFDither.cpp b/plugins/MacVST/TPDFDither/source/TPDFDither.cpp index 6ba4c807d..2e8df5daa 100755 --- a/plugins/MacVST/TPDFDither/source/TPDFDither.cpp +++ b/plugins/MacVST/TPDFDither/source/TPDFDither.cpp @@ -14,7 +14,7 @@ TPDFDither::TPDFDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. diff --git a/plugins/MacVST/Tape/source/Tape.cpp b/plugins/MacVST/Tape/source/Tape.cpp index a34d8b788..8631f6bf1 100755 --- a/plugins/MacVST/Tape/source/Tape.cpp +++ b/plugins/MacVST/Tape/source/Tape.cpp @@ -29,7 +29,7 @@ Tape::Tape(audioMasterCallback audioMaster) : flip = false; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Tape/source/TapeProc.cpp b/plugins/MacVST/Tape/source/TapeProc.cpp index 4d498b2cd..2f26675ed 100755 --- a/plugins/MacVST/Tape/source/TapeProc.cpp +++ b/plugins/MacVST/Tape/source/TapeProc.cpp @@ -47,8 +47,8 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -269,11 +269,11 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/TapeDelay/source/TapeDelayProc.cpp b/plugins/MacVST/TapeDelay/source/TapeDelayProc.cpp index ef32867b9..6f42b02ff 100755 --- a/plugins/MacVST/TapeDelay/source/TapeDelayProc.cpp +++ b/plugins/MacVST/TapeDelay/source/TapeDelayProc.cpp @@ -38,42 +38,8 @@ void TapeDelay::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -205,42 +171,8 @@ void TapeDelay::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/MacVST/TapeDither/source/TapeDither.cpp b/plugins/MacVST/TapeDither/source/TapeDither.cpp index f9ba70917..be85fcdb2 100755 --- a/plugins/MacVST/TapeDither/source/TapeDither.cpp +++ b/plugins/MacVST/TapeDither/source/TapeDither.cpp @@ -14,7 +14,7 @@ TapeDither::TapeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDither1L = 0.0; previousDither2L = 0.0; previousDither3L = 0.0; diff --git a/plugins/MacVST/TapeFat/source/TapeFatProc.cpp b/plugins/MacVST/TapeFat/source/TapeFatProc.cpp index 7d0e52a57..1411a1454 100755 --- a/plugins/MacVST/TapeFat/source/TapeFatProc.cpp +++ b/plugins/MacVST/TapeFat/source/TapeFatProc.cpp @@ -28,42 +28,8 @@ void TapeFat::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -159,42 +125,8 @@ void TapeFat::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/MacVST/ToTape6/source/ToTape6.cpp b/plugins/MacVST/ToTape6/source/ToTape6.cpp index d9dd27d8d..741b7565e 100755 --- a/plugins/MacVST/ToTape6/source/ToTape6.cpp +++ b/plugins/MacVST/ToTape6/source/ToTape6.cpp @@ -43,7 +43,7 @@ ToTape6::ToTape6(audioMasterCallback audioMaster) : lastSampleR = 0.0; flip = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/ToTape6/source/ToTape6Proc.cpp b/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp index 49e72323b..f3a052485 100755 --- a/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp +++ b/plugins/MacVST/ToTape6/source/ToTape6Proc.cpp @@ -56,8 +56,8 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,11 +324,11 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/TremoSquare/source/TremoSquare.cpp b/plugins/MacVST/TremoSquare/source/TremoSquare.cpp index 29422d4f1..e854b11ac 100755 --- a/plugins/MacVST/TremoSquare/source/TremoSquare.cpp +++ b/plugins/MacVST/TremoSquare/source/TremoSquare.cpp @@ -19,7 +19,7 @@ TremoSquare::TremoSquare(audioMasterCallback audioMaster) : muteL = false; polarityR = false; muteR = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/TremoSquare/source/TremoSquareProc.cpp b/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp index 1c627a8e6..ec7d1b27b 100755 --- a/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp +++ b/plugins/MacVST/TremoSquare/source/TremoSquareProc.cpp @@ -25,8 +25,8 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/TripleSpread/source/TripleSpread.cpp b/plugins/MacVST/TripleSpread/source/TripleSpread.cpp index 736b3f379..7e4926290 100755 --- a/plugins/MacVST/TripleSpread/source/TripleSpread.cpp +++ b/plugins/MacVST/TripleSpread/source/TripleSpread.cpp @@ -51,7 +51,7 @@ TripleSpread::TripleSpread(audioMasterCallback audioMaster) : A = 0.5; B = 0.5; C = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/TripleSpread/source/TripleSpreadProc.cpp b/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp index 6bd70e790..ef7721197 100755 --- a/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp +++ b/plugins/MacVST/TripleSpread/source/TripleSpreadProc.cpp @@ -23,8 +23,8 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -309,11 +309,11 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -342,8 +342,8 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Ultrasonic/source/Ultrasonic.cpp b/plugins/MacVST/Ultrasonic/source/Ultrasonic.cpp index 6c0b6fc6f..e58027991 100755 --- a/plugins/MacVST/Ultrasonic/source/Ultrasonic.cpp +++ b/plugins/MacVST/Ultrasonic/source/Ultrasonic.cpp @@ -13,7 +13,7 @@ Ultrasonic::Ultrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Ultrasonic/source/UltrasonicProc.cpp b/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp index 0bb52e5e0..96ee029c7 100755 --- a/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp +++ b/plugins/MacVST/Ultrasonic/source/UltrasonicProc.cpp @@ -65,8 +65,8 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp b/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp index 8bf48c273..cbce9a998 100755 --- a/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp +++ b/plugins/MacVST/UltrasonicLite/source/UltrasonicLiteProc.cpp @@ -30,8 +30,8 @@ void UltrasonicLite::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -41,11 +41,11 @@ void UltrasonicLite::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp b/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp index 152e5b0ce..8e3cb8250 100755 --- a/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp +++ b/plugins/MacVST/UltrasonicMed/source/UltrasonicMedProc.cpp @@ -43,8 +43,8 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -60,11 +60,11 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/UnBox/source/UnBox.cpp b/plugins/MacVST/UnBox/source/UnBox.cpp index 7916ea55e..221f617d6 100755 --- a/plugins/MacVST/UnBox/source/UnBox.cpp +++ b/plugins/MacVST/UnBox/source/UnBox.cpp @@ -23,7 +23,7 @@ UnBox::UnBox(audioMasterCallback audioMaster) : iirSampleAR = 0.0; iirSampleBR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/UnBox/source/UnBox.h b/plugins/MacVST/UnBox/source/UnBox.h index 0de78a63d..838b6062e 100755 --- a/plugins/MacVST/UnBox/source/UnBox.h +++ b/plugins/MacVST/UnBox/source/UnBox.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double aL[5]; double bL[5]; diff --git a/plugins/MacVST/UnBox/source/UnBoxProc.cpp b/plugins/MacVST/UnBox/source/UnBoxProc.cpp index e45e21e08..7ebfc88fe 100755 --- a/plugins/MacVST/UnBox/source/UnBoxProc.cpp +++ b/plugins/MacVST/UnBox/source/UnBoxProc.cpp @@ -73,8 +73,8 @@ void UnBox::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (input != 1.0) {inputSampleL *= input; inputSampleR *= input;} - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/MacVST/Vibrato/source/Vibrato.cpp b/plugins/MacVST/Vibrato/source/Vibrato.cpp index 6ea3c86d2..6b32cea10 100755 --- a/plugins/MacVST/Vibrato/source/Vibrato.cpp +++ b/plugins/MacVST/Vibrato/source/Vibrato.cpp @@ -34,7 +34,7 @@ Vibrato::Vibrato(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/Vibrato/source/VibratoProc.cpp b/plugins/MacVST/Vibrato/source/VibratoProc.cpp index 150da0987..f196e90e2 100755 --- a/plugins/MacVST/Vibrato/source/VibratoProc.cpp +++ b/plugins/MacVST/Vibrato/source/VibratoProc.cpp @@ -24,8 +24,8 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -88,11 +88,11 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/VinylDither/source/VinylDither.cpp b/plugins/MacVST/VinylDither/source/VinylDither.cpp index 2d719fd56..9123d5431 100755 --- a/plugins/MacVST/VinylDither/source/VinylDither.cpp +++ b/plugins/MacVST/VinylDither/source/VinylDither.cpp @@ -14,7 +14,7 @@ VinylDither::VinylDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; NSOddL = 0.0; prevL = 0.0; nsL[0] = 0; diff --git a/plugins/MacVST/VoiceTrick/source/VoiceTrick.cpp b/plugins/MacVST/VoiceTrick/source/VoiceTrick.cpp index ee066c80d..1553a504a 100755 --- a/plugins/MacVST/VoiceTrick/source/VoiceTrick.cpp +++ b/plugins/MacVST/VoiceTrick/source/VoiceTrick.cpp @@ -23,7 +23,7 @@ VoiceTrick::VoiceTrick(audioMasterCallback audioMaster) : lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/VoiceTrick/source/VoiceTrickProc.cpp b/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp index 0de1f49ae..53ecb0fff 100755 --- a/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp +++ b/plugins/MacVST/VoiceTrick/source/VoiceTrickProc.cpp @@ -25,8 +25,8 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -93,11 +93,11 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/curve/source/curve.cpp b/plugins/MacVST/curve/source/curve.cpp index c814f421d..8c4e78f40 100755 --- a/plugins/MacVST/curve/source/curve.cpp +++ b/plugins/MacVST/curve/source/curve.cpp @@ -13,7 +13,7 @@ curve::curve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/curve/source/curveProc.cpp b/plugins/MacVST/curve/source/curveProc.cpp index 3a3f18b86..1b607c120 100755 --- a/plugins/MacVST/curve/source/curveProc.cpp +++ b/plugins/MacVST/curve/source/curveProc.cpp @@ -19,8 +19,8 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -39,11 +39,11 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/MacVST/uLawDecode/source/uLawDecodeProc.cpp b/plugins/MacVST/uLawDecode/source/uLawDecodeProc.cpp index 0c0ee1f1f..45a85c80a 100755 --- a/plugins/MacVST/uLawDecode/source/uLawDecodeProc.cpp +++ b/plugins/MacVST/uLawDecode/source/uLawDecodeProc.cpp @@ -27,42 +27,8 @@ void uLawDecode::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -127,42 +93,8 @@ void uLawDecode::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/ADT/ADT.cpp b/plugins/WinVST/ADT/ADT.cpp index b05be403d..34db6d535 100755 --- a/plugins/WinVST/ADT/ADT.cpp +++ b/plugins/WinVST/ADT/ADT.cpp @@ -24,7 +24,7 @@ ADT::ADT(audioMasterCallback audioMaster) : offsetB = 9001; // :D gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/ADT/ADT.h b/plugins/WinVST/ADT/ADT.h index 4ada4659d..113e371d9 100755 --- a/plugins/WinVST/ADT/ADT.h +++ b/plugins/WinVST/ADT/ADT.h @@ -64,7 +64,8 @@ private: double offsetB; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/WinVST/ADT/ADTProc.cpp b/plugins/WinVST/ADT/ADTProc.cpp index 555f0877e..1d113ad8e 100755 --- a/plugins/WinVST/ADT/ADTProc.cpp +++ b/plugins/WinVST/ADT/ADTProc.cpp @@ -32,8 +32,8 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + 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; diff --git a/plugins/WinVST/Apicolypse/Apicolypse.cpp b/plugins/WinVST/Apicolypse/Apicolypse.cpp index b5f4179a9..8c9d15ec5 100755 --- a/plugins/WinVST/Apicolypse/Apicolypse.cpp +++ b/plugins/WinVST/Apicolypse/Apicolypse.cpp @@ -19,7 +19,7 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Apicolypse/ApicolypseProc.cpp b/plugins/WinVST/Apicolypse/ApicolypseProc.cpp index bc9e99ab5..c0b954717 100755 --- a/plugins/WinVST/Apicolypse/ApicolypseProc.cpp +++ b/plugins/WinVST/Apicolypse/ApicolypseProc.cpp @@ -39,8 +39,8 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -166,11 +166,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/AtmosphereBuss/AtmosphereBussProc.cpp b/plugins/WinVST/AtmosphereBuss/AtmosphereBussProc.cpp index add056764..6a5a9a9ba 100755 --- a/plugins/WinVST/AtmosphereBuss/AtmosphereBussProc.cpp +++ b/plugins/WinVST/AtmosphereBuss/AtmosphereBussProc.cpp @@ -50,42 +50,8 @@ void AtmosphereBuss::processReplacing(float **inputs, float **outputs, VstInt32 inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -311,42 +277,8 @@ void AtmosphereBuss::processDoubleReplacing(double **inputs, double **outputs, V inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/WinVST/AtmosphereChannel/AtmosphereChannelProc.cpp b/plugins/WinVST/AtmosphereChannel/AtmosphereChannelProc.cpp index 763853004..92a6a7318 100755 --- a/plugins/WinVST/AtmosphereChannel/AtmosphereChannelProc.cpp +++ b/plugins/WinVST/AtmosphereChannel/AtmosphereChannelProc.cpp @@ -50,42 +50,8 @@ void AtmosphereChannel::processReplacing(float **inputs, float **outputs, VstInt inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; @@ -306,42 +272,8 @@ void AtmosphereChannel::processDoubleReplacing(double **inputs, double **outputs inputSampleL = *in1; inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; chasespeed *= 0.9999; chasespeed -= 0.01; diff --git a/plugins/WinVST/AverMatrix/AverMatrix.cpp b/plugins/WinVST/AverMatrix/AverMatrix.cpp index 585bd857a..e2e346a0f 100755 --- a/plugins/WinVST/AverMatrix/AverMatrix.cpp +++ b/plugins/WinVST/AverMatrix/AverMatrix.cpp @@ -22,7 +22,7 @@ AverMatrix::AverMatrix(audioMasterCallback audioMaster) : } } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/AverMatrix/AverMatrixProc.cpp b/plugins/WinVST/AverMatrix/AverMatrixProc.cpp index af0105057..c04b2ced4 100755 --- a/plugins/WinVST/AverMatrix/AverMatrixProc.cpp +++ b/plugins/WinVST/AverMatrix/AverMatrixProc.cpp @@ -50,8 +50,8 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -81,11 +81,11 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BassAmp/BassAmp.cpp b/plugins/WinVST/BassAmp/BassAmp.cpp index 506531cf6..330f7ac10 100755 --- a/plugins/WinVST/BassAmp/BassAmp.cpp +++ b/plugins/WinVST/BassAmp/BassAmp.cpp @@ -135,7 +135,7 @@ BassAmp::BassAmp(audioMasterCallback audioMaster) : ataK3 = 0.114; //add raw to interpolated dry, toughens ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0 ataK5 = 0.122; //subtract this much prev. diff sample, brightens - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BassDrive/BassDrive.cpp b/plugins/WinVST/BassDrive/BassDrive.cpp index 81f611e82..fd327fac1 100755 --- a/plugins/WinVST/BassDrive/BassDrive.cpp +++ b/plugins/WinVST/BassDrive/BassDrive.cpp @@ -56,7 +56,7 @@ BassDrive::BassDrive(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BassDrive/BassDriveProc.cpp b/plugins/WinVST/BassDrive/BassDriveProc.cpp index 68f67e7f7..8575a9e62 100755 --- a/plugins/WinVST/BassDrive/BassDriveProc.cpp +++ b/plugins/WinVST/BassDrive/BassDriveProc.cpp @@ -27,8 +27,8 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sumL = 0.0; sumR = 0.0; @@ -314,11 +314,11 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BassKit/BassKitProc.cpp b/plugins/WinVST/BassKit/BassKitProc.cpp index 3044c5cec..620b4449d 100755 --- a/plugins/WinVST/BassKit/BassKitProc.cpp +++ b/plugins/WinVST/BassKit/BassKitProc.cpp @@ -36,42 +36,8 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; @@ -252,42 +218,8 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; ataLowpass = (inputSampleL + inputSampleR) / 2.0; iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA; diff --git a/plugins/WinVST/Baxandall/Baxandall.cpp b/plugins/WinVST/Baxandall/Baxandall.cpp index d27affada..55be20100 100755 --- a/plugins/WinVST/Baxandall/Baxandall.cpp +++ b/plugins/WinVST/Baxandall/Baxandall.cpp @@ -26,7 +26,7 @@ Baxandall::Baxandall(audioMasterCallback audioMaster) : bassBR[x] = 0.0; } flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Baxandall/BaxandallProc.cpp b/plugins/WinVST/Baxandall/BaxandallProc.cpp index f52cba8ec..772a7cadc 100755 --- a/plugins/WinVST/Baxandall/BaxandallProc.cpp +++ b/plugins/WinVST/Baxandall/BaxandallProc.cpp @@ -47,8 +47,8 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (output != 1.0) { inputSampleL *= output; @@ -127,11 +127,11 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Beam/Beam.cpp b/plugins/WinVST/Beam/Beam.cpp index 183b5e57b..a1adf4a2f 100755 --- a/plugins/WinVST/Beam/Beam.cpp +++ b/plugins/WinVST/Beam/Beam.cpp @@ -19,7 +19,7 @@ Beam::Beam(audioMasterCallback audioMaster) : lastSampleL[count] = 0; lastSampleR[count] = 0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Biquad/Biquad.cpp b/plugins/WinVST/Biquad/Biquad.cpp index b6196911e..fbcf8b446 100755 --- a/plugins/WinVST/Biquad/Biquad.cpp +++ b/plugins/WinVST/Biquad/Biquad.cpp @@ -17,7 +17,7 @@ Biquad::Biquad(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Biquad/BiquadProc.cpp b/plugins/WinVST/Biquad/BiquadProc.cpp index cff2485a6..f872c60ca 100755 --- a/plugins/WinVST/Biquad/BiquadProc.cpp +++ b/plugins/WinVST/Biquad/BiquadProc.cpp @@ -90,8 +90,8 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -147,11 +147,11 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Biquad2/Biquad2.cpp b/plugins/WinVST/Biquad2/Biquad2.cpp index 83e1664e0..7b9d33802 100755 --- a/plugins/WinVST/Biquad2/Biquad2.cpp +++ b/plugins/WinVST/Biquad2/Biquad2.cpp @@ -30,7 +30,7 @@ Biquad2::Biquad2(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; E = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Biquad2/Biquad2Proc.cpp b/plugins/WinVST/Biquad2/Biquad2Proc.cpp index 9e9d6bce8..db8d29571 100755 --- a/plugins/WinVST/Biquad2/Biquad2Proc.cpp +++ b/plugins/WinVST/Biquad2/Biquad2Proc.cpp @@ -81,8 +81,8 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -202,11 +202,11 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BiquadDouble/BiquadDouble.cpp b/plugins/WinVST/BiquadDouble/BiquadDouble.cpp index 64c7b188e..aaacd15b4 100755 --- a/plugins/WinVST/BiquadDouble/BiquadDouble.cpp +++ b/plugins/WinVST/BiquadDouble/BiquadDouble.cpp @@ -17,7 +17,7 @@ BiquadDouble::BiquadDouble(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BiquadDouble/BiquadDoubleProc.cpp b/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp index 055743d43..a0a47f4f4 100755 --- a/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp +++ b/plugins/WinVST/BiquadDouble/BiquadDoubleProc.cpp @@ -91,8 +91,8 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -138,11 +138,11 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BiquadOneHalf/BiquadOneHalf.cpp b/plugins/WinVST/BiquadOneHalf/BiquadOneHalf.cpp index c3a11e1ec..ee0943339 100755 --- a/plugins/WinVST/BiquadOneHalf/BiquadOneHalf.cpp +++ b/plugins/WinVST/BiquadOneHalf/BiquadOneHalf.cpp @@ -18,7 +18,7 @@ BiquadOneHalf::BiquadOneHalf(audioMasterCallback audioMaster) : B = 0.0; C = 0.0; D = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp b/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp index 87d9763c1..001a00ee1 100755 --- a/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp +++ b/plugins/WinVST/BiquadOneHalf/BiquadOneHalfProc.cpp @@ -89,8 +89,8 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -142,11 +142,11 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BiquadTriple/BiquadTriple.cpp b/plugins/WinVST/BiquadTriple/BiquadTriple.cpp index ce850841d..a56973eca 100755 --- a/plugins/WinVST/BiquadTriple/BiquadTriple.cpp +++ b/plugins/WinVST/BiquadTriple/BiquadTriple.cpp @@ -17,7 +17,7 @@ BiquadTriple::BiquadTriple(audioMasterCallback audioMaster) : B = 0.5; C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BiquadTriple/BiquadTripleProc.cpp b/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp index 84ee1b7f5..84b05ed53 100755 --- a/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp +++ b/plugins/WinVST/BiquadTriple/BiquadTripleProc.cpp @@ -92,8 +92,8 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -150,11 +150,11 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BitGlitter/BitGlitter.cpp b/plugins/WinVST/BitGlitter/BitGlitter.cpp index 438ce6452..88aedaddb 100755 --- a/plugins/WinVST/BitGlitter/BitGlitter.cpp +++ b/plugins/WinVST/BitGlitter/BitGlitter.cpp @@ -17,7 +17,7 @@ BitGlitter::BitGlitter(audioMasterCallback audioMaster) : C = 0.5; D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; ataLastSampleL = 0.0; ataHalfwaySampleL = 0.0; diff --git a/plugins/WinVST/BitGlitter/BitGlitter.h b/plugins/WinVST/BitGlitter/BitGlitter.h index 999920767..2f0702e5a 100755 --- a/plugins/WinVST/BitGlitter/BitGlitter.h +++ b/plugins/WinVST/BitGlitter/BitGlitter.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double ataLastSampleL; double ataHalfwaySampleL; diff --git a/plugins/WinVST/BitGlitter/BitGlitterProc.cpp b/plugins/WinVST/BitGlitter/BitGlitterProc.cpp index 38afa37d9..066b93811 100755 --- a/plugins/WinVST/BitGlitter/BitGlitterProc.cpp +++ b/plugins/WinVST/BitGlitter/BitGlitterProc.cpp @@ -34,8 +34,8 @@ void BitGlitter::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/BlockParty/BlockParty.cpp b/plugins/WinVST/BlockParty/BlockParty.cpp index 31cc75597..fd9e2ff39 100755 --- a/plugins/WinVST/BlockParty/BlockParty.cpp +++ b/plugins/WinVST/BlockParty/BlockParty.cpp @@ -14,7 +14,7 @@ BlockParty::BlockParty(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; muSpeedAL = 10000; muSpeedBL = 10000; diff --git a/plugins/WinVST/BlockParty/BlockParty.h b/plugins/WinVST/BlockParty/BlockParty.h index afcc9739a..006e9dfd0 100755 --- a/plugins/WinVST/BlockParty/BlockParty.h +++ b/plugins/WinVST/BlockParty/BlockParty.h @@ -53,7 +53,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/WinVST/BlockParty/BlockPartyProc.cpp b/plugins/WinVST/BlockParty/BlockPartyProc.cpp index 37c3a6545..42d2924fe 100755 --- a/plugins/WinVST/BlockParty/BlockPartyProc.cpp +++ b/plugins/WinVST/BlockParty/BlockPartyProc.cpp @@ -32,42 +32,8 @@ void BlockParty::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -593,42 +559,8 @@ void BlockParty::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/BrassRider/BrassRider.cpp b/plugins/WinVST/BrassRider/BrassRider.cpp index 3c6ac09ce..ff0fdb80d 100755 --- a/plugins/WinVST/BrassRider/BrassRider.cpp +++ b/plugins/WinVST/BrassRider/BrassRider.cpp @@ -30,7 +30,7 @@ BrassRider::BrassRider(audioMasterCallback audioMaster) : lastSampleR = 0.0; lastSlewR = 0.0; gcount = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BrassRider/BrassRiderProc.cpp b/plugins/WinVST/BrassRider/BrassRiderProc.cpp index 449a965fc..b53db95e5 100755 --- a/plugins/WinVST/BrassRider/BrassRiderProc.cpp +++ b/plugins/WinVST/BrassRider/BrassRiderProc.cpp @@ -24,42 +24,8 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -132,11 +98,11 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -166,42 +132,8 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/BrightAmbience/BrightAmbience.cpp b/plugins/WinVST/BrightAmbience/BrightAmbience.cpp index 0a5e13f5b..afa450178 100755 --- a/plugins/WinVST/BrightAmbience/BrightAmbience.cpp +++ b/plugins/WinVST/BrightAmbience/BrightAmbience.cpp @@ -17,7 +17,7 @@ BrightAmbience::BrightAmbience(audioMasterCallback audioMaster) : A = 0.0; B = 0.0; C = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BrightAmbience/BrightAmbienceProc.cpp b/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp index dc4ecd233..69a6193b7 100755 --- a/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp +++ b/plugins/WinVST/BrightAmbience/BrightAmbienceProc.cpp @@ -25,8 +25,8 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 12680) {gcount = 12680;} count = gcount; @@ -322,11 +322,11 @@ void BrightAmbience::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/BrightAmbience2/BrightAmbience2.cpp b/plugins/WinVST/BrightAmbience2/BrightAmbience2.cpp index a89300ea2..65f5728bc 100755 --- a/plugins/WinVST/BrightAmbience2/BrightAmbience2.cpp +++ b/plugins/WinVST/BrightAmbience2/BrightAmbience2.cpp @@ -19,7 +19,7 @@ BrightAmbience2::BrightAmbience2(audioMasterCallback audioMaster) : B = 0.2; C = 0.0; D = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp b/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp index 95daad017..1e9b85c8b 100755 --- a/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp +++ b/plugins/WinVST/BrightAmbience2/BrightAmbience2Proc.cpp @@ -24,8 +24,8 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; double tempL = 0.0; @@ -58,11 +58,11 @@ void BrightAmbience2::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Calibre/Calibre.cpp b/plugins/WinVST/Calibre/Calibre.cpp index 214f85ea4..5bf269d0b 100755 --- a/plugins/WinVST/Calibre/Calibre.cpp +++ b/plugins/WinVST/Calibre/Calibre.cpp @@ -18,7 +18,7 @@ Calibre::Calibre(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Calibre/CalibreProc.cpp b/plugins/WinVST/Calibre/CalibreProc.cpp index 14350eff2..b51ae2d14 100755 --- a/plugins/WinVST/Calibre/CalibreProc.cpp +++ b/plugins/WinVST/Calibre/CalibreProc.cpp @@ -39,8 +39,8 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Capacitor2/Capacitor2.cpp b/plugins/WinVST/Capacitor2/Capacitor2.cpp index 406621915..9dec180d3 100755 --- a/plugins/WinVST/Capacitor2/Capacitor2.cpp +++ b/plugins/WinVST/Capacitor2/Capacitor2.cpp @@ -52,7 +52,7 @@ Capacitor2::Capacitor2(audioMasterCallback audioMaster) : lastHighpass = 1000.0; lastWet = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Capacitor2/Capacitor2Proc.cpp b/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp index 899aaaa4a..5bd961e2d 100755 --- a/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp +++ b/plugins/WinVST/Capacitor2/Capacitor2Proc.cpp @@ -32,8 +32,8 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -153,11 +153,11 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Channel5/Channel5Proc.cpp b/plugins/WinVST/Channel5/Channel5Proc.cpp index b029d9303..5d25c69e4 100755 --- a/plugins/WinVST/Channel5/Channel5Proc.cpp +++ b/plugins/WinVST/Channel5/Channel5Proc.cpp @@ -26,42 +26,8 @@ void Channel5::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { @@ -161,42 +127,8 @@ void Channel5::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (fpFlip) { diff --git a/plugins/WinVST/Channel6/Channel6.cpp b/plugins/WinVST/Channel6/Channel6.cpp index 0ad6eddd0..80e17af19 100755 --- a/plugins/WinVST/Channel6/Channel6.cpp +++ b/plugins/WinVST/Channel6/Channel6.cpp @@ -15,7 +15,7 @@ Channel6::Channel6(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/WinVST/Channel6/Channel6.h b/plugins/WinVST/Channel6/Channel6.h index 3945cecbf..ddca3e3ae 100755 --- a/plugins/WinVST/Channel6/Channel6.h +++ b/plugins/WinVST/Channel6/Channel6.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double iirSampleLA; double iirSampleRA; diff --git a/plugins/WinVST/Channel6/Channel6Proc.cpp b/plugins/WinVST/Channel6/Channel6Proc.cpp index 777666f14..ad228a8e8 100755 --- a/plugins/WinVST/Channel6/Channel6Proc.cpp +++ b/plugins/WinVST/Channel6/Channel6Proc.cpp @@ -26,8 +26,8 @@ void Channel6::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) diff --git a/plugins/WinVST/Channel7/Channel7.cpp b/plugins/WinVST/Channel7/Channel7.cpp index ba73bf565..1b753f1cd 100755 --- a/plugins/WinVST/Channel7/Channel7.cpp +++ b/plugins/WinVST/Channel7/Channel7.cpp @@ -15,7 +15,7 @@ Channel7::Channel7(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/WinVST/Channel7/Channel7Proc.cpp b/plugins/WinVST/Channel7/Channel7Proc.cpp index e9e9a6852..bb42ba20a 100755 --- a/plugins/WinVST/Channel7/Channel7Proc.cpp +++ b/plugins/WinVST/Channel7/Channel7Proc.cpp @@ -28,8 +28,8 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (flip) { @@ -96,11 +96,11 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Channel8/Channel8.cpp b/plugins/WinVST/Channel8/Channel8.cpp index c13fd7c96..3678965d6 100755 --- a/plugins/WinVST/Channel8/Channel8.cpp +++ b/plugins/WinVST/Channel8/Channel8.cpp @@ -15,7 +15,7 @@ Channel8::Channel8(audioMasterCallback audioMaster) : consoletype = 0.0; drive = 0.0; output = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleLA = 0.0; iirSampleRA = 0.0; iirSampleLB = 0.0; diff --git a/plugins/WinVST/Channel8/Channel8Proc.cpp b/plugins/WinVST/Channel8/Channel8Proc.cpp index afb1a48fe..f62bed44f 100755 --- a/plugins/WinVST/Channel8/Channel8Proc.cpp +++ b/plugins/WinVST/Channel8/Channel8Proc.cpp @@ -29,8 +29,8 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double dielectricScaleL = fabs(2.0-((inputSampleL+nonLin)/nonLin)); double dielectricScaleR = fabs(2.0-((inputSampleR+nonLin)/nonLin)); @@ -120,11 +120,11 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/ChromeOxide/ChromeOxide.cpp b/plugins/WinVST/ChromeOxide/ChromeOxide.cpp index 40cc31966..183fa9079 100755 --- a/plugins/WinVST/ChromeOxide/ChromeOxide.cpp +++ b/plugins/WinVST/ChromeOxide/ChromeOxide.cpp @@ -31,7 +31,7 @@ ChromeOxide::ChromeOxide(audioMasterCallback audioMaster) : flip = false; A = 0.5; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/ChromeOxide/ChromeOxideProc.cpp b/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp index be036a80e..873c535f1 100755 --- a/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp +++ b/plugins/WinVST/ChromeOxide/ChromeOxideProc.cpp @@ -48,8 +48,8 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -152,11 +152,11 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Cider/Cider.cpp b/plugins/WinVST/Cider/Cider.cpp index 953563eb8..ebdd1a4f4 100755 --- a/plugins/WinVST/Cider/Cider.cpp +++ b/plugins/WinVST/Cider/Cider.cpp @@ -18,7 +18,7 @@ Cider::Cider(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Cider/CiderProc.cpp b/plugins/WinVST/Cider/CiderProc.cpp index 9222a2ea7..31be7279f 100755 --- a/plugins/WinVST/Cider/CiderProc.cpp +++ b/plugins/WinVST/Cider/CiderProc.cpp @@ -39,8 +39,8 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Coils/Coils.cpp b/plugins/WinVST/Coils/Coils.cpp index b3cc04aab..e40878412 100755 --- a/plugins/WinVST/Coils/Coils.cpp +++ b/plugins/WinVST/Coils/Coils.cpp @@ -16,7 +16,7 @@ Coils::Coils(audioMasterCallback audioMaster) : B = 0.5; C = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Coils/CoilsProc.cpp b/plugins/WinVST/Coils/CoilsProc.cpp index d963e9053..278f0690d 100755 --- a/plugins/WinVST/Coils/CoilsProc.cpp +++ b/plugins/WinVST/Coils/CoilsProc.cpp @@ -34,8 +34,8 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -74,11 +74,11 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Cojones/CojonesProc.cpp b/plugins/WinVST/Cojones/CojonesProc.cpp index 24606e3af..3b45cea8f 100755 --- a/plugins/WinVST/Cojones/CojonesProc.cpp +++ b/plugins/WinVST/Cojones/CojonesProc.cpp @@ -27,42 +27,8 @@ void Cojones::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -197,42 +163,8 @@ void Cojones::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Compresaturator/Compresaturator.cpp b/plugins/WinVST/Compresaturator/Compresaturator.cpp index e975f9cf9..1bb483138 100755 --- a/plugins/WinVST/Compresaturator/Compresaturator.cpp +++ b/plugins/WinVST/Compresaturator/Compresaturator.cpp @@ -25,7 +25,7 @@ Compresaturator::Compresaturator(audioMasterCallback audioMaster) : lastWidthR = 500; padFactorR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Compresaturator/Compresaturator.h b/plugins/WinVST/Compresaturator/Compresaturator.h index 62414582e..868b50b4d 100755 --- a/plugins/WinVST/Compresaturator/Compresaturator.h +++ b/plugins/WinVST/Compresaturator/Compresaturator.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff int dCount; diff --git a/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp b/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp index 921f25b11..9a70ac814 100755 --- a/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp +++ b/plugins/WinVST/Compresaturator/CompresaturatorProc.cpp @@ -28,42 +28,8 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -243,42 +209,8 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs, double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Console6Buss/Console6Buss.cpp b/plugins/WinVST/Console6Buss/Console6Buss.cpp index 27681c141..c6658226e 100755 --- a/plugins/WinVST/Console6Buss/Console6Buss.cpp +++ b/plugins/WinVST/Console6Buss/Console6Buss.cpp @@ -13,7 +13,7 @@ Console6Buss::Console6Buss(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Console6Buss/Console6BussProc.cpp b/plugins/WinVST/Console6Buss/Console6BussProc.cpp index 03f8fb9a6..6e25bd3a3 100755 --- a/plugins/WinVST/Console6Buss/Console6BussProc.cpp +++ b/plugins/WinVST/Console6Buss/Console6BussProc.cpp @@ -20,8 +20,8 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Console6Channel/Console6Channel.cpp b/plugins/WinVST/Console6Channel/Console6Channel.cpp index 5bd28ca6e..d8634744e 100755 --- a/plugins/WinVST/Console6Channel/Console6Channel.cpp +++ b/plugins/WinVST/Console6Channel/Console6Channel.cpp @@ -13,7 +13,7 @@ Console6Channel::Console6Channel(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Console6Channel/Console6ChannelProc.cpp b/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp index 2d835fc8c..a72e3b8f0 100755 --- a/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp +++ b/plugins/WinVST/Console6Channel/Console6ChannelProc.cpp @@ -20,8 +20,8 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { @@ -47,11 +47,11 @@ void Console6Channel::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Crystal/CrystalProc.cpp b/plugins/WinVST/Crystal/CrystalProc.cpp index f5d6746b1..d5eef67c8 100755 --- a/plugins/WinVST/Crystal/CrystalProc.cpp +++ b/plugins/WinVST/Crystal/CrystalProc.cpp @@ -40,42 +40,8 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -243,42 +209,8 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; diff --git a/plugins/WinVST/Dark/Dark.cpp b/plugins/WinVST/Dark/Dark.cpp index f652aa452..8c038752e 100755 --- a/plugins/WinVST/Dark/Dark.cpp +++ b/plugins/WinVST/Dark/Dark.cpp @@ -14,7 +14,7 @@ Dark::Dark(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 99; count++) { lastSampleL[count] = 0; lastSampleR[count] = 0; diff --git a/plugins/WinVST/DeBess/DeBess.cpp b/plugins/WinVST/DeBess/DeBess.cpp index b31a71a46..87d7316b8 100755 --- a/plugins/WinVST/DeBess/DeBess.cpp +++ b/plugins/WinVST/DeBess/DeBess.cpp @@ -29,7 +29,7 @@ DeBess::DeBess(audioMasterCallback audioMaster) : iirSampleBR = 0.0; flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/DeBess/DeBessProc.cpp b/plugins/WinVST/DeBess/DeBessProc.cpp index 075c9de3e..f868c8284 100755 --- a/plugins/WinVST/DeBess/DeBessProc.cpp +++ b/plugins/WinVST/DeBess/DeBessProc.cpp @@ -30,8 +30,8 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; sL[0] = inputSampleL; //set up so both [0] and [1] will be input sample sR[0] = inputSampleR; //set up so both [0] and [1] will be input sample @@ -92,11 +92,11 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/DeHiss/DeHiss.cpp b/plugins/WinVST/DeHiss/DeHiss.cpp index 1f2d5639c..17f386f5d 100755 --- a/plugins/WinVST/DeHiss/DeHiss.cpp +++ b/plugins/WinVST/DeHiss/DeHiss.cpp @@ -25,7 +25,7 @@ DeHiss::DeHiss(audioMasterCallback audioMaster) : gateR = 1.0; rawR = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/DeHiss/DeHissProc.cpp b/plugins/WinVST/DeHiss/DeHissProc.cpp index 41074f9c5..88547ff75 100755 --- a/plugins/WinVST/DeHiss/DeHissProc.cpp +++ b/plugins/WinVST/DeHiss/DeHissProc.cpp @@ -37,8 +37,8 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -121,11 +121,11 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/DeRez2/DeRez2.cpp b/plugins/WinVST/DeRez2/DeRez2.cpp index 876d97575..acc092ee5 100755 --- a/plugins/WinVST/DeRez2/DeRez2.cpp +++ b/plugins/WinVST/DeRez2/DeRez2.cpp @@ -29,7 +29,7 @@ DeRez2::DeRez2(audioMasterCallback audioMaster) : position = 0.0; incrementA = 0.0; incrementB = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/DeRez2/DeRez2Proc.cpp b/plugins/WinVST/DeRez2/DeRez2Proc.cpp index d43944d9e..4ff6cf82d 100755 --- a/plugins/WinVST/DeRez2/DeRez2Proc.cpp +++ b/plugins/WinVST/DeRez2/DeRez2Proc.cpp @@ -30,8 +30,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -168,11 +168,11 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Deckwrecka/Deckwrecka.cpp b/plugins/WinVST/Deckwrecka/Deckwrecka.cpp index 9f7fe61ca..8e4fc6d08 100755 --- a/plugins/WinVST/Deckwrecka/Deckwrecka.cpp +++ b/plugins/WinVST/Deckwrecka/Deckwrecka.cpp @@ -13,7 +13,7 @@ Deckwrecka::Deckwrecka(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bflip = 1; iirHeadBumpAL = 0.0; diff --git a/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp b/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp index e7146df5d..1e59e635c 100755 --- a/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp +++ b/plugins/WinVST/Deckwrecka/DeckwreckaProc.cpp @@ -35,8 +35,8 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; bflip++; if (bflip < 1 || bflip > 3) bflip = 1; @@ -175,11 +175,11 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/DigitalBlack/DigitalBlack.cpp b/plugins/WinVST/DigitalBlack/DigitalBlack.cpp index 9208be4f4..89a10236a 100755 --- a/plugins/WinVST/DigitalBlack/DigitalBlack.cpp +++ b/plugins/WinVST/DigitalBlack/DigitalBlack.cpp @@ -20,7 +20,7 @@ DigitalBlack::DigitalBlack(audioMasterCallback audioMaster) : WasNegativeR = false; ZeroCrossR = 0; gaterollerR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/DigitalBlack/DigitalBlackProc.cpp b/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp index 8caeff273..efd520f21 100755 --- a/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp +++ b/plugins/WinVST/DigitalBlack/DigitalBlackProc.cpp @@ -26,8 +26,8 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -91,11 +91,11 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Distance2/Distance2Proc.cpp b/plugins/WinVST/Distance2/Distance2Proc.cpp index 0a92a9268..8017d9303 100755 --- a/plugins/WinVST/Distance2/Distance2Proc.cpp +++ b/plugins/WinVST/Distance2/Distance2Proc.cpp @@ -46,42 +46,8 @@ void Distance2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,42 +290,8 @@ void Distance2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Distortion/Distortion.cpp b/plugins/WinVST/Distortion/Distortion.cpp index 34dd08274..373ec3574 100755 --- a/plugins/WinVST/Distortion/Distortion.cpp +++ b/plugins/WinVST/Distortion/Distortion.cpp @@ -20,7 +20,7 @@ Distortion::Distortion(audioMasterCallback audioMaster) : previousInL[x] = 0.0; previousOutL[x] = 0.0; previousInR[x] = 0.0; previousOutR[x] = 0.0; } - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Distortion/DistortionProc.cpp b/plugins/WinVST/Distortion/DistortionProc.cpp index 8d6a4f8b0..17240d1cf 100755 --- a/plugins/WinVST/Distortion/DistortionProc.cpp +++ b/plugins/WinVST/Distortion/DistortionProc.cpp @@ -25,8 +25,8 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -111,11 +111,11 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -146,8 +146,8 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/DitherFloat/DitherFloat.cpp b/plugins/WinVST/DitherFloat/DitherFloat.cpp index 05213a6ce..9443a2daa 100755 --- a/plugins/WinVST/DitherFloat/DitherFloat.cpp +++ b/plugins/WinVST/DitherFloat/DitherFloat.cpp @@ -14,7 +14,7 @@ DitherFloat::DitherFloat(audioMasterCallback audioMaster) : { A = 0.0; B = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/DubCenter/DubCenterProc.cpp b/plugins/WinVST/DubCenter/DubCenterProc.cpp index 49806b773..ff4d70dbf 100755 --- a/plugins/WinVST/DubCenter/DubCenterProc.cpp +++ b/plugins/WinVST/DubCenter/DubCenterProc.cpp @@ -52,42 +52,8 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -369,42 +335,8 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Dyno/Dyno.cpp b/plugins/WinVST/Dyno/Dyno.cpp index b02585f9d..0239412a3 100755 --- a/plugins/WinVST/Dyno/Dyno.cpp +++ b/plugins/WinVST/Dyno/Dyno.cpp @@ -13,7 +13,7 @@ Dyno::Dyno(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Dyno/DynoProc.cpp b/plugins/WinVST/Dyno/DynoProc.cpp index 3e9052c73..c2db122db 100755 --- a/plugins/WinVST/Dyno/DynoProc.cpp +++ b/plugins/WinVST/Dyno/DynoProc.cpp @@ -20,8 +20,8 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Elation/Elation.cpp b/plugins/WinVST/Elation/Elation.cpp index fc8d4367f..d4740eca0 100755 --- a/plugins/WinVST/Elation/Elation.cpp +++ b/plugins/WinVST/Elation/Elation.cpp @@ -23,7 +23,7 @@ Elation::Elation(audioMasterCallback audioMaster) : compCR = 1.0; compDR = 1.0; previousBR = 0.0; flip = false; lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Elation/ElationProc.cpp b/plugins/WinVST/Elation/ElationProc.cpp index 359c931b3..8df4ce867 100755 --- a/plugins/WinVST/Elation/ElationProc.cpp +++ b/plugins/WinVST/Elation/ElationProc.cpp @@ -36,8 +36,8 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -270,11 +270,11 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Energy/EnergyProc.cpp b/plugins/WinVST/Energy/EnergyProc.cpp index dbe218778..1d29f1479 100755 --- a/plugins/WinVST/Energy/EnergyProc.cpp +++ b/plugins/WinVST/Energy/EnergyProc.cpp @@ -30,42 +30,8 @@ void Energy::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; @@ -784,42 +750,8 @@ void Energy::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double correctionL = 0.0; double correctionR = 0.0; diff --git a/plugins/WinVST/Facet/Facet.cpp b/plugins/WinVST/Facet/Facet.cpp index e12d20343..a6a5614fb 100755 --- a/plugins/WinVST/Facet/Facet.cpp +++ b/plugins/WinVST/Facet/Facet.cpp @@ -13,7 +13,7 @@ Facet::Facet(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Facet/FacetProc.cpp b/plugins/WinVST/Facet/FacetProc.cpp index fb5cdbd6e..85af36f42 100755 --- a/plugins/WinVST/Facet/FacetProc.cpp +++ b/plugins/WinVST/Facet/FacetProc.cpp @@ -20,8 +20,8 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; @@ -47,11 +47,11 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Floor/FloorProc.cpp b/plugins/WinVST/Floor/FloorProc.cpp index 0cfa58c69..758360f65 100755 --- a/plugins/WinVST/Floor/FloorProc.cpp +++ b/plugins/WinVST/Floor/FloorProc.cpp @@ -39,42 +39,8 @@ void Floor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -298,42 +264,8 @@ void Floor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Focus/Focus.cpp b/plugins/WinVST/Focus/Focus.cpp index f77560c82..a9e66020d 100755 --- a/plugins/WinVST/Focus/Focus.cpp +++ b/plugins/WinVST/Focus/Focus.cpp @@ -18,7 +18,7 @@ Focus::Focus(audioMasterCallback audioMaster) : D = 1.0; E = 1.0; for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Focus/FocusProc.cpp b/plugins/WinVST/Focus/FocusProc.cpp index 9e1c9c070..fd7624e72 100755 --- a/plugins/WinVST/Focus/FocusProc.cpp +++ b/plugins/WinVST/Focus/FocusProc.cpp @@ -34,8 +34,8 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -128,11 +128,11 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Gatelope/GatelopeProc.cpp b/plugins/WinVST/Gatelope/GatelopeProc.cpp index b5f1d67d7..5dbcb19c3 100755 --- a/plugins/WinVST/Gatelope/GatelopeProc.cpp +++ b/plugins/WinVST/Gatelope/GatelopeProc.cpp @@ -39,42 +39,8 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -247,42 +213,8 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/GlitchShifter/GlitchShifter.cpp b/plugins/WinVST/GlitchShifter/GlitchShifter.cpp index f9456e1f3..2bd39758e 100755 --- a/plugins/WinVST/GlitchShifter/GlitchShifter.cpp +++ b/plugins/WinVST/GlitchShifter/GlitchShifter.cpp @@ -53,7 +53,7 @@ GlitchShifter::GlitchShifter(audioMasterCallback audioMaster) : C = 0.5; D = 0.0; E = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/GlitchShifter/GlitchShifterProc.cpp b/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp index 852c3bc0f..06ebe4bae 100755 --- a/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp +++ b/plugins/WinVST/GlitchShifter/GlitchShifterProc.cpp @@ -28,8 +28,8 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -307,11 +307,11 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Gringer/Gringer.cpp b/plugins/WinVST/Gringer/Gringer.cpp index 5f92a8860..f071dedb8 100755 --- a/plugins/WinVST/Gringer/Gringer.cpp +++ b/plugins/WinVST/Gringer/Gringer.cpp @@ -13,7 +13,7 @@ Gringer::Gringer(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 9; x++) {inbandL[x] = 0.0; outbandL[x] = 0.0; inbandR[x] = 0.0; outbandR[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Gringer/GringerProc.cpp b/plugins/WinVST/Gringer/GringerProc.cpp index b76693f2e..b59800001 100755 --- a/plugins/WinVST/Gringer/GringerProc.cpp +++ b/plugins/WinVST/Gringer/GringerProc.cpp @@ -60,8 +60,8 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); @@ -105,11 +105,11 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Highpass2/Highpass2.cpp b/plugins/WinVST/Highpass2/Highpass2.cpp index bcb2ce133..c88927ae2 100755 --- a/plugins/WinVST/Highpass2/Highpass2.cpp +++ b/plugins/WinVST/Highpass2/Highpass2.cpp @@ -16,7 +16,7 @@ Highpass2::Highpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/WinVST/Highpass2/Highpass2Proc.cpp b/plugins/WinVST/Highpass2/Highpass2Proc.cpp index e5f6a8066..e87194339 100755 --- a/plugins/WinVST/Highpass2/Highpass2Proc.cpp +++ b/plugins/WinVST/Highpass2/Highpass2Proc.cpp @@ -41,42 +41,8 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -211,42 +177,8 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Holt/Holt.cpp b/plugins/WinVST/Holt/Holt.cpp index 4262453e1..499217c23 100755 --- a/plugins/WinVST/Holt/Holt.cpp +++ b/plugins/WinVST/Holt/Holt.cpp @@ -36,7 +36,7 @@ Holt::Holt(audioMasterCallback audioMaster) : previousSampleDR = 0.0; previousTrendDR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Holt/Holt.h b/plugins/WinVST/Holt/Holt.h index d9d61e929..8026fa40d 100755 --- a/plugins/WinVST/Holt/Holt.h +++ b/plugins/WinVST/Holt/Holt.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double previousSampleAL; diff --git a/plugins/WinVST/Holt/HoltProc.cpp b/plugins/WinVST/Holt/HoltProc.cpp index ca90811ad..c243b82ff 100755 --- a/plugins/WinVST/Holt/HoltProc.cpp +++ b/plugins/WinVST/Holt/HoltProc.cpp @@ -45,8 +45,8 @@ void Holt::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Infrasonic/Infrasonic.cpp b/plugins/WinVST/Infrasonic/Infrasonic.cpp index cf5ba9c6c..bfd10d163 100755 --- a/plugins/WinVST/Infrasonic/Infrasonic.cpp +++ b/plugins/WinVST/Infrasonic/Infrasonic.cpp @@ -13,7 +13,7 @@ Infrasonic::Infrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Infrasonic/InfrasonicProc.cpp b/plugins/WinVST/Infrasonic/InfrasonicProc.cpp index 135fd5e33..653fac502 100755 --- a/plugins/WinVST/Infrasonic/InfrasonicProc.cpp +++ b/plugins/WinVST/Infrasonic/InfrasonicProc.cpp @@ -65,8 +65,8 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Infrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Interstage/Interstage.cpp b/plugins/WinVST/Interstage/Interstage.cpp index 9c8acdd11..92acc46cc 100755 --- a/plugins/WinVST/Interstage/Interstage.cpp +++ b/plugins/WinVST/Interstage/Interstage.cpp @@ -26,7 +26,7 @@ Interstage::Interstage(audioMasterCallback audioMaster) : iirSampleER = 0.0; iirSampleFR = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; flip = true; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/WinVST/Interstage/InterstageProc.cpp b/plugins/WinVST/Interstage/InterstageProc.cpp index 181983f57..2707bd744 100755 --- a/plugins/WinVST/Interstage/InterstageProc.cpp +++ b/plugins/WinVST/Interstage/InterstageProc.cpp @@ -26,8 +26,8 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -77,11 +77,11 @@ void Interstage::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Isolator/Isolator.cpp b/plugins/WinVST/Isolator/Isolator.cpp index 651a10ac6..c8222a86f 100755 --- a/plugins/WinVST/Isolator/Isolator.cpp +++ b/plugins/WinVST/Isolator/Isolator.cpp @@ -16,7 +16,7 @@ Isolator::Isolator(audioMasterCallback audioMaster) : A = 1.0; B = 0.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Isolator/IsolatorProc.cpp b/plugins/WinVST/Isolator/IsolatorProc.cpp index ca777d947..4f7178a86 100755 --- a/plugins/WinVST/Isolator/IsolatorProc.cpp +++ b/plugins/WinVST/Isolator/IsolatorProc.cpp @@ -64,8 +64,8 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = *in1; double drySampleR = *in2; @@ -110,11 +110,11 @@ void Isolator::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Loud/Loud.cpp b/plugins/WinVST/Loud/Loud.cpp index a8338382a..1f884deb1 100755 --- a/plugins/WinVST/Loud/Loud.cpp +++ b/plugins/WinVST/Loud/Loud.cpp @@ -17,7 +17,7 @@ Loud::Loud(audioMasterCallback audioMaster) : C = 1.0; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Loud/Loud.h b/plugins/WinVST/Loud/Loud.h index 610c99cde..14e613399 100755 --- a/plugins/WinVST/Loud/Loud.h +++ b/plugins/WinVST/Loud/Loud.h @@ -56,7 +56,8 @@ private: double lastSampleL; double lastSampleR; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/WinVST/Loud/LoudProc.cpp b/plugins/WinVST/Loud/LoudProc.cpp index 906f51dbd..260ba230d 100755 --- a/plugins/WinVST/Loud/LoudProc.cpp +++ b/plugins/WinVST/Loud/LoudProc.cpp @@ -31,8 +31,8 @@ void Loud::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { inputSampleL = *in1; inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; drySampleL = inputSampleL; drySampleR = inputSampleR; diff --git a/plugins/WinVST/Lowpass2/Lowpass2.cpp b/plugins/WinVST/Lowpass2/Lowpass2.cpp index 6c463993f..1de69450a 100755 --- a/plugins/WinVST/Lowpass2/Lowpass2.cpp +++ b/plugins/WinVST/Lowpass2/Lowpass2.cpp @@ -16,7 +16,7 @@ Lowpass2::Lowpass2(audioMasterCallback audioMaster) : B = 0.5; //-1.0 to 1.0 C = 0.25; // 0.0 to 4.0 D = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAL = 0.0; iirSampleBL = 0.0; diff --git a/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp b/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp index 1dd3af06f..1bed77696 100755 --- a/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp +++ b/plugins/WinVST/Lowpass2/Lowpass2Proc.cpp @@ -41,42 +41,8 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -160,11 +126,11 @@ void Lowpass2::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -212,42 +178,8 @@ void Lowpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt3 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Luxor/Luxor.cpp b/plugins/WinVST/Luxor/Luxor.cpp index d00c67d05..001286dd8 100755 --- a/plugins/WinVST/Luxor/Luxor.cpp +++ b/plugins/WinVST/Luxor/Luxor.cpp @@ -18,7 +18,7 @@ Luxor::Luxor(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Luxor/LuxorProc.cpp b/plugins/WinVST/Luxor/LuxorProc.cpp index c8d0add39..89c8487ba 100755 --- a/plugins/WinVST/Luxor/LuxorProc.cpp +++ b/plugins/WinVST/Luxor/LuxorProc.cpp @@ -39,8 +39,8 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -171,11 +171,11 @@ void Luxor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/MV/MV.cpp b/plugins/WinVST/MV/MV.cpp index 3db80c46b..90246abae 100755 --- a/plugins/WinVST/MV/MV.cpp +++ b/plugins/WinVST/MV/MV.cpp @@ -76,7 +76,7 @@ MV::MV(audioMasterCallback audioMaster) : feedbackL = 0.0; feedbackR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/MV/MV.h b/plugins/WinVST/MV/MV.h index 1586d41cc..5a60fa653 100755 --- a/plugins/WinVST/MV/MV.h +++ b/plugins/WinVST/MV/MV.h @@ -56,7 +56,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/WinVST/MV/MVProc.cpp b/plugins/WinVST/MV/MVProc.cpp index 11da2fce9..5a0b96333 100755 --- a/plugins/WinVST/MV/MVProc.cpp +++ b/plugins/WinVST/MV/MVProc.cpp @@ -34,42 +34,8 @@ void MV::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -830,42 +796,8 @@ void MV::processDoubleReplacing(double **inputs, double **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/MoNoam/MoNoam.cpp b/plugins/WinVST/MoNoam/MoNoam.cpp index 3612604d1..746f43edb 100755 --- a/plugins/WinVST/MoNoam/MoNoam.cpp +++ b/plugins/WinVST/MoNoam/MoNoam.cpp @@ -13,7 +13,7 @@ MoNoam::MoNoam(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/MoNoam/MoNoamProc.cpp b/plugins/WinVST/MoNoam/MoNoamProc.cpp index 64cc63a99..c7835d557 100755 --- a/plugins/WinVST/MoNoam/MoNoamProc.cpp +++ b/plugins/WinVST/MoNoam/MoNoamProc.cpp @@ -20,8 +20,8 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double mid; mid = inputSampleL + inputSampleR; double side; side = inputSampleL - inputSampleR; @@ -41,11 +41,11 @@ void MoNoam::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Mojo/Mojo.cpp b/plugins/WinVST/Mojo/Mojo.cpp index 7b34fbafd..78bb5c9c3 100755 --- a/plugins/WinVST/Mojo/Mojo.cpp +++ b/plugins/WinVST/Mojo/Mojo.cpp @@ -13,7 +13,7 @@ Mojo::Mojo(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { A = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Mojo/MojoProc.cpp b/plugins/WinVST/Mojo/MojoProc.cpp index 6687feea8..2597aae9e 100755 --- a/plugins/WinVST/Mojo/MojoProc.cpp +++ b/plugins/WinVST/Mojo/MojoProc.cpp @@ -20,8 +20,8 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gain != 1.0) { inputSampleL *= gain; @@ -37,11 +37,11 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Monitoring/Monitoring.cpp b/plugins/WinVST/Monitoring/Monitoring.cpp index 556e27cb2..635ca615b 100755 --- a/plugins/WinVST/Monitoring/Monitoring.cpp +++ b/plugins/WinVST/Monitoring/Monitoring.cpp @@ -60,7 +60,7 @@ Monitoring::Monitoring(audioMasterCallback audioMaster) : for (int x = 0; x < 11; x++) {biquadL[x] = 0.0; biquadR[x] = 0.0;} //Bandpasses A = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Monitoring/MonitoringProc.cpp b/plugins/WinVST/Monitoring/MonitoringProc.cpp index 397d31b12..385884d3c 100755 --- a/plugins/WinVST/Monitoring/MonitoringProc.cpp +++ b/plugins/WinVST/Monitoring/MonitoringProc.cpp @@ -50,8 +50,8 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; switch (processing) { diff --git a/plugins/WinVST/Neverland/Neverland.cpp b/plugins/WinVST/Neverland/Neverland.cpp index e0c4d5f9e..fae1d9216 100755 --- a/plugins/WinVST/Neverland/Neverland.cpp +++ b/plugins/WinVST/Neverland/Neverland.cpp @@ -19,7 +19,7 @@ Neverland::Neverland(audioMasterCallback audioMaster) : for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Neverland/NeverlandProc.cpp b/plugins/WinVST/Neverland/NeverlandProc.cpp index 58493f8a3..02dcb04b7 100755 --- a/plugins/WinVST/Neverland/NeverlandProc.cpp +++ b/plugins/WinVST/Neverland/NeverlandProc.cpp @@ -39,8 +39,8 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -167,11 +167,11 @@ void Neverland::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Nikola/Nikola.cpp b/plugins/WinVST/Nikola/Nikola.cpp index 001eb37ef..6938af08c 100755 --- a/plugins/WinVST/Nikola/Nikola.cpp +++ b/plugins/WinVST/Nikola/Nikola.cpp @@ -23,7 +23,7 @@ Nikola::Nikola(audioMasterCallback audioMaster) : outlevelR = 0.0; framenumberR = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Nikola/NikolaProc.cpp b/plugins/WinVST/Nikola/NikolaProc.cpp index 59738686d..3c049ce59 100755 --- a/plugins/WinVST/Nikola/NikolaProc.cpp +++ b/plugins/WinVST/Nikola/NikolaProc.cpp @@ -22,8 +22,8 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -1010,11 +1010,11 @@ void Nikola::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/NotJustAnotherDither/NotJustAnotherDither.cpp b/plugins/WinVST/NotJustAnotherDither/NotJustAnotherDither.cpp index 7727b5010..e90337260 100755 --- a/plugins/WinVST/NotJustAnotherDither/NotJustAnotherDither.cpp +++ b/plugins/WinVST/NotJustAnotherDither/NotJustAnotherDither.cpp @@ -14,7 +14,7 @@ NotJustAnotherDither::NotJustAnotherDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; bynL[0] = 1000; bynL[1] = 301; bynL[2] = 176; diff --git a/plugins/WinVST/Pafnuty/PafnutyProc.cpp b/plugins/WinVST/Pafnuty/PafnutyProc.cpp index 79d2326a1..38e2b05a3 100755 --- a/plugins/WinVST/Pafnuty/PafnutyProc.cpp +++ b/plugins/WinVST/Pafnuty/PafnutyProc.cpp @@ -61,42 +61,8 @@ void Pafnuty::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; @@ -331,42 +297,8 @@ void Pafnuty::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //left channel effxct = 0.0; diff --git a/plugins/WinVST/PaulDither/PaulDither.cpp b/plugins/WinVST/PaulDither/PaulDither.cpp index faa056409..f9a8de8b7 100755 --- a/plugins/WinVST/PaulDither/PaulDither.cpp +++ b/plugins/WinVST/PaulDither/PaulDither.cpp @@ -14,7 +14,7 @@ PaulDither::PaulDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDitherL = 0.0; previousDitherR = 0.0; //this is reset: values being initialized only once. Startup values, whatever they are. diff --git a/plugins/WinVST/PeaksOnly/PeaksOnly.cpp b/plugins/WinVST/PeaksOnly/PeaksOnly.cpp index db59ae94f..73fd7bacc 100755 --- a/plugins/WinVST/PeaksOnly/PeaksOnly.cpp +++ b/plugins/WinVST/PeaksOnly/PeaksOnly.cpp @@ -14,7 +14,7 @@ PeaksOnly::PeaksOnly(audioMasterCallback audioMaster) : { for(int count = 0; count < 1502; count++) {aL[count] = 0.0; bL[count] = 0.0; cL[count] = 0.0; dL[count] = 0.0;aR[count] = 0.0; bR[count] = 0.0; cR[count] = 0.0; dR[count] = 0.0;} ax = 1; bx = 1; cx = 1; dx = 1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PeaksOnly/PeaksOnlyProc.cpp b/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp index 39a49e8c1..d7d4af84c 100755 --- a/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp +++ b/plugins/WinVST/PeaksOnly/PeaksOnlyProc.cpp @@ -28,8 +28,8 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; @@ -129,11 +129,11 @@ void PeaksOnly::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/PocketVerbs/PocketVerbs.cpp b/plugins/WinVST/PocketVerbs/PocketVerbs.cpp index 4426e4b76..f4102466c 100755 --- a/plugins/WinVST/PocketVerbs/PocketVerbs.cpp +++ b/plugins/WinVST/PocketVerbs/PocketVerbs.cpp @@ -191,7 +191,7 @@ PocketVerbs::PocketVerbs(audioMasterCallback audioMaster) : countdown = -1; peakL = 1.0; peakR = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PocketVerbs/PocketVerbsProc.cpp b/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp index c6ab00834..5d8a7d157 100755 --- a/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp +++ b/plugins/WinVST/PocketVerbs/PocketVerbsProc.cpp @@ -472,8 +472,8 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -9168,11 +9168,11 @@ void PocketVerbs::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Podcast/Podcast.cpp b/plugins/WinVST/Podcast/Podcast.cpp index a29cc27da..decf86e4d 100755 --- a/plugins/WinVST/Podcast/Podcast.cpp +++ b/plugins/WinVST/Podcast/Podcast.cpp @@ -18,7 +18,7 @@ Podcast::Podcast(audioMasterCallback audioMaster) : c1L = 2.0; c2L = 2.0; c3L = 2.0; c4L = 2.0; c5L = 2.0; //startup comp gains c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Podcast/PodcastProc.cpp b/plugins/WinVST/Podcast/PodcastProc.cpp index 4a4c4fdd6..a6bd88d45 100755 --- a/plugins/WinVST/Podcast/PodcastProc.cpp +++ b/plugins/WinVST/Podcast/PodcastProc.cpp @@ -32,8 +32,8 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -149,11 +149,11 @@ void Podcast::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/PodcastDeluxe/PodcastDeluxe.cpp b/plugins/WinVST/PodcastDeluxe/PodcastDeluxe.cpp index 2b48a0d56..6765486f7 100644 --- a/plugins/WinVST/PodcastDeluxe/PodcastDeluxe.cpp +++ b/plugins/WinVST/PodcastDeluxe/PodcastDeluxe.cpp @@ -32,7 +32,7 @@ PodcastDeluxe::PodcastDeluxe(audioMasterCallback audioMaster) : maxdelay1 = 9001; maxdelay2 = 9001; maxdelay3 = 9001; maxdelay4 = 9001; maxdelay5 = 9001; c1R = 2.0; c2R = 2.0; c3R = 2.0; c4R = 2.0; c5R = 2.0; //startup comp gains - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp b/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp index eafe49669..2f306c079 100644 --- a/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp +++ b/plugins/WinVST/PodcastDeluxe/PodcastDeluxeProc.cpp @@ -47,8 +47,8 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; allpasstemp = tap1 - 1; @@ -316,11 +316,11 @@ void PodcastDeluxe::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Pop/Pop.cpp b/plugins/WinVST/Pop/Pop.cpp index 9ebd38106..a48aea872 100755 --- a/plugins/WinVST/Pop/Pop.cpp +++ b/plugins/WinVST/Pop/Pop.cpp @@ -15,7 +15,7 @@ Pop::Pop(audioMasterCallback audioMaster) : A = 0.3; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; for(int count = 0; count < 10000; count++) {dL[count] = 0; dR[count] = 0;} delay = 0; diff --git a/plugins/WinVST/Pop/Pop.h b/plugins/WinVST/Pop/Pop.h index 9784b4ee5..9411334aa 100755 --- a/plugins/WinVST/Pop/Pop.h +++ b/plugins/WinVST/Pop/Pop.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double muVaryL; diff --git a/plugins/WinVST/Pop/PopProc.cpp b/plugins/WinVST/Pop/PopProc.cpp index 44e7efd3a..85422c511 100755 --- a/plugins/WinVST/Pop/PopProc.cpp +++ b/plugins/WinVST/Pop/PopProc.cpp @@ -37,8 +37,8 @@ void Pop::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/PowerSag2/PowerSag2.cpp b/plugins/WinVST/PowerSag2/PowerSag2.cpp index bcf7fdad6..2e68a9376 100755 --- a/plugins/WinVST/PowerSag2/PowerSag2.cpp +++ b/plugins/WinVST/PowerSag2/PowerSag2.cpp @@ -20,7 +20,7 @@ PowerSag2::PowerSag2(audioMasterCallback audioMaster) : A = 0.3; B = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PowerSag2/PowerSag2Proc.cpp b/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp index 69e12f697..4b637c3ff 100755 --- a/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp +++ b/plugins/WinVST/PowerSag2/PowerSag2Proc.cpp @@ -22,8 +22,8 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void PowerSag2::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Precious/Precious.cpp b/plugins/WinVST/Precious/Precious.cpp index ee2061a86..78a045cf8 100755 --- a/plugins/WinVST/Precious/Precious.cpp +++ b/plugins/WinVST/Precious/Precious.cpp @@ -18,7 +18,7 @@ Precious::Precious(audioMasterCallback audioMaster) : D = 1.0; for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;} lastSampleR = 0.0;lastSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Precious/PreciousProc.cpp b/plugins/WinVST/Precious/PreciousProc.cpp index d15680a95..a2de05c32 100755 --- a/plugins/WinVST/Precious/PreciousProc.cpp +++ b/plugins/WinVST/Precious/PreciousProc.cpp @@ -39,8 +39,8 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= indrive; inputSampleR *= indrive; @@ -169,11 +169,11 @@ void Precious::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/PurestAir/PurestAir.cpp b/plugins/WinVST/PurestAir/PurestAir.cpp index 3314d21b2..66e9e4d72 100755 --- a/plugins/WinVST/PurestAir/PurestAir.cpp +++ b/plugins/WinVST/PurestAir/PurestAir.cpp @@ -25,7 +25,7 @@ PurestAir::PurestAir(audioMasterCallback audioMaster) : lastSampleR = 0.0; s1R = s2R = s3R = 0.0; applyR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PurestAir/PurestAirProc.cpp b/plugins/WinVST/PurestAir/PurestAirProc.cpp index 362e27217..d2df18951 100755 --- a/plugins/WinVST/PurestAir/PurestAirProc.cpp +++ b/plugins/WinVST/PurestAir/PurestAirProc.cpp @@ -25,8 +25,8 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -95,11 +95,11 @@ void PurestAir::processReplacing(float **inputs, float **outputs, VstInt32 sampl //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/PurestFade/PurestFade.cpp b/plugins/WinVST/PurestFade/PurestFade.cpp index 5c0fd45b4..b86eea6b7 100755 --- a/plugins/WinVST/PurestFade/PurestFade.cpp +++ b/plugins/WinVST/PurestFade/PurestFade.cpp @@ -18,7 +18,7 @@ PurestFade::PurestFade(audioMasterCallback audioMaster) : settingchase = -90.0; gainBchase = -90.0; chasespeed = 350.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PurestFade/PurestFadeProc.cpp b/plugins/WinVST/PurestFade/PurestFadeProc.cpp index 31f0a9d17..98f7d8d70 100755 --- a/plugins/WinVST/PurestFade/PurestFadeProc.cpp +++ b/plugins/WinVST/PurestFade/PurestFadeProc.cpp @@ -49,8 +49,8 @@ void PurestFade::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; targetgain = pow(10.0,settingchase/20.0); //now we have the target in our temp variable diff --git a/plugins/WinVST/PurestSquish/PurestSquish.cpp b/plugins/WinVST/PurestSquish/PurestSquish.cpp index 16543c40a..1ea9b70fe 100755 --- a/plugins/WinVST/PurestSquish/PurestSquish.cpp +++ b/plugins/WinVST/PurestSquish/PurestSquish.cpp @@ -64,7 +64,7 @@ PurestSquish::PurestSquish(audioMasterCallback audioMaster) : count = 1; fpFlip = true; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/PurestSquish/PurestSquish.h b/plugins/WinVST/PurestSquish/PurestSquish.h index d5b93a9cb..a1c96fccb 100755 --- a/plugins/WinVST/PurestSquish/PurestSquish.h +++ b/plugins/WinVST/PurestSquish/PurestSquish.h @@ -55,7 +55,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff float A; diff --git a/plugins/WinVST/PurestSquish/PurestSquishProc.cpp b/plugins/WinVST/PurestSquish/PurestSquishProc.cpp index 946d23963..e763aa5ce 100755 --- a/plugins/WinVST/PurestSquish/PurestSquishProc.cpp +++ b/plugins/WinVST/PurestSquish/PurestSquishProc.cpp @@ -32,42 +32,8 @@ void PurestSquish::processReplacing(float **inputs, float **outputs, VstInt32 sa double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -536,42 +502,8 @@ void PurestSquish::processDoubleReplacing(double **inputs, double **outputs, Vst double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/RawGlitters/RawGlitters.cpp b/plugins/WinVST/RawGlitters/RawGlitters.cpp index 30804e218..cdd0c545f 100755 --- a/plugins/WinVST/RawGlitters/RawGlitters.cpp +++ b/plugins/WinVST/RawGlitters/RawGlitters.cpp @@ -14,7 +14,7 @@ RawGlitters::RawGlitters(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/WinVST/RawTimbers/RawTimbers.cpp b/plugins/WinVST/RawTimbers/RawTimbers.cpp index 65ad02672..da85dbaf2 100755 --- a/plugins/WinVST/RawTimbers/RawTimbers.cpp +++ b/plugins/WinVST/RawTimbers/RawTimbers.cpp @@ -14,7 +14,7 @@ RawTimbers::RawTimbers(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; lastSampleL = 0.0; lastSample2L = 0.0; lastSampleR = 0.0; diff --git a/plugins/WinVST/Recurve/Recurve.cpp b/plugins/WinVST/Recurve/Recurve.cpp index 611289eee..a669540a9 100755 --- a/plugins/WinVST/Recurve/Recurve.cpp +++ b/plugins/WinVST/Recurve/Recurve.cpp @@ -13,7 +13,7 @@ Recurve::Recurve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 2.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Recurve/RecurveProc.cpp b/plugins/WinVST/Recurve/RecurveProc.cpp index fc20e5b25..1b56af4a1 100755 --- a/plugins/WinVST/Recurve/RecurveProc.cpp +++ b/plugins/WinVST/Recurve/RecurveProc.cpp @@ -19,8 +19,8 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -45,11 +45,11 @@ void Recurve::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Remap/Remap.cpp b/plugins/WinVST/Remap/Remap.cpp index aef092060..b4663c529 100755 --- a/plugins/WinVST/Remap/Remap.cpp +++ b/plugins/WinVST/Remap/Remap.cpp @@ -15,7 +15,7 @@ Remap::Remap(audioMasterCallback audioMaster) : A = 0.5; B = 1.0; C = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Remap/RemapProc.cpp b/plugins/WinVST/Remap/RemapProc.cpp index b9227743f..32bb5b9e6 100755 --- a/plugins/WinVST/Remap/RemapProc.cpp +++ b/plugins/WinVST/Remap/RemapProc.cpp @@ -23,8 +23,8 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -64,11 +64,11 @@ void Remap::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/ResEQ/ResEQ.cpp b/plugins/WinVST/ResEQ/ResEQ.cpp index 37a7b4244..feffbda53 100644 --- a/plugins/WinVST/ResEQ/ResEQ.cpp +++ b/plugins/WinVST/ResEQ/ResEQ.cpp @@ -26,7 +26,7 @@ ResEQ::ResEQ(audioMasterCallback audioMaster) : bR[count] = 0.0; fR[count] = 0.0; } framenumber = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/ResEQ/ResEQProc.cpp b/plugins/WinVST/ResEQ/ResEQProc.cpp index c9c21c0dd..22c389843 100644 --- a/plugins/WinVST/ResEQ/ResEQProc.cpp +++ b/plugins/WinVST/ResEQ/ResEQProc.cpp @@ -130,8 +130,8 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -284,11 +284,11 @@ void ResEQ::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Slew3/Slew3.cpp b/plugins/WinVST/Slew3/Slew3.cpp index 03a8dc410..5bf29f586 100755 --- a/plugins/WinVST/Slew3/Slew3.cpp +++ b/plugins/WinVST/Slew3/Slew3.cpp @@ -15,7 +15,7 @@ Slew3::Slew3(audioMasterCallback audioMaster) : A = 0.0; lastSampleAL = lastSampleBL = lastSampleCL = 0.0; lastSampleAR = lastSampleBR = lastSampleCR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Slew3/Slew3Proc.cpp b/plugins/WinVST/Slew3/Slew3Proc.cpp index 18177c5ea..297a4f6e3 100755 --- a/plugins/WinVST/Slew3/Slew3Proc.cpp +++ b/plugins/WinVST/Slew3/Slew3Proc.cpp @@ -24,8 +24,8 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //begin L double clamp = (lastSampleBL - lastSampleCL) * 0.381966011250105; @@ -63,11 +63,11 @@ void Slew3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/Smooth/Smooth.cpp b/plugins/WinVST/Smooth/Smooth.cpp index a8b656ff3..6509d2aeb 100755 --- a/plugins/WinVST/Smooth/Smooth.cpp +++ b/plugins/WinVST/Smooth/Smooth.cpp @@ -38,7 +38,7 @@ Smooth::Smooth(audioMasterCallback audioMaster) : lastSampleER = 0.0; gainER = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Smooth/SmoothProc.cpp b/plugins/WinVST/Smooth/SmoothProc.cpp index 81df54143..9d532987c 100755 --- a/plugins/WinVST/Smooth/SmoothProc.cpp +++ b/plugins/WinVST/Smooth/SmoothProc.cpp @@ -31,42 +31,8 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -176,11 +142,11 @@ void Smooth::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -217,42 +183,8 @@ void Smooth::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/SoftGate/SoftGate.cpp b/plugins/WinVST/SoftGate/SoftGate.cpp index aae0129b0..4db4f8f2f 100755 --- a/plugins/WinVST/SoftGate/SoftGate.cpp +++ b/plugins/WinVST/SoftGate/SoftGate.cpp @@ -20,7 +20,7 @@ SoftGate::SoftGate(audioMasterCallback audioMaster) : storedR[0] = storedR[1] = 0.0; diffR = 0.0; gate = 1.1; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/SoftGate/SoftGateProc.cpp b/plugins/WinVST/SoftGate/SoftGateProc.cpp index ba8d6358c..f08b9563c 100755 --- a/plugins/WinVST/SoftGate/SoftGateProc.cpp +++ b/plugins/WinVST/SoftGate/SoftGateProc.cpp @@ -28,8 +28,8 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; storedL[1] = storedL[0]; storedL[0] = inputSampleL; @@ -59,11 +59,11 @@ void SoftGate::processReplacing(float **inputs, float **outputs, VstInt32 sample //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/SpatializeDither/SpatializeDither.cpp b/plugins/WinVST/SpatializeDither/SpatializeDither.cpp index 68cac32e0..e4ebc5549 100755 --- a/plugins/WinVST/SpatializeDither/SpatializeDither.cpp +++ b/plugins/WinVST/SpatializeDither/SpatializeDither.cpp @@ -14,7 +14,7 @@ SpatializeDither::SpatializeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; contingentErrL = 0.0; contingentErrR = 0.0; flip = false; diff --git a/plugins/WinVST/Spiral/Spiral.cpp b/plugins/WinVST/Spiral/Spiral.cpp index 9a1c0bec3..88106caf6 100755 --- a/plugins/WinVST/Spiral/Spiral.cpp +++ b/plugins/WinVST/Spiral/Spiral.cpp @@ -12,7 +12,7 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new S Spiral::Spiral(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Spiral/Spiral.h b/plugins/WinVST/Spiral/Spiral.h index f20476204..439f7cecc 100755 --- a/plugins/WinVST/Spiral/Spiral.h +++ b/plugins/WinVST/Spiral/Spiral.h @@ -51,7 +51,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff }; diff --git a/plugins/WinVST/Spiral/SpiralProc.cpp b/plugins/WinVST/Spiral/SpiralProc.cpp index f672d63d1..5e75e82c4 100755 --- a/plugins/WinVST/Spiral/SpiralProc.cpp +++ b/plugins/WinVST/Spiral/SpiralProc.cpp @@ -19,8 +19,8 @@ void Spiral::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; //clip to 1.2533141373155 to reach maximum output diff --git a/plugins/WinVST/Spiral2/Spiral2.cpp b/plugins/WinVST/Spiral2/Spiral2.cpp index 44703eeb4..4d1f8bb1e 100755 --- a/plugins/WinVST/Spiral2/Spiral2.cpp +++ b/plugins/WinVST/Spiral2/Spiral2.cpp @@ -20,7 +20,7 @@ Spiral2::Spiral2(audioMasterCallback audioMaster) : iirSampleAL = 0.0; iirSampleBL = 0.0; prevSampleL = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; iirSampleAR = 0.0; iirSampleBR = 0.0; diff --git a/plugins/WinVST/Spiral2/Spiral2.h b/plugins/WinVST/Spiral2/Spiral2.h index 7da43323c..3f64ec340 100755 --- a/plugins/WinVST/Spiral2/Spiral2.h +++ b/plugins/WinVST/Spiral2/Spiral2.h @@ -59,7 +59,8 @@ private: double iirSampleAL; double iirSampleBL; double prevSampleL; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; double iirSampleAR; double iirSampleBR; diff --git a/plugins/WinVST/Spiral2/Spiral2Proc.cpp b/plugins/WinVST/Spiral2/Spiral2Proc.cpp index 36f15560c..d29127db5 100755 --- a/plugins/WinVST/Spiral2/Spiral2Proc.cpp +++ b/plugins/WinVST/Spiral2/Spiral2Proc.cpp @@ -29,8 +29,8 @@ void Spiral2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/TPDFDither/TPDFDither.cpp b/plugins/WinVST/TPDFDither/TPDFDither.cpp index 6ba4c807d..2e8df5daa 100755 --- a/plugins/WinVST/TPDFDither/TPDFDither.cpp +++ b/plugins/WinVST/TPDFDither/TPDFDither.cpp @@ -14,7 +14,7 @@ TPDFDither::TPDFDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. diff --git a/plugins/WinVST/Tape/Tape.cpp b/plugins/WinVST/Tape/Tape.cpp index a34d8b788..8631f6bf1 100755 --- a/plugins/WinVST/Tape/Tape.cpp +++ b/plugins/WinVST/Tape/Tape.cpp @@ -29,7 +29,7 @@ Tape::Tape(audioMasterCallback audioMaster) : flip = false; lastSampleL = 0.0; lastSampleR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Tape/TapeProc.cpp b/plugins/WinVST/Tape/TapeProc.cpp index 4d498b2cd..2f26675ed 100755 --- a/plugins/WinVST/Tape/TapeProc.cpp +++ b/plugins/WinVST/Tape/TapeProc.cpp @@ -47,8 +47,8 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -269,11 +269,11 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/TapeDelay/TapeDelayProc.cpp b/plugins/WinVST/TapeDelay/TapeDelayProc.cpp index ef32867b9..6f42b02ff 100755 --- a/plugins/WinVST/TapeDelay/TapeDelayProc.cpp +++ b/plugins/WinVST/TapeDelay/TapeDelayProc.cpp @@ -38,42 +38,8 @@ void TapeDelay::processReplacing(float **inputs, float **outputs, VstInt32 sampl double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -205,42 +171,8 @@ void TapeDelay::processDoubleReplacing(double **inputs, double **outputs, VstInt double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/WinVST/TapeDither/TapeDither.cpp b/plugins/WinVST/TapeDither/TapeDither.cpp index f9ba70917..be85fcdb2 100755 --- a/plugins/WinVST/TapeDither/TapeDither.cpp +++ b/plugins/WinVST/TapeDither/TapeDither.cpp @@ -14,7 +14,7 @@ TapeDither::TapeDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; previousDither1L = 0.0; previousDither2L = 0.0; previousDither3L = 0.0; diff --git a/plugins/WinVST/TapeFat/TapeFatProc.cpp b/plugins/WinVST/TapeFat/TapeFatProc.cpp index 7d0e52a57..1411a1454 100755 --- a/plugins/WinVST/TapeFat/TapeFatProc.cpp +++ b/plugins/WinVST/TapeFat/TapeFatProc.cpp @@ -28,42 +28,8 @@ void TapeFat::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; @@ -159,42 +125,8 @@ void TapeFat::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; if (gcount < 0 || gcount > 128) {gcount = 128;} count = gcount; diff --git a/plugins/WinVST/ToTape6/ToTape6.cpp b/plugins/WinVST/ToTape6/ToTape6.cpp index d9dd27d8d..741b7565e 100755 --- a/plugins/WinVST/ToTape6/ToTape6.cpp +++ b/plugins/WinVST/ToTape6/ToTape6.cpp @@ -43,7 +43,7 @@ ToTape6::ToTape6(audioMasterCallback audioMaster) : lastSampleR = 0.0; flip = 0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/ToTape6/ToTape6Proc.cpp b/plugins/WinVST/ToTape6/ToTape6Proc.cpp index 49e72323b..f3a052485 100755 --- a/plugins/WinVST/ToTape6/ToTape6Proc.cpp +++ b/plugins/WinVST/ToTape6/ToTape6Proc.cpp @@ -56,8 +56,8 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -324,11 +324,11 @@ void ToTape6::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/TremoSquare/TremoSquare.cpp b/plugins/WinVST/TremoSquare/TremoSquare.cpp index 29422d4f1..e854b11ac 100755 --- a/plugins/WinVST/TremoSquare/TremoSquare.cpp +++ b/plugins/WinVST/TremoSquare/TremoSquare.cpp @@ -19,7 +19,7 @@ TremoSquare::TremoSquare(audioMasterCallback audioMaster) : muteL = false; polarityR = false; muteR = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/TremoSquare/TremoSquareProc.cpp b/plugins/WinVST/TremoSquare/TremoSquareProc.cpp index 1c627a8e6..ec7d1b27b 100755 --- a/plugins/WinVST/TremoSquare/TremoSquareProc.cpp +++ b/plugins/WinVST/TremoSquare/TremoSquareProc.cpp @@ -25,8 +25,8 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -59,11 +59,11 @@ void TremoSquare::processReplacing(float **inputs, float **outputs, VstInt32 sam //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/TripleSpread/TripleSpread.cpp b/plugins/WinVST/TripleSpread/TripleSpread.cpp index 736b3f379..7e4926290 100755 --- a/plugins/WinVST/TripleSpread/TripleSpread.cpp +++ b/plugins/WinVST/TripleSpread/TripleSpread.cpp @@ -51,7 +51,7 @@ TripleSpread::TripleSpread(audioMasterCallback audioMaster) : A = 0.5; B = 0.5; C = 0.5; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/TripleSpread/TripleSpreadProc.cpp b/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp index 6bd70e790..ef7721197 100755 --- a/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp +++ b/plugins/WinVST/TripleSpread/TripleSpreadProc.cpp @@ -23,8 +23,8 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -309,11 +309,11 @@ void TripleSpread::processReplacing(float **inputs, float **outputs, VstInt32 sa //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; @@ -342,8 +342,8 @@ void TripleSpread::processDoubleReplacing(double **inputs, double **outputs, Vst { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Ultrasonic/Ultrasonic.cpp b/plugins/WinVST/Ultrasonic/Ultrasonic.cpp index 6c0b6fc6f..e58027991 100755 --- a/plugins/WinVST/Ultrasonic/Ultrasonic.cpp +++ b/plugins/WinVST/Ultrasonic/Ultrasonic.cpp @@ -13,7 +13,7 @@ Ultrasonic::Ultrasonic(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { for (int x = 0; x < 15; x++) {biquadA[x] = 0.0; biquadB[x] = 0.0; biquadC[x] = 0.0; biquadD[x] = 0.0; biquadE[x] = 0.0;} - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Ultrasonic/UltrasonicProc.cpp b/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp index 0bb52e5e0..96ee029c7 100755 --- a/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp +++ b/plugins/WinVST/Ultrasonic/UltrasonicProc.cpp @@ -65,8 +65,8 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -100,11 +100,11 @@ void Ultrasonic::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp b/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp index 8bf48c273..cbce9a998 100644 --- a/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp +++ b/plugins/WinVST/UltrasonicLite/UltrasonicLiteProc.cpp @@ -30,8 +30,8 @@ void UltrasonicLite::processReplacing(float **inputs, float **outputs, VstInt32 { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -41,11 +41,11 @@ void UltrasonicLite::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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp b/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp index 152e5b0ce..8e3cb8250 100644 --- a/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp +++ b/plugins/WinVST/UltrasonicMed/UltrasonicMedProc.cpp @@ -43,8 +43,8 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double outSampleL = biquadA[2]*inputSampleL+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10]; biquadA[8] = biquadA[7]; biquadA[7] = inputSampleL; inputSampleL = outSampleL; biquadA[10] = biquadA[9]; biquadA[9] = inputSampleL; //DF1 left @@ -60,11 +60,11 @@ void UltrasonicMed::processReplacing(float **inputs, float **outputs, VstInt32 s //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/UnBox/UnBox.cpp b/plugins/WinVST/UnBox/UnBox.cpp index 7916ea55e..221f617d6 100755 --- a/plugins/WinVST/UnBox/UnBox.cpp +++ b/plugins/WinVST/UnBox/UnBox.cpp @@ -23,7 +23,7 @@ UnBox::UnBox(audioMasterCallback audioMaster) : iirSampleAR = 0.0; iirSampleBR = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/UnBox/UnBox.h b/plugins/WinVST/UnBox/UnBox.h index 0de78a63d..838b6062e 100755 --- a/plugins/WinVST/UnBox/UnBox.h +++ b/plugins/WinVST/UnBox/UnBox.h @@ -54,7 +54,8 @@ private: char _programName[kVstMaxProgNameLen + 1]; std::set< std::string > _canDo; - uint32_t fpd; + uint32_t fpdL; + uint32_t fpdR; //default stuff double aL[5]; double bL[5]; diff --git a/plugins/WinVST/UnBox/UnBoxProc.cpp b/plugins/WinVST/UnBox/UnBoxProc.cpp index e45e21e08..7ebfc88fe 100755 --- a/plugins/WinVST/UnBox/UnBoxProc.cpp +++ b/plugins/WinVST/UnBox/UnBoxProc.cpp @@ -73,8 +73,8 @@ void UnBox::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra if (input != 1.0) {inputSampleL *= input; inputSampleR *= input;} - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; diff --git a/plugins/WinVST/Vibrato/Vibrato.cpp b/plugins/WinVST/Vibrato/Vibrato.cpp index 6ea3c86d2..6b32cea10 100755 --- a/plugins/WinVST/Vibrato/Vibrato.cpp +++ b/plugins/WinVST/Vibrato/Vibrato.cpp @@ -34,7 +34,7 @@ Vibrato::Vibrato(audioMasterCallback audioMaster) : flip = false; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/Vibrato/VibratoProc.cpp b/plugins/WinVST/Vibrato/VibratoProc.cpp index 150da0987..f196e90e2 100755 --- a/plugins/WinVST/Vibrato/VibratoProc.cpp +++ b/plugins/WinVST/Vibrato/VibratoProc.cpp @@ -24,8 +24,8 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -88,11 +88,11 @@ void Vibrato::processReplacing(float **inputs, float **outputs, VstInt32 sampleF //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/VinylDither/VinylDither.cpp b/plugins/WinVST/VinylDither/VinylDither.cpp index 2d719fd56..9123d5431 100755 --- a/plugins/WinVST/VinylDither/VinylDither.cpp +++ b/plugins/WinVST/VinylDither/VinylDither.cpp @@ -14,7 +14,7 @@ VinylDither::VinylDither(audioMasterCallback audioMaster) : { A = 1.0; B = 0.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX; NSOddL = 0.0; prevL = 0.0; nsL[0] = 0; diff --git a/plugins/WinVST/VoiceTrick/VoiceTrick.cpp b/plugins/WinVST/VoiceTrick/VoiceTrick.cpp index ee066c80d..1553a504a 100755 --- a/plugins/WinVST/VoiceTrick/VoiceTrick.cpp +++ b/plugins/WinVST/VoiceTrick/VoiceTrick.cpp @@ -23,7 +23,7 @@ VoiceTrick::VoiceTrick(audioMasterCallback audioMaster) : lowpassChase = 0.0; lowpassAmount = 1.0; lastLowpass = 1000.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/VoiceTrick/VoiceTrickProc.cpp b/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp index 0de1f49ae..53ecb0fff 100755 --- a/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp +++ b/plugins/WinVST/VoiceTrick/VoiceTrickProc.cpp @@ -25,8 +25,8 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp { double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; lowpassAmount = (((lowpassAmount*lowpassSpeed)+lowpassChase)/(lowpassSpeed + 1.0)); invLowpass = 1.0 - lowpassAmount; //setting chase functionality of Capacitor Lowpass. I could just use this value directly from the control, @@ -93,11 +93,11 @@ void VoiceTrick::processReplacing(float **inputs, float **outputs, VstInt32 samp //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/curve/curve.cpp b/plugins/WinVST/curve/curve.cpp index c814f421d..8c4e78f40 100755 --- a/plugins/WinVST/curve/curve.cpp +++ b/plugins/WinVST/curve/curve.cpp @@ -13,7 +13,7 @@ curve::curve(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParameters) { gain = 1.0; - fpd = 17; + fpd = 1.0; while (fpd < 16386) fpd = 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/WinVST/curve/curveProc.cpp b/plugins/WinVST/curve/curveProc.cpp index 3a3f18b86..1b607c120 100755 --- a/plugins/WinVST/curve/curveProc.cpp +++ b/plugins/WinVST/curve/curveProc.cpp @@ -19,8 +19,8 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra double inputSampleL = *in1; double inputSampleR = *in2; - if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37; - if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; inputSampleL *= 0.5; inputSampleR *= 0.5; @@ -39,11 +39,11 @@ void curve::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra //begin 32 bit stereo floating point dither int expon; frexpf((float)inputSampleL, &expon); - fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5; - inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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 += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-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; diff --git a/plugins/WinVST/uLawDecode/uLawDecodeProc.cpp b/plugins/WinVST/uLawDecode/uLawDecodeProc.cpp index 0c0ee1f1f..45a85c80a 100755 --- a/plugins/WinVST/uLawDecode/uLawDecodeProc.cpp +++ b/plugins/WinVST/uLawDecode/uLawDecodeProc.cpp @@ -27,42 +27,8 @@ void uLawDecode::processReplacing(float **inputs, float **outputs, VstInt32 samp double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR; @@ -127,42 +93,8 @@ void uLawDecode::processDoubleReplacing(double **inputs, double **outputs, VstIn double inputSampleL = *in1; double inputSampleR = *in2; - static int noisesourceL = 0; - static int noisesourceR = 850010; - int residue; - double applyresidue; - - noisesourceL = noisesourceL % 1700021; noisesourceL++; - residue = noisesourceL * noisesourceL; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleL += applyresidue; - if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) { - inputSampleL -= applyresidue; - } - - noisesourceR = noisesourceR % 1700021; noisesourceR++; - residue = noisesourceR * noisesourceR; - residue = residue % 170003; residue *= residue; - residue = residue % 17011; residue *= residue; - residue = residue % 1709; residue *= residue; - residue = residue % 173; residue *= residue; - residue = residue % 17; - applyresidue = residue; - applyresidue *= 0.00000001; - applyresidue *= 0.00000001; - inputSampleR += applyresidue; - if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) { - inputSampleR -= applyresidue; - } - //for live air, we always apply the dither noise. Then, if our result is - //effectively digital black, we'll subtract it again. We want a 'air' hiss + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; double drySampleL = inputSampleL; double drySampleR = inputSampleR;