# Convert to 1 channel script # This script converts all sound files in a directory to mono files, extracting the channel you # specify. # WARNING: THIS SCRIPT WILL REPLACE YOUR FILES IN YOUR DIRECTORY WITH 1 CHANNEL SOUNDFILES. PLEASE SAVE/COPY # UNMODIFIED SOUND FILES IN A SEPARATE DIRECTORY. form Convert to single channel sentence Directory_name: /Linguistics/Triqui/Grabacion/Position_data_in_progress_3-23-18/JDL_position/ positive Channel: 2 endform Create Strings as file list... list 'directory_name$'/*.wav numberOfFiles = Get number of strings for ifile to numberOfFiles select Strings list fileName$ = Get string... ifile Read from file... 'directory_name$'/'fileName$' Extract one channel: channel lengthFN = length (fileName$) newfilename$ = left$ (fileName$, lengthFN-3) Write to WAV file... 'directory_name$'/'newfilename$'wav endfor select all Remove