music.setup_hrtf¶
- music.setup_hrtf(directory=None, url='https://sound.media.mit.edu/resources/KEMAR/full.tar.Z', force=False)[source]¶
Fetch the KEMAR measurements into the cache, once.
- Parameters:
- directory
path,optional Where to put them. Defaults to
hrtf_dir().- url
str Where to get them.
- forcebool
Fetch them again even if they are already there.
- directory
- Returns:
PathThe directory they are in.
- Raises:
RuntimeErrorIf
gzipis not installed. The archive is in the oldcompressformat, which Python’s standard library does not read andgzipdoes; there is no pure-Python fallback here.OSErrorIf the download or the extraction fails. Nothing is left behind: the archive is unpacked beside the target and moved into place only once it is whole, so an interrupted fetch does not leave a directory that
is_dataset()would accept.
- Parameters:
- Return type:
See also
hrirreads one direction out of them.
music.singing.setup_enginethe same arrangement, for the singing engine.
Notes
About 1.3 MB, fetched once. The measurements are Gardner and Martin’s and are freely redistributable; this only saves you finding them.
Examples
>>> setup_hrtf() PosixPath('.../music/kemar')