#this scripts reads all sounds from the directory specified in 'd$' #and equalizes them in max amplitude with prevention of clipping #and write them to the directory specified in 'out$' d$ = "D:\experiment_files\b_prime\wavs\" out$ = "D:\experiment_files\b_prime\temp\" Create Strings as file list... list 'd$'/*.wav numberOfFiles = Get number of strings for ifile from 1 to numberOfFiles select Strings list a$ = Get string... 'ifile' Read from file... 'd$''a$' #query for maximal amplitude max = Get absolute extremum... 0 0 Sinc70 #change maximal amplitude to 0.9 Formula... self * 0.9/'max' Write to WAV file... 'out$''a$'.wav endfor