Description Usage Arguments Note Examples
View source: R/multiple_sounds.R
Function to extract the specified index from all the wav or flac files in a directory. The results, including the filename and wave technical details, are saved to a csv file. If the computer has multiple cores, it can run files in parallel.
1 2 |
directory |
a valid directory, readable by the user, that contains the wav files. |
resultfile |
name of the text file to which write the results in comma-separated values format. |
soundindex |
which index to calculate:
|
no_cores |
number of cores to use when calculating the indices. Can be |
flac |
logical variable to indicate that the files are in FLAC format. FLAC must be installed in the system (see note below). Uses the function |
from |
tells |
to |
tells |
units |
tells |
... |
additional variables to pass to the selected function. See each function's help for details. |
FLAC stands for Free Lossless Audio Codec. Files in FLAC format have been compressed without destruction of data, which happens in lossy compression codecs like the popular MP3. Files can be between 40-60% of the size of the original wav file, although this value depends on the contents. For more information and to download FLAC, visit http://xiph.org/flac/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
#Calculate the ACI of all the wav
# files in the directory "/home/user/wavs/"
# using the function acoustic_complexity
multiple_sounds(directory = "/home/user/wavs/",
resultfile = "/home/user/results.csv",
soundindex = "acoustic_complexity")
#Calculate the same as above using 12000Hz as the
# maximum frequency instead of the default.
multiple_sounds(directory = "/home/user/wavs/",
resultfile = "/home/user/results.csv",
soundindex = "acoustic_complexity", max_freq = 12000)
#Calculate the same as above using two cores
multiple_sounds(directory = "/home/user/wavs/",
resultfile = "/home/user/results.csv",
soundindex = "acoustic_complexity", no_cores = 2)
#Calculate the same as above using all the cores
# the computer has
multiple_sounds(directory="/home/user/wavs/",
resultfile = "/home/user/results.csv",
soundindex = "acoustic_complexity", no_cores = "max")
#Calculate the same as above using all but one cores
multiple_sounds(directory = "/home/user/wavs/",
resultfile = "/home/user/results.csv",
soundindex = "acoustic_complexity", no_cores = -1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.