script to mix two sounds at different SNRs



I am learning Praat and I'm struggling to produce the script that mixed one sound-A-1.wav (in one folder with x sounds) with another sound-B-1.wav (in another folder with also x sounds) at a given SNR. Both sounds to mix have the same duration. The script would do the mixing for all sounds in the folders A and B and recorded the results in another folder. Do you know if such script already exist somewhere ? Thank you if you can help me. 



Beginner here, but was just looking at scripts myself.
Here's a script that mixes two sounds using variable gain:
Maybe you could use it with this?
Hope that helps!