jondkinney / UAD-Hide-And-Seek-Script

Allow for the automated hiding of unauthorized UAD Plugins
26 stars 7 forks source link

Re-work the case statement section to read from a hash or external json file #4

Closed jondkinney closed 6 months ago

jondkinney commented 4 years ago

I never expected it to get that big 😂

vibechild commented 4 years ago

I think this is a really good idea. It seems like they change the name of something with each version. Yaml would be easier for more people to update. JSON would be fine though. Anything that makes it easier for anyone to contribute changes means less work for all of us and faster updates. I'm always happy to submit pull requests, but happier when someone else beats me to it :)

jondkinney commented 7 months ago

Good news on this front. I've reworked things and here is the JSON structure...

{
  "UAD AKG BX 20 Spring Reverb": "UAD AKG BX 20",
  "UAD AMS RMX16 Digital Reverb": "UAD AMS RMX16",
  "UAD AMS RMX16 Expanded Digital Reverb": "UAD AMS RMX16 Expanded",
  "UAD API 2500 Bus Compressor": "UAD API 2500",
  "UAD API 500 EQ Collection": ["UAD API 550A", "UAD API 560"],
  "UAD Ampeg B15N Bass Amplifier": "UAD Ampeg B15N",
  "UAD Ampeg SVT-3 Pro Bass Amplifier": "UAD Ampeg SVT3Pro",
  "UAD Ampeg SVT-VR Bass Amplifier": "UAD Ampeg SVTVR",
  "UAD Bermuda Triangle Distortion": "UAD Bermuda Triangle",
  "UAD Cambridge EQ": "UAD Cambridge",
  "UAD Chandler GAV19T Guitar Amplifier": "UAD Chandler GAV19T",
  "UAD Chandler Limited Curve Bender EQ": "UAD Chandler Limited Curve Bender",
  "UAD Dangerous BAX EQ Collection": [
    "UAD Dangerous BAX EQ Master",
    "UAD Dangerous BAX EQ Mix"
  ],
  "UAD Diezel Herbert Amplifier": "UAD Diezel Herbert",
  "UAD DreamVerb Room Modeler": "UAD DreamVerb",
  "UAD ENGL 646 VS Guitar Amplifier": "UAD ENGL E646 VS",
  "UAD ENGL 765 RT Guitar Amplifier": "UAD ENGL E765 RT",
  "UAD ENGL Savage 120 Guitar Amplifier": "UAD ENGL Savage 120",
  "UAD Eden WT800 Bass Amplifier": "UAD Eden WT800",
  "UAD Empirical Labs EL8 Distressor Compressor": "UAD Empirical Labs Distressor",
  "UAD Fender 55 Tweed Deluxe Amplifier": "UAD Fender 55 Tweed Deluxe",
  "UAD Friedman Amplifiers Collection": [
    "UAD Friedman BE100",
    "UAD Friedman DS40"
  ],
  "UAD Friedman Buxom Betty Amplifier": "UAD Friedman Buxom Betty",
  "UAD Fuchs Overdrive Supreme 50 Amplifier": "UAD Fuchs Overdrive Supreme 50",
  "UAD Fuchs Train II Guitar Amplifier": "UAD Fuchs Train II",
  "UAD Gallien-Krueger 800RB Bass Amplifier": "UAD Gallien Krueger 800RB",
  "UAD Harrison 32C EQ": ["UAD Harrison 32C", "UAD Harrison 32C SE"],
  "UAD Helios Type 69 Legacy EQ": "UAD Helios Type 69 Legacy",
  "UAD Helios Type 69 Preamp and EQ Collection": "UAD Helios Type 69",
  "UAD Ibanez Tube Screamer TS808 Overdrive": "UAD Ibanez Tube Screamer TS808",
  "UAD Korg SDD-3000 Digital Delay": "UAD Korg SDD-3000",
  "UAD Lexicon 480L Digital Reverb and Effects": "UAD Lexicon 480L",
  "UAD Little Labs IBP Phase Alignment": "UAD Little Labs IBP",
  "UAD Maag EQ4 EQ": "UAD Maag EQ4",
  "UAD Manley VOXBOX Channel Strip": "UAD Manley VOXBOX",
  "UAD Manley Variable Mu Limiter": "UAD Manley Variable Mu",
  "UAD Marshall Bluesbreaker 1962 Amplifier": "UAD Marshall Bluesbreaker 1962",
  "UAD Marshall JMP 2203 Amplifier": "UAD Marshall JMP 2203",
  "UAD Marshall Plexi Super Lead 1959 Amplifier": "UAD Marshall Plexi Super Lead 1959",
  "UAD Marshall Silver Jubilee 2555 Amplifier": "UAD Marshall Silver Jubilee 2555",
  "UAD Massenburg DesignWorks MDWEQ5 EQ": ["UAD MDWEQ5-3B", "UAD MDWEQ5-5B"],
  "UAD Millennia NSEQ-2 EQ": "UAD Millennia NSEQ-2",
  "UAD Moog Multimode Filter Collection": [
    "UAD Moog Multimode Filter SE",
    "UAD Moog Multimode Filter XL",
    "UAD Moog Multimode Filter"
  ],
  "UAD Neve 1073 Legacy EQ": "UAD Neve 1073 Legacy",
  "UAD Neve 1073 Preamp and EQ Collection": [
    "UAD Neve 1073",
    "UAD Neve 1073SE Legacy"
  ],
  "UAD Neve 1081 EQ": ["UAD Neve 1081", "UAD Neve 1081SE"],
  "UAD Neve 1084 Preamp and EQ": "UAD Neve 1084",
  "UAD Neve 31102 EQ": ["UAD Neve 31102", "UAD Neve 31102SE"],
  "UAD Neve 88RS Channel Strip Collection": [
    "UAD Neve 88RS",
    "UAD Neve 88RS Legacy"
  ],
  "UAD Ocean Way Microphone Collection": [
    "UAD Ocean Way Mic Collection",
    "UAD Ocean Way Mic Collection 180"
  ],
  "UAD Oxford Envolution Envelope Shaper": "UAD Oxford Envolution",
  "UAD Oxford Limiter V2": "UAD Oxford Limiter",
  "UAD Oxide Tape Recorder": "UAD Oxide Tape",
  "UAD Pure Plate Reverb": "UAD Pure Plate",
  "UAD Putnam Microphone Collection": [
    "UAD Putnam Mic Collection",
    "UAD Putnam Mic Collection 180"
  ],
  "UAD SPL TwinTube Saturation": "UAD SPL TwinTube",
  "UAD SSL 4000 E Channel Strip Collection": "UAD SSL E Channel Strip",
  "UAD SSL 4000 G Bus Compressor Collection": "UAD SSL G Bus Compressor",
  "UAD Suhr PT100 Amplifier": "UAD Suhr PT100",
  "UAD Suhr SE100 Amplifier": "UAD Suhr SE100",
  "UAD Summit Audio TLA-100A Compressor": "UAD Summit Audio TLA-100A",
  "UAD Thermionic Culture Vulture Distortion": "UAD Thermionic Culture Vulture",
  "UAD Townsend Labs Sphere Mic Modeler": [
    "UAD Townsend Labs Sphere",
    "UAD Townsend Labs Sphere 180"
  ],
  "UAD Trident A-Range EQ": "UAD Trident A-Range",
  "UAD UA 175B and 176 Tube Compressor Collection": [
    "UAD UA 175-B",
    "UAD UA 176"
  ],
  "UAD UA 610-A Tube Preamp and EQ": "UAD UA 610-A",
  "UAD Valley People Dyna-mite Dynamics": "UAD Valley People Dyna-mite",
  "UAD Vertigo VSC-2 Compressor": "UAD Vertigo VSC-2",
  "UAD Vertigo VSM-3 Saturator": "UAD Vertigo VSM-3",
  "UAD bx_digital V2 EQ": ["UAD bx_digital V2", "UAD bx_digital V2 Mono"],
  "UAD bx_digital V3 EQ Collection": [
    "UAD bx_digital V3",
    "UAD bx_digital V3 mix"
  ],
  "UAD bx_subsynth Subharmonic Synth": "UAD bx_subsynth",
  "UAD elysia alpha compressor": [
    "UAD elysia alpha master",
    "UAD elysia alpha mix"
  ],
  "UAD Ampeg SVT-VR Classic Bass Amplifier": "UAD Ampeg SVTVR Classic",
  "UAD Ampex ATR-102 Tape Recorder": "UAD Ampex ATR-102",
  "UAD Cooper Time Cube Delay": "UAD Cooper Time Cube",
  "UAD EMT 140 Plate Reverb": "UAD EMT 140",
  "UAD EMT 250 Digital Reverb": "UAD EMT 250",
  "UAD Empirical Labs EL7 FATSO Compressor": [
    "UAD Empirical Labs FATSO Jr",
    "UAD Empirical Labs FATSO Sr"
  ],
  "UAD Fairchild 670 Legacy Limiter": "UAD Fairchild 670 Legacy",
  "UAD Fairchild Tube Limiter Collection": [
    "UAD Fairchild 660",
    "UAD Fairchild 670"
  ],
  "UAD Lexicon 224 Digital Reverb": "UAD Lexicon 224",
  "UAD Little Labs VOG Bass Enhancer": "UAD Little Labs VOG",
  "UAD Manley Massive Passive EQ Collection": [
    "UAD Manley Massive Passive",
    "UAD Manley Massive Passive MST"
  ],
  "UAD Marshall Plexi Classic Amplifier": "UAD Marshall Plexi Classic",
  "UAD Ocean Way Studios Room Modeler": "UAD Ocean Way Studios",
  "UAD Precision K-Stereo Ambience Recovery": "UAD Precision K-Stereo",
  "UAD Precision Mix Rack Collection": [
    "UAD Precision Channel Strip",
    "UAD Precision Reflection Engine",
    "UAD Precision Delay Mod",
    "UAD Precision Delay Mod L"
  ],
  "UAD Precision Multiband Compressor": "UAD Precision Multiband",
  "UAD Pultec EQP-1A Legacy EQ": "UAD Pultec EQP-1A Legacy",
  "UAD Pultec Passive EQ Collection": [
    "UAD Pultec EQP-1A",
    "UAD Pultec HLF-3C",
    "UAD Pultec MEQ-5"
  ],
  "UAD Pultec-Pro Legacy EQ": "UAD Pultec-Pro Legacy",
  "UAD Raw Distortion": "UAD Raw",
  "UAD RealVerb-Pro Room Modeler": "UAD RealVerb-Pro",
  "UAD Roland CE-1 Chorus": "UAD Roland CE-1",
  "UAD Roland Dimension D Chorus": "UAD Roland Dimension D",
  "UAD Roland RE-201 Tape Delay": "UAD Roland RE-201",
  "UAD Studer A800 Tape Recorder": "UAD Studer A800",
  "UAD Teletronix LA-2A Legacy Leveler": "UAD Teletronix LA-2A Legacy",
  "UAD Teletronix LA-2A Leveler Collection": [
    "UAD Teletronix LA-2",
    "UAD Teletronix LA-2A Gray",
    "UAD Teletronix LA-2A Silver"
  ],
  "UAD Teletronix LA-3A Leveler": "UAD LA3A",
  "UAD UA 1176 Limiter Collection": [
    "UAD UA 1176 Rev A",
    "UAD UA 1176LN Rev E",
    "UAD UA 1176AE"
  ],
  "UAD UA 610-B Tube Preamp and EQ": "UAD UA 610-B",
  "UAD dbx 160 Compressor": "UAD dbx 160",
  "UAD UAD Avalon VT-737sp Channel Strip": "UAD Avalon VT-737sp",
  "UAD Diezel VH4 Amplifier": "UAD Diezel VH4",
  "UAD bx_masterdesk Classic": "UAD bx_masterdesk Classic",
  "UAD bx_masterdesk": "UAD bx_masterdesk",
  "UAD Neve 33609 Stereo Limiter Compressor": [
    "UAD Neve 33609 C",
    "UAD Neve 33609SE"
  ],
  "UAD Neve Dynamics Collection": [
    "UAD Neve 33609 C",
    "UAD Neve 33609SE",
    "UAD Neve 2254 E Dual",
    "UAD Neve 2254 E"
  ]
}

