This function reads in all the files contained in the "/formants" folder within a Fast Track directory. Since Fast Track exports one formant object per analysis option per token, there are usually a large number of files stored in that directory. This function makes it easy to read all that information in at once. Note that it may take a bit of time (1-2 minutes per thousand sound files) for all the data to be read in if there are many tokens that were analyzed in that directory.

readformants(
  path,
  fileinformation = NA,
  progressbar = TRUE,
  encoding = "UTF-8"
)

Arguments

path

The path to the working directory for the Fast Track project. If no path is provided, the current working directory for the current R session is used.

fileinformation

a dataframe representing the "file_information.csv" file used by Fast Track. If NA, it is loaded from the working directory.

progressbar

if TRUE, a progress bar prints out in the console.

encoding

--.

Value

A list of lists of dataframes. The "external" list is as long as number of files that were analyzed. For each "external" list element there are n "internal" list elements for n analysis steps. For example, formant[[32]][[3]] contains information regarding the 3rd analysis option for the 32nd file.

Details

Each individual analysis is stored in a data frame containing formant frequencies and bandwidths for the first 3-4 formants. These values are rounded, which makes display easier and makes the resulting object much smaller in memory (and on your hard drive). Every data frame representing a single Praat formant object needs to have some information associated with it, and this is done using attributes for the object. The attributes for every dataframe representing a formant object are: timestep (the analysis time step, in ms), w1 (the location of the first analysis window, in ms), maxformant (the maximum formant frequency, in Hz), and filename, containing the label used for the formant object (relating to the wav file filename).

The dataframes corresponding to alternative analyses for a single sound file are stored in a list. This list has the same filename attribute as each of the dataframes contained within it. Finally, all of the lists (each of which represents a single sound) are stored within one overall list. This final list contains an attribute representing the maximum formant frequencies used for all of the analyses represented by the formants files.

So, if you read in your analysis into an object called 'formants', then 'formants[[2]][[3]]' represents the dataframe containing the third analysis for the second sound file. 'formants[[2]]' is a list containing all of the dataframes for the second sound file and 'formants' is a list containing each of the list of dataframes for all the sound files.

Examples

if (FALSE) { formants = readformants (progressbar = TRUE) }