header={ "chef": "BeatRig", "recipe_version": "1.8", "title": "Album Normalisation", "description": "Takes multiple audio files, adjusts the level of the loudest file to -14LUFS and the other files accordingly.", "spice": "BQ==:G+Hy36kJcnQQYYavb/JV2Il6eCYr6h4hRJHCF9rRbhX5BcazL6cuTgUMdz0xA50VWA5PmmV0Q7aWkiUtNFtbk991l+t0e8IBXMReMIT1GNjnZZDv7n2YRAo0xcSQbY0ixjG6LLH4wGKnspKAoA/v69iLn6N2IH0XzIZwTGdHSo4=", "flavour": "ApuUrD/JVx9F/E1RWLrscsyN52N0sd1G0KCRGFOyrCw16WuBntC5w62y+7i3xKvKsBOSlvq16q6U3Sjry1oZgTaEXCqXEO7GEDEhF5f/JSWqTyFre77zNA2HOCH18/Yn5NfPNsivMDQtGVjmAvds1CBSO/SXiRRmuRRJPRXtURM=", "time": 1736284610, "palette": "Clean Slate", "dependencies": "", "tags": "audio, loudness, music", "type": "default", "os": "windows,macOS", "functions": "main", "core_version": "0.7.2", "uuid": "006030edd82c46bc8b37d17b2c475af4", "magnetron_version": "1.0.333", "instructions": "Drop file(s) here" }; // ============================================================================= var filecount = 0; // ============================================================================= function main() { // ------------------------------------ // LOUDNES SPECS var album_max_lufs = -99.; var album_max_tp = -99.; var adjust = 0.; // ------------------------------------ setMainMessage("analysing"); setProgress(0); // ------------------------------------ // GET ALL FILES FROM THE APP var files = getFiles(); // ------------------------------------ files = validateInputFile(files); filecount = files.length; // CHECK IF THERE IS AT LEAST ONE FILE if(files.length < 1){ abort("Add files before running the recipe."); } // ------------------------------------ // ANALYSE LOUDNESS OF ALL AUDIO FILES INDIVIDUALLY var args = { "AdjustTargetType": "LUFS", "AdjustTargetLevel": 0. }; // ------------------------------------ for (i=0;i -1 ? true : false ), "LimitThresholddB" : -1., }; // ------------------------------------ // PROCESS THE FILES for (i=0;i