A method for preparing a liquid metal bath (10) of a metal alloy having a chemical composition comprising at least one first element (X1) selected from Cu, Mg, Si, Zn, Li, Mn, Zr, Cr, Fe, Ti, V, Ca, Be, Sc, Cd, Pb and Na present in said chemical composition at a first content c1 lying between a first lower target threshold (X1min), and a first target upper threshold (X1max);
- and at least one second element (X2) selected from Cu, Mg, Si, Zn, Li, Mn, Zr, Cr, Fe, Ti, V, Ca, Be, Sc, Cd, Pb and Na present in said chemical composition at a second content c2, lower than a second target upper threshold (X2max), the method comprising:
- a provisioning step (a) in which an amount m1 of variable metal waste (13) is provided, said variable metal waste (13) being characterized by a mean charge content w1 of said at least one first element (X1) lying between a first lower initial threshold (Y1min) and a second upper initial threshold (Y1max), wherein Y1max>X1max and (Y1max-Y1min)/w1>0.1≥(X1max-X1min)/c1;
- a charging step (b) in which all or part of said variable metal waste is introduced into a melting furnace (1), and is melted to obtain all or part of a liquid metal bath (10);
- a measurement step (c) wherein a composition of said liquid metal bath (10) is continuously measured using a laser-induced plasma atomic emission spectrometry device (3) also called LIBS, so as to continuously measure at least one content of said first element (X1) and a content of said second element (X2) in the liquid metal bath (10),
- introducing said variable metal waste (13) during the loading step (b) being interrupted when said content of said first element (X1) measured in the liquid metal bath (10) reaches a value X1maxLIBS, wherein 0.9*X1max≤X1maxLIBS≤X1max, or when said content of said second element (X2) measured in the liquid metal bath (10) reaches a value of X2maxLIBS, wherein 0.9*X2max≤X2maxLIBS≤X2max;
- an adjustment step (d) implemented if the content of said first element (X1) measured in the liquid metal bath (10) during the measurement step (c) is less than the first target lower threshold (X1min), in which an amount m2 of first defined metal waste (15) is introduced into the melting furnace (1), said first defined metal waste (15) being characterized by a first mean adjustment content v1 of said first element (X1) lying between a lower adjustment threshold (Z1min) which is strictly greater than the first lower target threshold (X1min), and an upper adjustment threshold (Z1max), wherein (Z1max-Z1min)/v1<0.3;
- ea dilution step (e) implemented if the content of said first element (X1) measured in the liquid metal bath (10) during the measurement step (c) or (d) is strictly greater than the first target upper threshold (X1max), or if the content of said second element (X2) measured in the liquid metal bath (10) during the measurement step (c) is strictly greater than the second target upper threshold (X2max) wherein an amount m4 of defined primary aluminum or second metal waste (17) is introduced into the melting furnace (1), said second defined metal waste (17) being characterized by a mean dilution content v2 in said first element (X1) strictly lower than the first target upper threshold (X1max), and/or being characterized by a mean dilution content v3 of said second element (X2) strictly below the second target upper threshold (X2max).