That allows for the following update to the code which will be done soon

def plug_case_statement(plug)
  # Load the plugin mappings
  file_content = File.read('plugin_mappings.json')
  plugin_mappings = JSON.parse(file_content)

  plugs = []

  if plugin_mappings.key?(plug)
    # Found a direct match in the JSON mappings
    name = plugin_mappings[plug]
    if name.is_a?(Array)
      # If the mapping is an array, iterate through each name
      name.each do |n|
        # Apply PLUGIN_APPEND conditionally
        next if PLUGIN_APPEND == '(m)'

        plugs << "#{n}#{PLUGIN_APPEND}.#{PLUGIN_EXT}"
      end
    else
      # Single name string, apply PLUGIN_APPEND conditionally
      plugs << "#{name}#{PLUGIN_APPEND}.#{PLUGIN_EXT}" unless PLUGIN_APPEND == '(m)'
    end
  else
    # No direct match found, handle according to your logic
    plugs << "#{plug}#{PLUGIN_APPEND}.#{PLUGIN_EXT}"
  end

  plugs
end

However, it looks like the mono plugin wrappers are no longer supported so that can simplify things even further, which I'll take into account when I implement this.

CleanShot 2024-03-09 at 17 21 07@2x

jondkinney commented 6 months ago

Alright, well this is finally complete! Closing in favor of this giant not-at-all atomic commit... https://github.com/jondkinney/UAD-Hide-And-Seek-Script/commit/8e7cb8ae5aa8166093011af0fef00dafd0c81363