################ # Zero padding # ################ directory$ = "C:\Documents and Settings\Reiko\Desktop\Test3\" outdir$ = "C:\Documents and Settings\Reiko\Desktop\Test4\" Create Strings as file list... list 'directory$'*.wav file_id = selected("Strings") number_of_files = Get number of strings #Read a sound file for i from 1 to number_of_files select file_id current_file$ = Get string... 'i' #Create zeros Create Sound... zero1 0 0.01 44100 0 zero1_id = selected("Sound") Read from file... 'directory$''current_file$' sound_id = selected("Sound") sound_name$ = selected$("Sound") select zero1_id Copy... zero2 zero2_id = selected("Sound") # Select zeros and stop and concatenate select zero1_id plus sound_id plus zero2_id Concatenate recoverably # Rename the sound and textgrid chain_id = selected("Sound") textgrid_id = selected("TextGrid") select textgrid_id Set interval text... 1 2 sound Write to text file... 'outdir$''sound_name$'_zero.TextGrid select chain_id Write to WAV file... 'outdir$''sound_name$'_zero.wav # Clean up the list select zero1_id plus zero2_id plus sound_id plus chain_id plus textgrid_id Remove endfor select file_id Remove print 'newline$'Zero padding completed!'newline$'