# # ## ### ##### ######## ############# ##################### # This Praat script takes the average LTAS of a selection of sound objects # and shapes white noise according to this average LTAS. # # You can specify the frequency resolution, duration and final intensity of the noise # if you want the intensity to equal the average intensity of the input, # set intensity value to 0 # # Based on some code written by: # 2009 Theo Veenker, Lisette van Delft, Hugo Quene # See Quene & Van Delft (2010). Speech Commun, 52, 911-918. # doi:10.1016/j.specom.2010.03.005 ################################## ##################### ############# ######## ##### ### ## # # pause select all the sounds to analyze for the LTAS Concatenate Rename... Sound_for_LTAS call make_LTAS Sound_for_LTAS 5.0 100 0 LTAS_combined procedure make_LTAS .name$ .noisedur .freq_specificity .final_intensity .noise_name$ select Sound '.name$' .samplerate = Get sampling frequency orig_int = Get intensity (dB) To Ltas... .freq_specificity if .final_intensity = 0 .new_intensity = orig_int else .new_intensity = .final_intensity endif # Create white noise and convert to a spectrum Create Sound from formula... noise Mono 0 .noisedur .samplerate randomGauss(0,0.1) To Spectrum... no select Sound noise Remove # Apply LTAS envelope to white noise spectrum and convert back to sound select Spectrum noise Formula... self * 10 ^ (Ltas_'.name$'(x)/20) To Sound Scale intensity... '.new_intensity' Rename... '.noise_name$' # Cleanup select Ltas '.name$' plus Spectrum noise Remove endproc