#This script generated signal correlated noise #for all selected sounds nOfSounds = numberOfSelected("Sound") if nOfSounds < 1 exit select at least 1 sound endif for s from 1 to nOfSounds name$[s] = selected$("Sound",s) snd[s] = selected("Sound",s) endfor writeInfoLine: "processing " + fixed$(nOfSounds,0) + " sounds" for j from 1 to nOfSounds selectObject: snd[j] a$ = name$[j] Copy: a$ + "_scr" #calculate the number of samples to be inverted n = Get number of samples half = round(n/2) appendInfoLine: fixed$(n,0) + " samples in sound " + a$ #make an array for all samples #and set all values to one for i from 1 to n nogniet[i] = 1 endfor #for half of the samples for i from 1 to half #find a sample that has not yet been inverted repeat s = floor(randomUniform(1,n))+1 until nogniet[s] nogniet[s] = 0 #invert this sample Formula: "if col = s then self[s] * -1 else self fi" endfor endfor